필터 지우기
필터 지우기

How to show video in axes for MATLAB Gui

조회 수: 3 (최근 30일)
Jia Zhen
Jia Zhen 2015년 3월 31일
댓글: JOVEL JOSE 2015년 6월 12일
Hi, I wish to show the video for eye detection in GUI using the vision.CascadeObjectDetector('EyePairBig') by the following code
if true
EyeDetect = vision.CascadeObjectDetector('EyePairBig');
obj = imaq.VideoDevice('winvideo',1,'YUY2_640x480');
set(obj,'ReturnedColorSpace','rgb');
figure('menubar','none', 'tag', 'webcam');
while(true)
frame=step(obj);
bb=step(EyeDetect,frame);
IEye=insertObjectAnnotation(frame,'rectangle',bb,'Eye');
imshow(IEye,'border','tight')
f=findobj('tag','webcam');
if(isempty(f))
break
end
pause(0.05)
end
release(obj)
end
However i am stuck as from previous examples to preview video in gui i need to use this code
if true
handles.output = hObject;
axes(handles.axes1);
vid=videoinput('winvideo', 1, 'YUY2_640x480');
himage=image(zeros(640, 480, 3),'parent', handles.axes1);
preview(vid,himage);
end
What should i use to make the eye detection function and show onto the axes?
  댓글 수: 1
JOVEL JOSE
JOVEL JOSE 2015년 6월 12일
While creating your gui just add an extra axes Matlab automatically recognizes the axes and add the video to that axes

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by