필터 지우기
필터 지우기

how to draw an updating rectangle object on a video stream ?

조회 수: 2 (최근 30일)
Steven
Steven 2012년 11월 9일
Hi there,
I am beginninger of matlab. I tried myCameraGUI example which build up a simple camera preview inferface. My question is I cannot find a way to draw a updating rectangle object on the top of streamed video. I do have tried many times, but fail in the end. Does anyone know how to do that? Any direction, webpage, or even a function would be appreciated. Thank you.
Steven

채택된 답변

Image Analyst
Image Analyst 2012년 11월 9일
It's possible to have graphics in the overlay above your live video. Did you call the preview() function to get live video, and then call plot() to plot your box?
  댓글 수: 3
Image Analyst
Image Analyst 2012년 11월 9일
You need two x and two y, not one. Try calling line just like this
axes(handles.cameraAxes);
hold on;
line([x1 x2], [y1 y2]);
Steven
Steven 2012년 11월 9일
편집: Steven 2012년 11월 9일
Could I ask you a question further? Say I'd like to process the input video frame by frame, and base on each frame that I get from the source camera I calculate the box and then update the box that I originally ploted on the video, what is best way of doing this in terms of system performance? Could you please recommand me a few functions that could do this. thanks a lot

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by