Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQdx Get Image .. wrong Image

Hi there :),

 

i have a problem with the get image VI.

 

In my program is a grab acquisition running. When i want to acquire an image i first read the attributes from the camera and compare them with the new camerattributes i want to use.

 

I stop the acqusition, write the new attributes, and start the grab again.

 

When is use Get Image with "Last Buffer" or "Buffer Number 0" i sometimes!? get an image with the old camera attributes..

 

if i change the Buffer Number to 1 i always get the right image. This takes about 100ms longer than buffer 0 or Last image.. buti want to avoid waiting for the next image.

 

can anyone help me? :), what do i miss.

0 Kudos
Message 1 of 5
(3,642 Views)

Hi inVerted,

 

thank you for using our forum.

 

I do not really find the cause of the problem using the .png. Can you program a small sample / extract a bit of your code which shows the behavior you described?

 

Have a nice day!

 

 

Stefan Egeler

AE NI Germany

0 Kudos
Message 2 of 5
(3,610 Views)

After you restart the acquisition, you need to give the camera enough time to acquire a new image.  If you don't, you will end up with an old image.  I haven't experimented lately with starting and stopping acquisitions, so I'm not sure how it handles image indexes.  You might be able to check the last buffer index acquired after pausing, then request the following buffer index after restart.  That way you know it is acquired using the new parameters.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 5
(3,596 Views)

If you start/stop the acquistion, the camera is actually stopped and restarted. All images in buffers in IMAQdx are cleared as well and all buffer indices restart at 0. If the camera has some sort of buffering inside (like say between the front-end image sensor and the back-end acquisition hardware) then it is an implementation detail of the camera itself as to whether it guarantees that any changes made while stopped will show up immediately on the next frame acquired.

 

Eric

0 Kudos
Message 4 of 5
(3,588 Views)

thanks for your replies 🙂

 

"if you start/stop the acquistion, the camera is actually stopped and restarted. All images in buffers in IMAQdx are cleared as well and all buffer indices restart at 0."

 

Thats what i thought. But i guess, as you mentioned, inside the camera it doesnt deletes the old images when i stop the acquisition.

 

I use an AVT Marlin. I saw in the manual that ,after writing attributes, it can take up to 3 frames to get the right image.

I understand that this makes sense for a running acquisition (grab). But i even get sometimes wrong images when i stop a running grab, configure an 1 shot acquisition and read out the 1st(0) Buffer. So i assume the camera is not deleting the old images when i stop the acquisition.

 

Atm i run 2 Cameras on one Firewire card (400Mbps) .. so i have to slow them down to 3,75fps. If i Use a card for every Camera, to speed it up to >7fps, the time for waiting for the 3rd frame is reduced alot (atleast 2 times :p). so i guess this will be my solution..

0 Kudos
Message 5 of 5
(3,580 Views)