From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating Frame Rate of Allied Vision Camera

My lab is working on a nanoparticle trapping project and our camera is working fine! We get an image out and we can clearly see the nanoparticles. Everything works fine with the camera, however when trying to figure out the frame rate that's where things go wrong.

 

The subvi for the specific camera gives a tick count, that being in usec. We run it through a calculation we have set: 

 

where the two values being deleted initially is: Current tick count in usec - previous tick count in usec. 

 

NOTE THAT THE CAMERA WE ARE USING IS A MAKO G-030B CAMERA WITH A FRAME RATE OF APPROXIMATELY 300 FPS FROM ALLIED VISION.

 

The reading that this code is giving us is consistently ~10 to ~15 fps.

 

Everything else works fine but this specific portion isn't viable and I went looking for a supposed calculate frames per second subvi but I never found it within LabVIEW.

 

I know that the camera is giving off the right frames per second cause I ran it through Allied Vision's Vimba and it reads ~300 fps. 

 

Is there something I could try to do at the moment? 

0 Kudos
Message 1 of 9
(3,901 Views)

You are probably calculating how fast a loop is running. I don't know what else is going on in your code, but if you are transferring data from your camera, analyzing it, displaying it, etc, you are probably doing a lot in your loop. A loop time of 3.3ms is pretty fast. So just because the camera can run at 300fps, you should not expect your software to run that fast.

0 Kudos
Message 2 of 9
(3,891 Views)

If you want help with your VI to get it to run "full speed", attach your VI (the actual file with an extension of .vi).  To get acquisition to run full speed, you need to get any image processing "out of the IMAQdx Read loop", which you can do with a Queue or Stream Channel Wire.  But if we see the VI, we can be more specific ...

 

Bob Schor

0 Kudos
Message 3 of 9
(3,853 Views)

I'm having the same issue with the exact same camera.  I'm also new to LabView and wondering if you could briefly walk me through how to get image analysis out of the IMAQdx read loop.  Thanks.

0 Kudos
Message 4 of 9
(3,491 Views)

Hi.  I need to trap NPs for my research as well and my LabView never reaches 300 fps.  If I want to trap 100nm particle (or below), what camera settings should I have? Now I'm using 640x480 ROI, mono8 pixel format, X and Y offset = 0.  Not sure about how to set exposure parameters.  I'm also using Zeiss inverted microscope (DIC mode) with oil immersion 100x/1.4NA objective.  I barely had luck in trapping and detecting my particles.  Would you mind sharing the algorithm used and possibly how you prepare the sample chamber?  I basically use a glass slide and a coverslip for my diluted NP solution, though.

0 Kudos
Message 5 of 9
(3,488 Views)

If you are really "new to LabVIEW", you should spend a few months (a year or two?) getting really familiar with "basic" LabVIEW, including using DAQmx to acquire analog and digital data from USB DAQ devices (relatively inexpensive) or myDAQs (designed for Engineering Students learning about acquiring data using LabVIEW, and also relatively inexpensive).

 

Once you've got the basic ideas behind LabVIEW, can write code with multiple VIs, know how to do I/O, etc., you may be ready to tackle NI Vision, which is "a little different" (with a steeper learning curve).  Trust me, I got acquainted with NI Vision through a colleague who needed a partner who "knew" LabVIEW -- IMAQdx was a learning experience for both of us!  And I'd say we had at least a decade of LabVIEW experience between us.

 

So if you are truly "new" to LabVIEW, go find a partner who has more experience and can guide you to getting the basics down quickly.  If they have experience with IMAQdx, great (but learn the basics first, please).

 

Bob Schor

Message 6 of 9
(3,477 Views)

Wow. It'll be tough for me then since I'm the only student in this new lab. I've been learning about NI Vision and LabView basics at the same time but, as you said, the learning curve is seemingly STEEP, especially I was a non-engineering major during college. I looked at NI tutorials but always thought I needed more advanced stuff to address my issues.  Any other basic tutorials+NI Vision samples I can learn from? Now I'm studying some VIs from YouTube and trying to write my own.  Thank you, Bob.

0 Kudos
Message 7 of 9
(3,463 Views)

Well, there is an indication that NI Vision might be able to acquire images from this camera (NI Tutorial on GigE Cameras ).  If you have this camera, you might try hooking it up to MAX (assuming you have the NI Vision components, including the Vision Acquisition Software and Vision Development Module, installed on your system).

 

Can you get MAX to acquire images for you?

 

Bob Schor

0 Kudos
Message 8 of 9
(3,454 Views)

Hello here is Bernardo from Allied Vision. The issue here is indeed the processing time that your VI is using to process the images. if you want to achieve 300 fps, then the time to capture the image and process it cannot be longer than 0.003s. There are two possibilities: 1) create a multi-thread image analysis, by putting the incoming frame into a ring buffer analyzing the frames in parallel and 2)  to acquire the image into RAM and analyze the image after the acquisition. Here you will have a limitation: the number of frames.

 

Remark. be sure, that your exposure time is lower than 0.003 in other to have the desired 300fps.


Bernardo Luck // Applications Engineer
Allied Vision Technologies GmbH
Klaus-Groth-Str. 1, 22926 Ahrensburg, Germany
0 Kudos
Message 9 of 9
(3,384 Views)