情节上的实时图像预览

16个视图(30天)
Allison刘
Allison刘 2019年1月23日
评论道: Allison刘2019年2月7日
你好,
我试图绘制几个点的图像预览,但是我的代码返回一个错误“线不能形象的孩子。”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,“波”);
谢谢,
埃里森

接受的答案

安德烈Ursache
安德烈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”,
“线型”,“没有”);
安德烈
1评论
Allison刘
Allison刘 2019年2月7日
是的!这个工作很好,谢谢你。

登录置评。

更多的答案(0)

类别

找到更多的在图像预览和设备配置帮助中心文件交换

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!