フィルターのクリア

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 Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by