selena
selena

Reputation: 151

FFT implementation using Apache Common Math

I am trying to implement the FFT in ImageJ and I tried the this:

https://stackoverflow.com/questions/24291896/fft-image-is-not-the-same-as-the-fft-image-produced-in-imagej

but I could seem to make it work so I thought I would try using Apache Common Math and see what it produces. I have tried the following lines of code but I keep getting an error when I try to do the f. transform(). What am I missing?

FastFourierTransformer f = new FastFourierTransformer(null);
TransformType type;
f.transform(fdata, type.GENERAL);

This is the error I get:

The method transform(double[], org.apache.commons.math3.transform.TransformType) in the type FastFourierTransformer is not applicable for the arguments (double[], org.apache.batik.ext.awt.g2d.TransformType)

Upvotes: 0

Views: 1371

Answers (1)

Jason Barrett
Jason Barrett

Reputation: 239

Selena, you appear to have a namespace collision. If you need both the Apache Commons bundle and the org.apache.batik.ext.awt.g2d bundle, you may have to try qualifying the variable declaration like this:

org.apache.commons.math3.transform.TransformType type;

What are you importing in this code file?

Upvotes: 1

Related Questions