Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the fast way to id duplicated images ?

Need a fast way to identify duplicated images.

IMAQdx Grab 2.vi returns same image multiple times.

 

George Zou
0 Kudos
Message 1 of 12
(4,624 Views)

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

0 Kudos
Message 2 of 12
(4,615 Views)

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.

 

 

George Zou
0 Kudos
Message 3 of 12
(4,612 Views)

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

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

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.

 

George Zou
0 Kudos
Message 5 of 12
(4,604 Views)

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.

 

 configure.png

 

George Zou
0 Kudos
Message 6 of 12
(4,589 Views)

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

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

It's Prosilica GC2450 GigE Monochrome Camera.

 

George Zou
0 Kudos
Message 8 of 12
(4,582 Views)

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

https://cdn.alliedvision.com/fileadmin/content/documents/products/cameras/various/features/GigE_Feat...

 

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

 

 

0 Kudos
Message 9 of 12
(4,576 Views)

Thanks Scott.

I can't access those features in LabVIEW.

IMAQdx doesn't pass those information to users.

 

 

George Zou
0 Kudos
Message 10 of 12
(4,571 Views)