LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading multiple frames of AVI, running FFT on each frame and comparing between the frames

Solved!
Go to solution

hi,

I am a research assistant at TAU, Israel and I need to analyze interference pattern that I get from the interferometer. Therefore, I need to run FFT on interference images that i get while changing interferometer properties, extract a phase and magnitude from each image and compare between a couple of images. What I have is an avi file of the recorded interference pattern and I need to divide it into frames and run FFT on each frame separately. 

in the first place, before even getting in to for loop for multiple frames, I've tried to extract one frame and run an FFT on it but the VI doesn't work. so my questions are:

1. what could be the problem?

2. what is the efficient way to create a loop that would compare between two frames, after doing FFT on each of them?

attaching my VI to the questions.

 

Thank you,

Lanna.

0 Kudos
Message 1 of 7
(2,347 Views)

Hi Lanna12,

 

Your VI looks good, so the question is what type of error do you get. Is your AVI frame displayed correctly? If not do you have the right codec installed to decode the AVI file? Are you sure your AVI data is 8 bit monochrome?

 

If you can see the frame on your display, what error do you get out of either the FFT or the PlaneToArray sub-VIs?

0 Kudos
Message 2 of 7
(2,325 Views)

thank you for answering.

I can see the frame so the reading of the file is ok. I get an error when it comes to FFT VI and I don't understand why. 

 

0 Kudos
Message 3 of 7
(2,321 Views)

what error (code and message) do you get? That information isn't saved on your front panel.

0 Kudos
Message 4 of 7
(2,319 Views)

 image.png 

this is the only error I get when I run the VI (no red dots at wiring points or anything at the block diagram).

0 Kudos
Message 5 of 7
(2,316 Views)
Solution
Accepted by topic author Lanna12

If you right-click on the error code and select Explain Error, it tells you that the image type is invalid. Since you get the image type directly from the AVI config sub-VI, my guess is that it is a color image. If so you'll need to convert it to a monochrome (any format) or extract one of the plane before passing it over to the FFT.

0 Kudos
Message 6 of 7
(2,313 Views)

thank you!

0 Kudos
Message 7 of 7
(2,290 Views)