Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum acquisition rate and pixel clock frequency

Hi
 
    I am using a LineScan Camera in which I can set the internal clock at either 2 X 20 Mhz or 2 X 30 MHz(using 2 taps). However the frame grabber that I am using is PCI 1428 which has the Pixel Clock frequency range of 20 to 50 MHz. So does this means that I wont be able acquire all the data when I set the internal clock setting of my camera to 2 X 30 MHz.
The Line scan camera has 2048 pixels and the MAx Line rate capacity of the camera is specified to be 28 KHz.
Also when I grab the data at the setting of 2X30 MHz in dark I could see that the data is not uniform. FFT of this data shows me 3 peaks (whereas ideally there should be no peaks).
Could somebody guide me whether if I am doing something wrong or something is not correct at the camera or frame grabber Level.
0 Kudos
Message 1 of 10
(4,996 Views)

Hello Manish,

When you say 2 x 20 MHz or 2 x 30 MHz, I assume that you are acquiring at 20 MHz with 2 taps or 30 MHz with 2 taps. If that is true, then the Camera Link should have no problem acquiring at 30 MHz with 2 taps. This is possible since the pixel clock rate is still 30 Mhz. The camera simply reads 2 values at a time from the sensor.

As for your second question, do you not get the FFT peaks when you grab at 20 MHz? Could it be your lighting conditions? If you can explain exactly how you are carrying out that test, it would be helpful.

Regards,

Jack J.
Product Support Engineer
National Instruments

0 Kudos
Message 2 of 10
(4,986 Views)

Hi Jack,

Thanks for simplifying things for me.

For the 2nd question I am getting peaks during both setting (Internal clock setting of 2X20 MHz and 2X30 MHZ). However the no. of peaks that are seen in the FFT of the data are more and also more prominent when acquiring at the settings of 2X30 MHz.

Please find attached jpeg image of data collected and its fft at 2X20 MHz and 2X30 MHz.

All the readungs are taken under factory set conditions of camera gain and offset. All the readings are taken in dark conditions.

If you observe you would nottice that the amplitude for odd and even pixels are different . And this gives rise to the central peak in the FFT. Also there are some other prominent peaks for data collected at the setting of 2X30 Mhz. And they are fixed for data collected in both dark and bright conditions.This leads me to conclusion that there is an error in internal setting which I am unable to reslove. I tried to change both the gain and offset settings of odd and even pixels. But this didnt resolve the issue.

Please advise how could I find the error source.

Thanks & Regards

Manish

Download All
0 Kudos
Message 3 of 10
(4,978 Views)

It looks like a typical issue that the odd/even gain and offset would fix.  Specifically the offset, if the difference between the odd and even pixels remains the same in light and dark situations.  I am surprised that did not fix it.  I would suggest trying it one more time.  First make the offset very large to make sure that the settings are changing the camera, then try to even it out.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 10
(4,968 Views)

Hi Bruce,

   I have tried to change the odd and even pixel gain and offset. It reduces the height (amplitude) of spikes seen in the FFT but does not eliminate it. Morever the other two peaks that are seen in the FFT of the data, taken at the setting of 2X30 HZ are always present. I dont think those are also due to the odd even pixel gain  and offset setting mismatch cos those peaks are not seen  when I am taking the data at 2X20 HZ.

Could you suggest of any other reason for those peaks to be present.

Thanks & Regards

Manish

0 Kudos
Message 5 of 10
(4,964 Views)
Not off the top of my head.  It is difficult to tell without having the camera to experiment with.  Things like this usually take a bit of trial and error investigation before figuring out what the cause is.
 
How dark is dark?  Is the lens/sensor completely covered, or is the room just fairly dark?  If it is completely covered, the gain may be way too high.  The pixel values should be very close to zero when the sensor is completely black.
 
Is the pattern always the same?  For example, are the even pixels always brighter than the odd pixels, even after restarting the acquisition?  Try plotting the odd and even pixels separately by splitting the array.
 
It might just be something you have to live with.  A while back, I used a camera that had separate gains and offsets for the odd and even lines.  The correction varied with the frame rate, and it was hard to figure out what the best setting was.  I was never happy with the results, but it still did the job it needed to do.  The images just looked a little funny with stripes across them.
 
Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 10
(4,957 Views)

Hi 

    Apart from the problem I have mentioned I have still other issues with camera if you dont mind helping me out of it.

I can set the camera either at internal clock frequency of 2X20 MHz or 2X30 MHz. The camera has 2048 pixels. So  that should mean I would be able to acquire at the rate of (20,000,000/2048 😃 9765  or  (30,000,000/2048 = )14648 lines/second. However the manufacturer specifies I could go upto 28000 lines/second.

Right now the frame grabber I have is PCI 1428 which has range of 20-50 MHz. So how fast would I be able to acquire the linescans. Should my acquisition speed of line scans be constant. However I observe my acquisition speed is not constant. Right now I am using low-level ring acquisition to acquire data continuously.

Could you please guide me if I am going wrong somewhere. Also could you suggest me a link which could give a brief idea on how to control acquistion rate of my camera.

Thanks & Regards

Manish

0 Kudos
Message 7 of 10
(4,954 Views)
Your math is wrong.  You forgot the factor of 2.  At the higher speed, you are reading data at 2x30 = 60 MHz.  When you divide by 2048 pixels, you have a line rate of about 29,000 lines/second.  This is actually faster than what the manufacturer specified.  There is probably a slight delay between lines that brings it down to 28000.
 
Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 8 of 10
(4,936 Views)

Thanks Bruce again for correcting me.

Can I use the frame PCI 1428 (from NI) to run the camera in external clock mode.If yes could you sugggest me a way to do so.

Manish

 

0 Kudos
Message 9 of 10
(4,930 Views)

I am sure you can run it in external clock mode with the 1428, but I don't know the details of how to set it up.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 10 of 10
(4,924 Views)