Commit b70fdc39 authored by Andrey Filippov's avatar Andrey Filippov

Implementing scene high frequency decay calculation/reporting

parent 12d3c947
......@@ -2424,7 +2424,27 @@ public class DoubleFHT {
return amp;
}
public double[] calculateAmplitudeNoSwap(double[] fht) {
public double [] getFreqAmplitude(
double [] data) {
updateMaxN(data);
swapQuadrants(data);
if (!transform(data, false))
return null; // direct FHT
double [] amp = calculateAmplitude(data);
return amp;
}
public double [] getFreqAmplitude2(
double [] data) {
updateMaxN(data);
swapQuadrants(data);
if (!transform(data, false))
return null; // direct FHT
double [] amp = calculateAmplitude2(data);
return amp;
}
public static double[] calculateAmplitudeNoSwap(double[] fht) {
int size = (int) Math.sqrt(fht.length);
double[] amp = new double[size * size];
for (int row = 0; row < size; row++) {
......@@ -2473,7 +2493,7 @@ public class DoubleFHT {
}
/* Amplitude of one row from 2D Hartley Transform. */
void amplitude(int row, int size, double[] fht, double[] amplitude) {
static void amplitude(int row, int size, double[] fht, double[] amplitude) {
int base = row * size;
int l;
for (int c = 0; c < size; c++) {
......@@ -2495,7 +2515,7 @@ public class DoubleFHT {
}
/* Squared amplitude of one row from 2D Hartley Transform. */
void amplitude2(int row, int size, double[] fht, double[] amplitude) {
static void amplitude2(int row, int size, double[] fht, double[] amplitude) {
int base = row * size;
int l;
for (int c = 0; c < size; c++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment