03-14-2014 03:10 PM - edited 03-14-2014 03:13 PM
Hi all,
What I'm trying to accomplish is taking only a few hundred rows from a camera sensor to improve frame rate and moving the offset around based on movement in the image.
I am utilizing configure grab and grab in a loop to improve refresh rate.
I set up a test where the offset in Y was just incremented each loop and displayed the image. This is no problem. I have the incrementor as a remainder output and it will loop all day without error, and the image 'scrolls' across the available sensor space.
When I use optical flow (or point LK algorithm), with no incrementation, and just moving the camera around, optical flow has no problem. It will run all day. Also, the output is correct when I take care to set up the algorthim.
However, when I put the incrementation of the offset and the optical flow together, there is a problem. I expect the optical flow to return a vector similar to my incrementation. Instead, the program exits with a 'Not an Image' in the input of the optical flow block. Indeed, if I put a probe down the image does not appear.
The weird thing is this: for some increments it runs no problem. If I increment 10 rows at a time, no problem. If 8 or 9 or 1 for example, it crashes with 'Not An Image'. If I feedback the output of the optical flow vector into the offset change, the program will run until the distance of the vector in one of the X or Y directions happens to be one of these 'unhappy' numbers.
I also don't understand why 'Grab.vi' is returning an empty image when connected to optical flow, but with an image output without optical flow the image is never empty.
03-17-2014 04:32 PM
Hi,
Please share your code if possible. This would be helpful to better understand your code flow and make recommendations accordingly.
Also for your reference, here is also a link to a forum regarding optical flow:
http://forums.ni.com/t5/Machine-Vision/Displaying-Optical-Flow-from-AVI-file/m-p/2738890
09-29-2014 08:09 AM
Hello,
I want to know if I can use the Optical flow.vi in a real-time systerm? I have tried my best to do that. But it didn't work. Can you help me?
09-30-2014 09:12 AM
Usually, you can change code around to implement on a Real Time operating system. What have you tried? If you post code, or at least show screenshots, we will get a better understanding of what you have already tried and we can see what we can do to help out! Thanks!