how to insert rectangle to a video preview

5 visualizaciones (últimos 30 días)
Thushar Praveen
Thushar Praveen el 27 de Abr. de 2017
im using my webcam to take an image of the user. I want to insert a rectangle to the video preview so that user can put his face within that boundary. I'm using the following block of code. But not getting any rectangle on video preview.
cem=webcam('Lenovo EasyCam');
preview(cem);
pause();
img=snapshot(cem);
hold on
thisBB = [10 10 300 300];
rectangle('Position',[thisBB(1),thisBB(2),thisBB(3),thisBB(4)],'EdgeColor','r','LineWidth',2 );

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by