From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read/modify the acquisition history on PCIe 1429 frame grabber with MATLAB

Hello!

I am using the PCIe 1429 together with Mikrotron MC1302 camera triggering by software in MATLAB. So in my MATLAB code, I start acquisition from the camera and immediately after present an image on a projector.

For calibration purposes, I video record the image shown on the projector. 
What happens is when I then look at the acquired video frames, there are always between 9-12 frames that are there before the projector image shows up. I assume this is because there is some sort of a FIFO buffer on the grabber that keeps a history. I was wondering if there is a way to change that or to know exactly how many frames are there before the new acquisition starts?
thanks for your help!
0 Kudos
Message 1 of 4
(2,754 Views)

 

Hello,

 

The buffer on the framegrabber does not remember frames from previous acquisitions as long as you are properly closing your sessions so I do not believe those 9-12 frames were there before the acquisition.

I would like to get some clarification on your process. When you mention that you are triggering the camera, are you sending the camera a hardware signal to begin acquisition or are you simply calling the equivalent of a start acquisition? My guess is the latter; I just want to align on terminology because triggering typically implies a digital hardware signal.

Can you describe the 9-12 frames that you are seeing? What do they look like compared to the projector image? From your description, it sounds like you are turning on the projector after you begin acquisition. Right now I am imagining your camera & projector are pointed at a blank wall; are the first 9-12 images simply the blank wall? This may be because there is a slight lag between your camera starting and the projector turning on. Have you tried turning your projector on first then starting the acquisition?

 

Best,

Sam K

0 Kudos
Message 2 of 4
(2,699 Views)

Hi Sam

Thanks for your reply. Yes it is a software trigger. I would understand the lag hypothesis only if it persisted in the next frames as I am running the same command in a loop. But it seems like the blank frames are there only in the beginning.

Attached is an montage of the frames acquired when I update the projector (toggle between dark circle and no circle) once every 4 video frames. Ideally the first frame should correspond to the first time I see the black spot. You see in the first few frames there is nothing. But then once it starts, there is no lag, it is updating as expected.

 

0 Kudos
Message 3 of 4
(2,686 Views)

The lag I was describing would be more related to the projector turning on after the camera has been turned on. Meaning the camera is capturing these blank frames for a fraction of a second and when the project turns on at the camera displays images as expected (live). Under these circumstances, I would not expect the lag to persist into the following frames.

 

Unfortunately, I am not familiar with the MATLAB implementation of our Vision driver so it is hard to say if those frames are stored somewhere; however, I can confirm that the framegrabber itself does not store frames from one camera session to the next.

0 Kudos
Message 4 of 4
(2,666 Views)