Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

High frame rate image acq (400fps) for 5sec, and adding time on the picture.

ok, what I want to do is, I think, very basic, regarding the image acquisition card I have bought (PCI-1422). My camera is a high-speed type. It can handle 125fps for a window 684x484, but I reduce the window to 200x484(through MAX NI-IMAQ device parameters, and save them) and I should be able to reach 400fps.

My acquisition will be triggered started, and after the trigger is sent, I have to keep the 400fps rate, that is a constant "grab" or "sequence" (no matter how NI named that) of 2.5 msec between each frame.

I have 2 concerns:

1: How do I actually do this constant grabbing (or sequence) and be sure that the frame rate is 400fps (or that each frame is taken every 2.5msec). Obviously, the computer will not be able to save the file in that 2.5msec slot, so frames will have to be kept in memory somehow and "downloaded" to the hard drive after the acquisition. Acquisition will be as long as 5 or 6 sec. (longer would be better, but I think I will need lots of memory). So how to program that in Labview? (constant grabbing, with downloading to file once it's complete). The trigger starting is not a problem for programming, I just don't know how to use the labview icons to specify a constant grabbing rate, and keep that in memory, than access that memory (and be sure each frame will be accessed in the ordered it has been taken.

2: I want to add the time that each picture has been taken on each picture. Starting with a time of 0 for the 1st one, and 0.0025, 0.005, and so on for the following. How do add this number to the picture? It should be pretty easy, but I don't know how...

My main concern is the 1st one. I am affraid I can't control the frame rate using the grab or sequence technics shown in the LL examples. I just only specified the number of buffers, than I start the acquisition. So how do I specify the frame rate, and how can I be sure it will be the fps specified (can I "track" this somehow?)?

If the frame rate is too high, I can reduce it a bit, like 350fps or so. From now, I just want to know how to do it, than I'll adjust if the computer can't handle it (that's why I want to "track" the real frame rate the computer will do).

thanks
0 Kudos
Message 1 of 17
(5,084 Views)
Hi,
I did in the past something similar. But you will have to adjust the details with NI yourself.
I don’t have this hardware any more so I can’t check my code for that.
I have used counter board from NI to generate the acquisition signals.
I use 2 counters.
The camera and frame grabber is in trigger acquisition mode.
The first counter generate ramp signal to enable the acquisition after programmable delay.
The second counter generates the acquisition pulses in constant frequency (programmable as well).
This way you are going to get accurate timing for your acquisition start point and frame rate.

Other way is to run the camera in maximal speed of the board. But I don’t think you can get accurate timing this way.
Maybe you can use the on board counters for generating the signals. You have to clarify this with NI.

Have Fun,
Amit Shachaf,
0 Kudos
Message 2 of 17
(5,069 Views)
Thanks Amit,

I would be happy to have the guidance of a NI engineer. Any one? a VI exemple would be truly appreciated.

Regards,

Mathieu Fregeau
0 Kudos
Message 3 of 17
(5,064 Views)
To whom it may concern:

I just wanted to let you know about some of the numbers that I have put together in analyzing this. 200*480 pixels*400 fps = 38.4 MHz. pixel clock. This is within the bounds of the 1422 board. In order to minimize the amount of overhead that could lead to missing images or slackening your frame rate, I'd suggest that you don't extract and display the images till the acquisition is complete. Just configure 2000-2400 buffers (5 or 6 s. of 400 fps). You'll have to go into MAX and select Tools-->IMAQ--> and then increase the max numbers of buffers that can be configured on your system. 2400 buffers at 200*480 pixels (at 1 Byte per pixel) requires 230.4 MB of memory. This would be limited by your RAM capacity.

As far as the overlay, you'd just have to configure a text overlay. If you save the file along with its associated roi, overlay, etc., information, then you won't have to do a destructive overlay. If you would prefer to do the destructive overlay, though, you'd have to call that VI and it will actually alter the pixel values where you've overlaid text and then the information will automatically be included in the image.

I've demonstrated some of this in a VI which I'm attaching to this post. Hope it is helpful to you. Best of luck...

Jim Laudie
Applications Engineer, National Instruments
0 Kudos
Message 4 of 17
(5,051 Views)
Thank you Jim,

your exemple seems to work fine, but I don't know how to specify a particular frame rate for the acquisition. The acquisition just start, your exemple compute and return the actual frame rate, but how can I specify the one I want (and so try if 400 works, and reduce it if, per exemple, my exposure time is too short, and find the right frame rate for the best images at high speed). And by the way what is the frame timeout? I can change this parameter, but is that the parameter I use to specify the fps (using fps=1/frametimeout). My camera is a Redlake ES310T with a "built in" 125fps max rate for 680x480 window. Reducing the window to 200x480 should allow me to increase the frame rate, but how to specify that through labview?

Adding text is working fine, thanks.

I truly appreciate your help.

Regards,

Mathieu Fregeau
0 Kudos
Message 5 of 17
(5,053 Views)
You are in luck. I did some extensive work using the ES310T to get higher frame rates. For the application I developed, our target was 250 fps. I have attached an icd file that will accomplish this. You will need to do some research to get higher frame rates, but this should get you started.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 17
(5,042 Views)
Mathieu,

Bruce's camera file should do the trick for you. It just so happens that you have one of those few cameras that will allow you to alter the frame rate. What usually happens with digital cameras is that you have to alter the acquisition window (not the main acquisition window property in the camera file: this refers to the way NI-IMAQ interprets the image...but through some call to the camera to only read certain pixels from the whole CCD and thus increase its frame rate) on the CCD. Not all cameras even offer this as an option. But your camera does indeed allow the flexible frame rate. You'll have to install Bruce's camera file in your ...\National Instruments\NI-IMAQ\Data folder and then select that camera file from MAX when pointing at the channel under your board in Devices and Interfaces. Then, when you open a session to the camera, you'll have access to the attributes, etc., contained in the camera file. In order to set that frame rate attribute, you'll have to call the IMAQ Set Camera Attribute.vi.

Hope this is helpful. Bruce, I was searching around online for a user manual for this camera and was unsuccessful...do you or Mathieu have any idea where I could see that? I just wanted to see if it explicitly tells you how to send proper serial commands for those higher frame rates. Or if you were just assuming the format, Bruce... I'm sure it works. I just wanted to see if they explicitly describe how to get frame rates even higher than the 250 fps.

Thanks,

Jim Laudie
Applications Engineer, National Instruments

P.S. Glad to hear that the overlay is working for you...
Message 7 of 17
(5,026 Views)
ok, thanks for the camera file (though it's not from the same camera maker and some commands are not recognized so I can't make use of it). However, this gives me a good idea how to proceed. I guess I have to adjust the ROI (region of interest), window size and the block read out, block start and stop. Do you have an idea where can I have explanations of what are those parameters (block read out mode, block start, block stop)? I mean more than saying that it's the way to increase the frame rate... I want to know what the block read out is; examples of a custom frame rate adjustment would be appreciated in that case...(and a schematics of what is the block read out on a window or region of interest..) I have the user manual of the camera with the commands. I need to know how the parameters are inter-linked with the frame rate to modify the config file. It seems I could even go to 800fps with a small region of interest. Please, if you know a good web site or if you have docs that explain camera's settings, window's size, block read-out, etc. with examples/schematics, I would appreciate to access it.

Thank you for your assistance.

Best regards,

Mathieu Fregeau
0 Kudos
Message 8 of 17
(5,021 Views)
I'm surprised that some commands are not recognized. Redlake bought the ES310T from Kodak, with a few intermediate steps, so it should be the same camera.

I think I found a manual online somewhere and figured out the serial commands to get what I needed. By testing different methods, I figured out the best way to do it.

Unfortunately, this camera was discontinued about 1 year ago.

You might want to consider the Basler A602f firewire camera. That is what I selected to replace the ES310T, and I like it a lot. You can get frame rates up to 1000 fps or even higher, and it is really easy to control.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 9 of 17
(5,013 Views)
Hi Bruce,

I have been able to use your file. After choosing the frame rate 250fps through MAX and saving it, I made some test in a labview VI to grab 250 frames with a stop watch in front, it takes 2 seconds while it should take 1 second. This means the frame rate is still at 125fps. The parameters that are settled in the config file does not double the frame rate from 125 to 250. So the question is:

How to set the config file to acquire more frame rate than the default maximum frame rate of the camera (with the ES 310T, that is possible). The user manual state it is possible to increase the fps by reducing the window size (acquired number of pixels) but does not explain how to set up the other parameters (alternate row select, block readout/stop/start, etc.)

Anybodies' answer will be very helpful.

Best regards,

Mathieu Fregeau
0 Kudos
Message 10 of 17
(4,999 Views)