Borrar filtros
Borrar filtros

MATLAB camera gives dark image.?

1 visualización (últimos 30 días)
Nimisha
Nimisha el 5 de Abr. de 2016
Comentada: Image Analyst el 23 de Abr. de 2016
clear all;clc
a = imaqhwinfo;
[camera_name, camera_id, format] = getCameraInfo(a);
vid = videoinput(camera_name, camera_id, format);
set(vid, 'ReturnedColorSpace', 'RGB');
%vid = videoinput('winvideo',1, 'YUV2_1280x720')
img = getsnapshot(vid);
When i capture image from this writtern code, it captures image immediately, and not giving time for camera to set its resolution and image seems black and dark.
How to give some time to camera for waiting to capture good image..?

Respuestas (1)

Image Analyst
Image Analyst el 5 de Abr. de 2016
Either set the exposure:
src = getselectedsource(vidobj);
src.Exposure = newValue; % Make it higher for brighter images.
Or open up the iris diaphragm, if the camera lens has one.
  4 comentarios
Nimisha
Nimisha el 23 de Abr. de 2016
i did not know what is the code syntax to change frame rate
Image Analyst
Image Analyst el 23 de Abr. de 2016
Try
src.FrameRate = 10;
or whatever you used. Maybe you called it input1 instead of src, if so use input1.FrameRate = 10.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by