LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

achieving high frame rates with mikrotron1362

Hi all

 

I am new to Labview, just started with the basics but I guess I have more advanced problem than my current knowlege. I am currently acquiring images with ~300fps which is not the max of the camera I am using. I am doing real time processing with Labview so cannot acheive the max fps with the my current program. I guess generally this can be done using buffers but I have no idea if it is possible for my case. Could you give some advice on this or an idea about where to start??

 

Thanks in advance 

0 Kudos
Message 1 of 5
(3,583 Views)
OK, first don't get hung up on the idea of image processing. Basically you have a very common application. You are getting data very fast and need to do something to it but your processing can't keep up with how fast data is coming in.

With that generalized description in mind, computer people have created design patterns, which are common templates for how to deal with common programming challenges. In your case, the design pattern that you should look at is the producer-consumer loop pattern. There is a template for one version that is included with LabVIEW.

The basic idea is that you acquire your data in one loop at whatever rate you want and stuff the data (in your case images) into some sort of queue. At the same time, a second loop is pulling data out of the loop and doing whatever processing needs doing. It runs slower, but that is OK because the queue will act as a buffer.

Note that this approach only works for acquisitions of a fixed length and it assumes you have enough RAM in your computer to hold the buffered data.

In addition to the template available with LabVIEW, I spend several weeks on my blog building an implementation that corrects some of the underlying problems with the basic template. The link to my blog is in my signature. The series of posts concerns a "Proper LabVIEW Producer-Consumer Loop".

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,564 Views)

As Mike says, don't get hung up on the details.  To answer the question of whether LabVIEW + Your PC + Your Cabling + Your Camera can handle taking images at 300fps, use MAX (you do know about MAX, don't you?  The Measurement and Automation eXplorer that should have appeared as an icon on your desktop when you installed the LabVIEW Drivers?) to "Grab" videos from your camera at 300 fps and see if you can view them.  If MAX can view them, a LabVIEW program can acquire them.  It's up to you to decide what you want to do with them, then design algorithms to do that.

 

As Mike points out, a Producer/Consumer Design is usually advisable.  The images from your Camera will be arriving at a very steady rate of 300 images/second, whether or not you are ready to process them.  You don't want to spend more than about 3 msec with each image (well, 3.333 msec), on average, but P/C will allow you some "wiggle room" when processing.

 

If you want more detailed help, you need to attach code (that means VIs, not JPeg images of parts of the Block Diagram -- we can't "peek under the covers" or test code modifications with pictures).  You also should explain what you want to do, what you tried to do, and what errors or problems you are having.

 

But start with MAX, and get back to us.

 

Bob Schor

0 Kudos
Message 3 of 5
(3,548 Views)

That was a very good starting point . Now I am looking into this Producer-Consumer Loop and the ways to implement it for my case. I think I first should try to figure it out on my own. But sure I will be back with questions soon.

 

Thanks a lot for the help!

 

 

0 Kudos
Message 4 of 5
(3,502 Views)

Hi! Thanks for the help. I have already checked with MAX and I know I can reach higher frame rates. Just like you said I need to structure my code properly (I am checking this Producer-Consumer structure now). 

0 Kudos
Message 5 of 5
(3,499 Views)