Two image handles using setappdata in a Matlab GUIDE GUI
조회 수: 3 (최근 30일)
이전 댓글 표시
So I created a GUI with one axis, three push buttons and 6 static text fields. Im referring to this example: https://de.mathworks.com/help/imaq/previewing-data.html?s_tid=gn_loc_drop.
My problem is that Im using two gige cameras which means that I need two image handles "hImages" 1 and 2.
This is what I think that I have to use:
vidRes = handles.vid1.VideoResolution;
imWidth = vidRes(1);
imHeight = vidRes(2);
nBands = handles.vid1.NumberOfBands;
hImage1 = image(zeros(imHeight,imWidth,nBands));
vidRes = handles.vid2.VideoResolution;
imWidth = vidRes(1);
imHeight = vidRes(2);
nBands = handles.vid2.NumberOfBands;
hImage2 = image(zeros(imHeight,imWidth,nBands));
setappdata([hImage1, hImage2],'UpdatePreviewWindowFcn',@mypreview_fcn);
setappdata(hImage1,'HandleToTimestampLabel',handles.text1);
setappdata(hImage1,'HandleToResolutionLabel',handles.text2);
setappdata(hImage1,'HandleToStatusLabel',handles.text3);
setappdata(hImage2,'TimestampLabel',handles.text9);
setappdata(hImage2,'ResolutionLabel',handles.text8);
setappdata(hImage2,'StatusLabel',handles.text7);
Is this possible or is there even a better way to do so?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 GigE Vision Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!