Matlab Image Acquisition Problem

  • Context: MATLAB 
  • Thread starter Thread starter matheyrichs
  • Start date Start date
  • Tags Tags
    Image Matlab
Click For Summary
SUMMARY

The discussion centers on resolving exposure time settings for image acquisition using Matlab with an AVT Pike-032B CCD camera via the CMU 'dcam' library. The user successfully initializes the camera and captures images but struggles to set specific exposure times. The solution involves accessing device-specific parameters through the videoinput object and modifying properties such as 'Shutter' and 'ShutterMode' to achieve manual control over exposure settings.

PREREQUISITES
  • Familiarity with Matlab programming and syntax.
  • Understanding of the AVT Pike-032B CCD camera specifications.
  • Knowledge of the CMU 'dcam' library functionalities.
  • Experience with video input objects in Matlab.
NEXT STEPS
  • Explore Matlab's videoinput object documentation for advanced features.
  • Research the CMU 'dcam' library for additional camera control options.
  • Learn about device-specific parameter settings in Matlab for other camera models.
  • Investigate automation techniques in Matlab for sequential image acquisition with multiple light sources.
USEFUL FOR

Researchers and engineers working with laser microscopy setups, Matlab users involved in image processing, and anyone looking to optimize camera control for scientific imaging applications.

matheyrichs
Messages
20
Reaction score
0
I'm working on a laser microscopy setup and am having issues with Matlab image acquisition. I'm using an AVT Pike-032B CCD camera that is a 1394 camera. Most importantly, I'm interfacing to it using the CMU 'dcam' library, which provides pretty nice control through a program "1394 Camera Demo".

The camera does indeed work in Matlab, using the following lines to initialize and capture:
> vidobj=videoinput('dcam',1);
> snapshot=getsnapshot(vidobj);
> imagesc(snapshot);

However, I am not able to find a command or parameter that specifically sets the exposure time for the frame capture or shutter speed. It seems as if one of the properties of the triggering should be able to do this.

Does anyone know if it's possible, and if so how, to trigger a camera through the dcam driver for a specific exposure?

The Motivation: I've got 2 lasers at different intensities that are coupled into my microscopy system. My plan is to automate the system such that one laser turns on, two images are acquired, and then the other laser turns on (the first turns off), and two more images are snapped. rinse, rinse, repeat. Unfortunately, the laser sources are different enough power levels that with the auto-shutter on (as it seems to be right now), it takes a couple captures for the exposure level to set properly. I need to be able to specify an exposure time that will look good on the first capture for each laser.

Thanks!
 
Physics news on Phys.org
I've found the answer to my question. In case anyone else has similar issues:

You've got to get to the Device Specific Parameters. This is accessed by 1) creating a videoinput object; 2) creating a source object attached to the video input; and 3) asking nicely :p. See below:

vidobj=videoinput('dcam',1);
src=getselectedsource(vidobj);
get(src)

** this returns something like:
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = input1
Tag =
Type = videosource

Device Specific Properties:
AutoExposure = 125
Brightness = 16
Gain = 0
GainAbsolute = 0
GainControl = relative
GainMode = auto
Gamma = 0
NormalizedBytesPerPacket = 256
Shutter = 2289
ShutterMode = manual

At this point, simply use:

set(src,'PROPERTY TO CHANGE',NEW VALUE);le fin
 

Similar threads

  • · Replies 152 ·
6
Replies
152
Views
11K