Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the fastest way to change the acquisition ROI in IMAQdx

Are you using an area scan or line scan camera?  If it was a line scan camera, you could just take a bunch of small images and put them together as a single large image.  With an area scan camera, I don't see any options other than continuous acquisition and checking every image.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 11 of 16
(1,340 Views)

I'm using a Dalsa Spyder linescan camera. I'll have a look at your idea of joining several small images together.

 

Thanks

Simon

0 Kudos
Message 12 of 16
(1,338 Views)

I did a project where I acquired image strips using a line scan camera, then merged them into a large image.  Mine was a little more complicated, because I was analyzing multiple objects simulatenously, so I was constantly adding strips on one end and removing them on the other.

 

Just create a large blank image, then paste each strip in using ImageToImage with the correct offsets.  Then your logic becomes fairly simple - check each strip for your object.  If you get a strip with the object, paste it and the next N strips into the big image.  When done pasting, analyze your large image while simultaneously looking for the next object.

 

You can also do a few tricks this way - If you don't know the size of your object, just make the target image as large as the largest possible image.  Once you detect a strip with no object, trim the target image and proceed.  Alternately, you can resize the target image larger if you run out of room for strips.  You need to resize in large steps to avoid memory overload, though.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 13 of 16
(1,335 Views)

Sounds pretty logical.I'll give it a go.

 

Thanks

Simon

0 Kudos
Message 14 of 16
(1,333 Views)

Bruce,

 

This worked a treat and required very little coding. However, because of the time required to add the small image to the large image, you can see a small discontinuity between each small image. Is there a way to reduce or eliminate this?

 

I wondered whether it might be possible to reduce the discontinuity by putting the small image into a queue and looping back immediately to capture the next image. A parallel loop could then be used to dequeue and construct the large image. But I am unsure whether putting an image onto the queue will create a additional image buffer - probably not I suspect.

 

Simon

0 Kudos
Message 15 of 16
(1,322 Views)

You should have the acquisition set up to run continuously.  It should acquire into a multiple buffer sequence without any pauses or stops.  If you are using an encoder, use it to trigger each line and just acquire continuously (no frame trigger).  The image acquisition will run in the background and steadily fill each buffer.  All you need to do is detect that a new buffer has been filled, then inspect it.  If it qualifies, add it to the larger image.  Then wait for the next buffer to be filled.  Copying the large final image and sending it to a parallel process for analysis is a wise choice.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 16 of 16
(1,316 Views)