情节上的实时图像预览
16个视图(30天)
显示旧的评论
你好,
我试图绘制几个点的图像预览,但是我的代码返回一个错误“线不能形象的孩子。”Does anyone know of a way to plot on top of a Live Image, similar to the imageMarker function?
vidRes1 = handles.vid1.VideoResolution;
imWidth1 = vidRes1 (1);
imHeight1 = vidRes1 (2);
nBands1 = handles.vid1.NumberOfBands;
hImage =图像(0 (imHeight1, imWidth1 nBands1),“父”,handles.axes1);
预览(处理。vid1 hImage);
情节(hImage, 250, 300,“波”);
谢谢,
埃里森
0评论
接受的答案
安德烈Ursache
2019年2月1日
艾莉森,
这种方法可能为你工作:
vid = videoinput (“winvideo”1);
vidInfo = imaqhwinfo (vid);
vidRes = vid.VideoResolution;
imWidth = vidRes (1);
imHeight = vidRes (2);
numBands = vid.NumberOfBands;
hFig =图;
hax =轴(hFig);
hImage =图像(hax 0 (imHeight、imWidth numBands, vidInfo.NativeDataType));
预览(vid hImage);
线=线(hax轮([0.25 * imWidth, 0.75 * imWidth]),…
轮([0.5 * imHeight, 0.5 * imHeight]),…
“标记”,“o”,…
“线型”,“没有”);
安德烈