I am in charge of the development with Labwindows CVI in C code. The additional module NI Vision development is installed on my computer.
My goal is to compute the magnitude of my complex Fourier image, then process an algorithm on the result. The issue is only with the calculation of the magnitude with Ni Vision.
From a black and white picture, with a rectangular size, I succeed to obtain the FFT picture. As destination from imaqFFT, I have a rectalgular FFT picture, in type IMAQ_IMAGE_COMPLEX. This picture is in the same format than the source image input. Labwindows CVI support told me it is impossible to have a destination picture in a different format than the source.
In order to work with a square format, I resized my black and white source picture in a square format, by deleting 2 bands on the sides.
The result of the FFT image (square format) is correct. This picture is displaying in a single canvas with imagImageDisplay, so I supposed that I am already seeing the magnitude of the Fourier picture. Indeed, the value of the screen pixel is displayed with a single intensity (only one canvas), while the pixel values are couples of values with real part and imaginary part.
In order to obtain the magnitude of the FFT picture, I use imaqExtractComplexPlane function, with the selection of IMAQ_MAGNITUDE in parameters.
The function does not return any errors. Called with a destination image type I16, I have negative values. In U16, some of the pixels seems to be above the maximum range of U16. Called in IMAQ_IMAGE_SGL in order to have a 32 bits results, values are not normal, even negative, which is impossible for a magnitude result.
Do you have ideas of what leads I can follow ? What type of error is possible in order to use this imaqExtractComplexPlane function badly ?
Can I have the result by a different way ? Should I compute it myself ?