Matlab Image Acquisition Problem

  • MATLAB
  • Thread starter matheyrichs
  • Start date
  • Tags
    Image Matlab
In summary: , in summary, the camera can be initialized and captured by using the following lines:> vidobj=videoinput('dcam',1);> snapshot=getsnapshot(vidobj);> imagesc(snapshot);
  • #1
matheyrichs
20
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
  • #2
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
 
  • #3


I understand the importance of precise control in experiments and the need for specific parameters to be set in order to achieve accurate results. It seems like you have already made some progress with using the AVT Pike-032B CCD camera and the CMU 'dcam' library in Matlab. However, I can understand the frustration of not being able to find a command or parameter to set the exposure time for your frame captures.

After doing some research, it seems like the 'dcam' library does have a function called "dcamprop" which allows you to access the camera's properties and settings. You may want to try using this function to see if you can find a specific property that controls the exposure time or shutter speed.

Additionally, you may want to consider reaching out to the manufacturer of the camera or the developers of the 'dcam' library to see if they have any suggestions or solutions for your specific setup and needs. They may be able to provide you with more detailed information or guidance on how to achieve the desired exposure time for your images.

I hope this helps and wish you success in your laser microscopy experiments. Keep exploring and experimenting, and I'm sure you will find a solution that works for your specific setup.
 

1. What is Matlab Image Acquisition Problem?

Matlab Image Acquisition Problem refers to any issue or difficulty encountered when using Matlab to capture or acquire images from a camera or other image capturing device.

2. How do I troubleshoot Matlab Image Acquisition Problem?

To troubleshoot Matlab Image Acquisition Problem, you can try checking your camera or device settings, making sure the device is connected properly, updating your drivers, and checking for any errors or warnings in the Matlab command window.

3. Why am I getting an error message when trying to acquire images with Matlab?

There could be several reasons for this, such as incorrect device settings, connection issues, or compatibility issues with your camera or device. It is important to carefully check your code and settings to identify the source of the error.

4. How can I improve the performance of Matlab Image Acquisition?

To improve the performance of Matlab Image Acquisition, you can try using a faster computer, optimizing your code, reducing the resolution or frame rate of your images, and closing any unnecessary applications that may be using system resources.

5. Can I use Matlab Image Acquisition with any type of camera or device?

Matlab Image Acquisition is compatible with a wide range of cameras and devices, including webcams, digital cameras, and industrial cameras. However, it is important to check the compatibility of your specific camera or device with Matlab before attempting to use it for image acquisition.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Replies
152
Views
5K
Back
Top