Plot on top of a Live Image Preview
Hello,
I am trying to plot a few points on top of a live image preview, but my code returns an error of “Line cannot be a child of Image.” 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 = image(zeros(imHeight1, imWidth1, nBands1), 'Parent', handles.axes1);
preview(handles.vid1, hImage);
plot(hImage, 250, 300, 'bo');
Thanks,
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
This approach might work for you:
vid = videoinput('winvideo', 1);vidInfo = imaqhwinfo(vid);vidRes = vid.VideoResolution;
imWidth = vidRes(1);
imHeight = vidRes(2);
numBands = vid.NumberOfBands;hFig = figure;
hAxes = axes(hFig);
hImage = image(hAxes, zeros(imHeight, imWidth, numBands, vidInfo.NativeDataType));preview(vid, hImage);
SEE COMPLETE ANSWER CLICK THE LINK