what code i will write to capture image from camera open in axes1
Show older comments
function cameraex_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. handles.output = hObject; vid=videoinput('winvideo',1); set(vid,'ReturnedColorSpace','rgb'); vidRes=get(vid,'VideoResolution'); width=vidRes(1); height=vidRes(2); nBands=get(vid,'NumberOfBands'); hImage=image(zeros(height,width,nBands)); axes(handles.axes1); %axes(handles.axes1); preview(vid,hImage)
"This code open camera in axes1 now i want to capture image on click pushbutton1. what will code on pushbutton."
1 Comment
Anshika Jain
on 15 Sep 2018
Edited: Anshika Jain
on 15 Sep 2018
Answers (0)
Categories
Find more on MATLAB Support Package for USB Webcams in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!