06-22-2011 08:37 AM
i'm trying to convert matlab script into labview using fft block. this is the matlab code i want to convert:
>>clear all
>> Img1=imread('quil1.jpg','jpg');
>> a=rgb2gray(Img1);
>> b=fft2(double(a),640,640);
>> c=fftshift(b);
i want to find the fft of an image as attach. but the problem is the value return in labview is different from matlab. can anyone help me on how to find fft of an image in labview?
06-22-2011 08:53 AM
this is the program in labview
06-22-2011 09:32 AM
Different how? I don't have the Image Processing Toolbox, so I can't use the rgb2gray function, so I can't see what the Matlab script generates. How are you doing this in the LabVIEW code?
06-27-2011 01:19 AM
here i attach the solution of 2D fftshift in matlab. the array should be in 640x640. But the attach array only show half of the array start from (0,0) and the numerical answer in labview show different answer from matlab..the labview program is as attach previously where i use IMAQ ExtractSingleColorPlane VI to luminance to substitude rgb2gray in matlab. the array show in labview and in matlab are the same.. but when i put fftshift block in labview the array answer is different from matlab.
09-03-2013 06:18 AM
hi
see this vi it's completely match with matlab code.
it's may be useful for you.