03-18-2016 09:48 AM
Need a fast way to identify duplicated images.
IMAQdx Grab 2.vi returns same image multiple times.
03-18-2016 10:08 AM
Hi George,
If you want to do a Grab where you don't ever get the same image, you should make sure you are passing in true (which is the default) for the "Wait For Next Buffer" parameter. If that value is true, Grab will wait for the next buffer available and should never send duplicates. If false, it just sends the last buffer acquired which could send the same image multiple times. If you want even more control over this behavior, you should take a look at the Low-Level Grab example. In GetImage2, you can specify the BufferNumberMode: Next, Last, BufferNumber, Every, or Last New. Hopefully you can set up your acquisition such to avoid this case so that you don't have to worry about efficiently identifying duplicates. If for some reason you need to do it that way, you can look at Buffer Number Out returned from Grab2 and check that against what was previously returned.
Katie
03-18-2016 10:18 AM
Katie,
Thanks for reply.
"Wait for Next Buffer?" is TRUE by default.
Grab2.vi is calling Get Image2.vi
And buffer number doesn't work. Different buffer number returns identical images.
03-18-2016 10:27 AM
Hi George,
If that is the case, then you should contact support with the specific details of your setup. Different buffer numbers should have different images, and passing the default true into Grab2 should yield a new image every time. What camera are you using? If you have multiple cameras, do you see the same issue with all of them?
Katie
03-18-2016 10:30 AM - edited 03-18-2016 10:32 AM
By the way, timeout is set to 900 ms.
The time between images is ~45 ms, so never timed out.
I copy the image to a buffer to be saved to files at the end of the test.
The file name is the encoder position.
And I found identical images. Occasionally, 3 identical images in a row.
LabVIEW 2014 SP1 f3, IMAQdx 14.5.0
Windows 7 Pro.
03-18-2016 12:02 PM - edited 03-18-2016 12:11 PM
We have one 8-bit mono color camera.
Connected to the PXI chassis with internet cable.
We have no control of image acquisition rate.
So it might be possilbe that it is a NEW image (a new shoot) but identical to previous image?
It is configured to acquire images continuously.
03-18-2016 12:11 PM
Hi George,
Depending on the camera vendor, you may be able to set the Image Format to a test image that changes in some way. For example, Basler has "Test Image 2," which is a moving ramp. Every new frame is different than the previous one in a very predictable way, so it's easy to verify that you are getting the next image from the camera. If you can try your acquisition with a test image like that one, it would be interesting to see if you still see duplicates there.
Katie
03-18-2016 12:49 PM
It's Prosilica GC2450 GigE Monochrome Camera.
03-18-2016 01:49 PM
Scott here at Allied Vision (acquired/merged Prosilica)....
I'm not a Labview expert, but know a bit about the camera... rather than trying to differentiate within the image, I suggest using GigE Vision features to distinguish if it is a different image or not.
Please see
then the section GigE starting on page 51.
In particular: ChunkMode.... page 53 and AcquisitionCount
I presume that's accessible via LabView.... we have several colleagues deeper into Labview than I am.... but I'll bet there are some in this NI Machine Vision Forum who will know.
Regards,
Scott
03-18-2016 02:24 PM
Thanks Scott.
I can't access those features in LabVIEW.
IMAQdx doesn't pass those information to users.