Image Acquisition Camera - High Speed - Fast Capture

Hello,
I am using Matlab 2012 with Image Acquisition Toolbox 2012.
I am using a generic webcam (Logitech Sphere AF) with the command
frame=getsnapshot(obj);
for image capture with the following default properties:
% % Device Specific Default Properties:
% BacklightCompensation = on
% Brightness = 128
% Contrast = 32
% Exposure = -7
% ExposureMode = auto
% Focus = 0
% FocusMode = auto
% FrameRate = 30.0000
% Gain = 0
% HorizontalFlip = off
% Pan = 0
% Saturation = 32
% Sharpness = 224
% Tilt = 0
% VerticalFlip = off
% WhiteBalance = 4000
% WhiteBalanceMode = auto
I am trying to find a faster camera model and property settings, if possible on a usb connection.
Does anyone have any suggestions for a specific camera model and associated manually configured properties settings for maximum frame capture speed?
Best, Jeremy

 Accepted Answer

Thomas
Thomas on 23 Feb 2013
Edited: Walter Roberson on 23 Feb 2013
Jeremy,
We use the Thorlabs CMOS camera and get frame rates of several hundred Hertz using mex files, for regions of interest of 32 x 32 pixels. There is some memory management involved, and we use separate mex files for opening the camera (once per session), grabbing a frame, and closing the camera (once per session). We also have a mex file for setting the pixel clock, the exposure, and the frame rate. I don't promise it will work for you, but I've posted the files for the time being here, along with the code required to create the mex files and a demo m-file that tests it all out.
By the way, we also do SLM compensation through scattering media! Good luck.

7 Comments

I have problem about this post; EXACTLY how should i run the mentioned codes? I installed camera’s driver and package & Microsoft Visual C++ (2005/2008/2010 redistributed edition), but i can’t connect the camera to matlab. What is routine way to run these codes? We use matlab 2011a, a thorlabs DCC1545M camera (USB2), and want to capture image in matlab or maybe have live view. It is essential to control camera parameters. I would be thankful for any helps.
Hi Thomas, thank you for posting that code. I have my camera up and running. I had some issues with compiling the mex which I think was linked to a 32 vs 64 bit problem. I solved this by replacing the uc480.lib with uc480_64.lib from the Thorlabs software instillation and replacing the mex calls with uc480_64.lib.
Hi everyone
Thanks to Thomas for those files. Although I managed to compile and run code, but it seems to be super slow (~0,6 Hz). My camera is a thorlabs DCC3240 and I think some parameters have changed. I am troubleshooting right now but I have not too much experience. Which you think I should check or what parameters should I check in the mexfiles? I understand it is hard to answer but any feedback would be appreciated.
Hi Thomas, could you upload the file again as I cannot download it now ? The server is under maintenance. I am trying to figure out how to use my Thorlabs Camera DCC1545M with Matlab but Matlab doesn't seem to recognise the camera. I could capture videos and images using Thorcam though. Any help would be really appreciate !! Thank you
I cannot find the thorlabs_cam.zip. Can it be re-uploaded or does anyone have it since I need an example to help me set up the camera Thanks
i would be interested in this file also
Chris Stockbridge mentioned a File Exchange contribution; did you give that a try?

Sign in to comment.

More Answers (4)

All of the files for working with the Thorlabs DCx series of cameras can now be found on the MATLAB file exchange here: Thorlabs DCx
Your question is a little vague, but I think that this example should help you out.
Thank you for your response,
I am imaging the speckle pattern of light scattered through tissue from the beam output of a spatial light modulator for an adaptive optics experiment.
The modulator is controlled by an lcd with a frame rate of ~60Hz. I am trying to setup frame capture at this speed (~60Hz ; elapsed time 0.05 sec) or faster if possible. The decorrelation time constant for the tissue is 3-4secs so every little bit helps.
One option is to buy a Thorlabs DCC1545M and play with the mex interface(from previous thread below)
which is tricky but should enable optimization of device properties to achieve a faster frame rate.
I am searching for some specific cmos usb devices which have been shown to work with Matlab that have faster hardware performance than the above devices.
Jeremy

Asked:

on 11 Feb 2013

Commented:

on 5 Jan 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!