Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling frame rate and ROI on a ge680 using IMAQdx

Solved!
Go to solution

Hi all,

I'm working with a ge680 camera and I'm trying to write a VI to record images from my microscope. I'm very new to labview and am still stuck with a few things. First, I want to be able to control the frame rate, but I haven't been able to find an efficient way to do it using my camera's attributes. When I used the "grab and basic attributes" VI to play with the settings. The framerateabs setting was all I could alter and it didn't effect my frame rate in the end. Also, I'm having the problem that my frame rate won't exceed 66hz on a camera "capable" of 200. Second, I'd like to be able to record only a region of interest. I've gotten it down as far as finding the "height" "width" "offset X" and "offset Y" controls. However, I can only use those before the acquisition mode has begun, which is sort of a pain to use. I haven't been able to find anything relating to how to set it during acquisition.

I've attached the VI I've been working with, as well as the settings file from my camera if anyone would like to have a look. Thanks for all your help!

 

Download All
0 Kudos
Message 1 of 12
(4,405 Views)

Hi,

 

I believe on that camera the AcquisitionFrameRateAbs feature is only used if you put the camera into a Fixed Rate mode. This can be done by setting the TriggerSource feature from FreeRun to [I believe] FixedRate.

 

You might not be getting 200fps because it is being bounded by your exposure time. On most cameras the exposure time will trump the desired frame rate. You would have to make sure it is below 5ms to get 200fps.

 

You cannot adjust the width and height of the image after the camera has started acquiring because various buffers must be re-allocated (hence the configure/unconfigure functions). You should be able to move the ROI window around though via OffsetX/Y as long as the camera allows it. Certain older versions of IMAQdx disallowed accidentally this but I know the IMAQdx version 3.7 allows it.

 

Eric

Message 2 of 12
(4,400 Views)

Hi Smithers,

There are some possible cause why you were getting lower than expected # of images per second. I would check on the configuration of the hardware first to ensure that the camera setting is set correctly in Measurement and Automation Explorer. This is to ensure that IMAQdx driver have the right configuration setting for the camera.

 

Another possibility would be the usage of IMAQdx Grab function that only take the last frame in the buffer instead of sequence of images in the buffer. Since the loop where the IMAQdx Grab function also record the image to TIFF file, it is possible that when the loop run a single loop, 2 or 3 frames added into the image buffer and the next call to IMAQdx Grab function only take the last frame, causing you to lose 1 or 2 frames on each loop.

 

In order to avoid this, you can use either producer consumer loop or use a IMAQdx Sequence function to get all the frames in the buffer. There is an example in using sequence acquisition from the example finder. I was trying to find for you but my LabVIEW example finder doesn't work that well.

 

In regards to recording only your image ROI, have you tried to use IMAQ Extract function of images?

 

I hope that these helps and let me know the result of your trials.

 

 

- Meadow -
LabVIEW 7.0 - 2011, Vision, RT, FPGA
TestStand 3.0 - 4.5
0 Kudos
Message 3 of 12
(4,401 Views)

Thanks for your help guys.

I played around with the exposure on my camera, it was set pretty high at about 15ms, I found I could lower it down to about 8.5 and still get good images and raise my rame rate to 100. Im pretty sure I'm on IMAQdx version 3.2. Would you know offhand if this is one of the versions that disallows messing with offsetX and Y while acquiring? I'm using AVI to record my images now and I'd really like to be able to alter the ROI during recording. I'm looking through all the image control VI's now to see if they help at all. 

0 Kudos
Message 4 of 12
(4,394 Views)

Also I forgot to mention, in using the AVI format to record images I was given a front panel section for controlling the frame rate. How does that interact with the camera? Does it only take a certain amount of images from what I see and save them to the file? Would there be a difference between controlling the frame rate there and controlling it via my camera?

0 Kudos
Message 5 of 12
(4,393 Views)

IMAQdx 3.2 likely does not allow moving the ROI while acquiring. I suggest updating to 3.7 available here:

http://joule.ni.com/nidu/cds/view/p/id/2137/lang/en

 

As for the AVI frame rate, my hunch would be you are talking about the one that determines the rate the AVI is played back at. This is independent of your capture speed and you can set any rate you want the AVI to play back by default.

 

Eric

Message 6 of 12
(4,383 Views)

So it took a while, as the new software and my computer somehow didn't get along, but I managed to update my imaqdx. As far as controlling the ROI goes, I tried putting a property node inside of my while loop for acquiring images but it only produces an error. How do I go about controlling the ROI during acquisition using IMAQdx 3.7?

0 Kudos
Message 7 of 12
(4,354 Views)

Can you post a screenshot showing what your code looks like?

 

Eric

Message 8 of 12
(4,352 Views)

Hi there,

You won't be able to change your ROI while acquiring. You first have to stop acquisition, then change your ROI settings via the IMAQdx property node, then start acquisition again.

The thing is that the buffers are dimentionned in the grabber memory before acquisition the job is done by the IMAQdx Configure Grab.vi . If you change the size of the image during acquisition, you will have an error message.

If you stop, set ROI and grab again, this might take 10 or 100 ms before you get the new image.

 

Hope this help

NTA_LabView_certified_Developper.jpg
0 Kudos
Message 9 of 12
(4,347 Views)

In order to specifiy a Constant Frame Rate, the Trigger Source must be set to FixedRate.

Here is an example where you can change the ROI, the Shutter and CFR.

Don't forget that if OffsetX + Image Width > Sensor Width ther will be an error.

The same for OffsetY + Image Height > Sensor Height.

 

Hope this help

NTA_LabView_certified_Developper.jpg
0 Kudos
Message 10 of 12
(4,343 Views)