Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

DFT not Displaying Well using Mathscript with IMAQ

I am using Mathscript to generate a rectangular shape and finding the DFT. The result is been displayed on IMAQ.

 

The image generation worked fine, but the DFT display is not showing properly, I have to look very closely to see a faint picture. However the same code on MATLAB gives me the display very sharply. Even when I multiplied the final display output i.e by say 30, it shows the image, but not very well, for instance , I could not see the sinc like shape.

 

I have attached the VI in version 8,5 and 8.0, and also the correct picture I am suppose to get in .jpg.

 

Thank you

0 Kudos
Message 1 of 3
(3,188 Views)
The image you created are U8 grayscale  images (default) , while you should use SGL grayscale. Right click the Image Type input of IMAQ create and add a constant here. Select GrayScale (SGL). Then connect your array to the Image Pixels (Float) input to IMAQ ArrayToImage.
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 3
(3,179 Views)

You could get a similar result still working with U8 values, but using the full dynamic range of the image : find the highest value in the array (HAV) and use it to define a good multiplier (= 255/HAV). Here I find 255/5.8 = 44. 

Higher than 30 😉 

Chilly Charly    (aka CC)
0 Kudos
Message 3 of 3
(3,177 Views)