MATLAB camera gives dark image.?
조회 수: 3 (최근 30일)
이전 댓글 표시
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..?
댓글 수: 0
답변 (1개)
Image Analyst
2016년 4월 5일
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
Image Analyst
2016년 4월 23일
Try
src.FrameRate = 10;
or whatever you used. Maybe you called it input1 instead of src, if so use input1.FrameRate = 10.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!