Hi,
I'm doing custom FFT-based filters, and for this, I need to access the results of IMAQ FFT as an array in optical representation.
Obviously that's the purpose of IMAQ ComplexFlipFrequency.
As I understand it, this function flips between standard and optical representation in the internal memory by swapping arrays like this
![OpticalStandardFlip.PNG OpticalStandardFlip.PNG]()
I guess that this is a very efficient and elegant way to do things.
The problem for me is when you start handling images with an odd pixel resolution (let's say an image with 5x4 pixels).
This "array swap" obviously can't work, so you get a leftover column.
![CodeComparison.PNG CodeComparison.PNG]()
This is not just an edge case for a very small image, I observe this behaviour also with large images, for example here:
![FlipFrequencyExample.png FlipFrequencyExample.png]()
1) Can you confirm this behaviour?
2) Are there any solutions beyond just enforcing that the image sizes are not odd (IMAQ Extract / IMAQ Resample)?
I mostly build filters in the optical representation and then use IMAQ ComplexMultiply. Of course I could shift my filters to standard representation, but that would just shift the problem.
3) If there are no solutions, I would like to make a CAR to at least document this properly.
This can mess up filters a lot and I spent a few hours trying to figure out why my algorithms worked only with some test data (It's impossible to see one "wrong" pixel line if your image is 1891 px wide!)
Attached:
1) the test program
2) a vi for making image sizes even.. if someone after me is looking for a fix.