Filter löschen
Filter löschen

getsnapshot - Dark image compared to Fly Cap

2 Ansichten (letzte 30 Tage)
Pascal Pucher
Pascal Pucher am 19 Jan. 2022
Bearbeitet: Bhanu Prakash am 23 Jan. 2024
I've got a problem while using getsnapshot to automatize my image acquisition instead of using PointGrey FlyCap.
All I do is intializing my device and setting all the cam settings I want to have.
This is the Image that is provided by Fly Cap:
And it is of course the image I want to have. When i try to get a picture, with the same device and the same setting via Matlab getsnapshot, this will be the result:
Do I miss any settings?
The values i modify are: Brightness, Exposure, Sharpness, Gain, Gamma, FrameRate(15) and Shutter. But as I said i modify them to be smiliar to Fly Cap. Of course I change the Mode to 'manual' for every of the mentioned settings.
Anybody who could help?

Antworten (1)

Bhanu Prakash
Bhanu Prakash am 23 Jan. 2024
Bearbeitet: Bhanu Prakash am 23 Jan. 2024
Hi Pascal,
As per my understanding, you are facing an issue when you capture an image using the ‘getsnapshot’ function in MATLAB.
This is likely because of a digital artifact with your hardware. The first couple of frames provided by some hardware devices, especially webcams and video cards, may be of low quality and may appear as a dark image .
This artifact can be a result of the image sensor not having warmed up or the device just being started.
You can try the following options while capturing the image:
  • When using the ‘getsnapshot’ function, keep the preview window running to avoid starting up the device and to maintain an active image stream.
  • You can skip the starting frames (appearing as a dark image) after the device is triggered, using the ‘TriggerFrameDelay’ function in MATLAB as follows:
% Number of image frames to acquire.
N = 10;
% Access the device.
vid = videoinput('winvideo');
% Skip the first few frames after the device is %triggered.
set(vid, 'TriggerFrameDelay', 3);
% Configure the number of frames to acquire.
set(vid, 'FramesPerTrigger', N);
% Start the acquisition and have it trigger %immediately. Then access the data.
triggerconfig(vid, 'Immediate');
start(vid)
data = getdata(vid);
For more information on the ‘TriggerFrameDelay’ function, kindly refer to the following documentation:
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by