Returns the unscaled 32-bit power spectrum.
()
| 449 | |
| 450 | /** Returns the unscaled 32-bit power spectrum. */ |
| 451 | public FloatProcessor getRawPowerSpectrum() { |
| 452 | if (!isFrequencyDomain) |
| 453 | throw new IllegalArgumentException("Frequency domain image required"); |
| 454 | float[] fps = new float[maxN*maxN]; |
| 455 | float[] fht = (float[])getPixels(); |
| 456 | for (int row=0; row<maxN; row++) |
| 457 | fht2ps(row, maxN, fht, fps); |
| 458 | return new FloatProcessor(maxN, maxN, fps); |
| 459 | } |
| 460 | |
| 461 | /** Power Spectrum of one row from 2D Hartley Transform. */ |
| 462 | private void fht2ps(int row, int maxN, float[] fht, float[] ps) { |
no test coverage detected