-
Notifications
You must be signed in to change notification settings - Fork 31
op dft
firepick1 (Chromebook Ubuntu) edited this page Apr 25, 2014
·
3 revisions
Discrete Fourier Transform OpenCV dft wrapper.
The dft stage changes the data format of the pipeline working Mat. It creates a CV_32F complex Mat on forward transform. It creates a CV_8U Mat on inverse transform. The dynamic range of the complex spectrum is too large to be visually meaningful. To visualize the spectrum, see op dftSpectrum.
-
flags JSON array of strings representing bits to be OR'd:
DFT_SCALE
,DFT_INVERSE
,DFT_COMPLEX_OUTPUT
,DFT_REAL_OUTPUT
.
{}
Example: DFT of white rectangle pipeline
firesight -i img/whiterect.jpg -p json/dft-spectrum.json -o target/dft-rect.jpg
Example: White rectangle DFT and inverse DFT pipeline
firesight -i img/whiterect.jpg -p json/dft.json -o target/dft.jpg
Demonstrates that the input/output images are identical after being passed through:
- forward DFT:
({"flags": ["DFT_SCALE", "DFT_COMPLEX_OUTPUT"], "op": "dft", "comment": "Compute DFT of image"}
- inverse DFT:
{"flags": ["DFT_INVERSE", "DFT_REAL_OUTPUT"], "op": "dft", "comment": "Compute inverse DFT to restore image"}