Power Spectrum of one row from 2D Hartley Transform.
(int row, int maxN, float[] fht, float[] ps)
| 460 | |
| 461 | /** Power Spectrum of one row from 2D Hartley Transform. */ |
| 462 | private void fht2ps(int row, int maxN, float[] fht, float[] ps) { |
| 463 | int base = row*maxN; |
| 464 | int l; |
| 465 | for (int c=0; c<maxN; c++) { |
| 466 | l = ((maxN-row)%maxN) * maxN + (maxN-c)%maxN; |
| 467 | ps[base+c] = (sqr(fht[base+c]) + sqr(fht[l]))/2f; |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | /** Converts this FHT to a complex Fourier transform and returns it as a two slice stack. |
| 472 | * Author: Joachim Wesner |
no test coverage detected