Azzera filtri
Azzera filtri

How to mask a region other than region of interest in live video(webcam)

2 visualizzazioni (ultimi 30 giorni)
Hello all. currently, I am working on matlab computer vision program, where a human is detected in live video(webcam) with a region of interest. As I already done with this task but left with masking the region other than the region of interest(ROI) in the live video(webcam). More significantly, the masking process which is done should be in the same videoplayer, but not in other maskplayer. Could anyone please share some ideas or codes which would be helpful to solve this.

Risposta accettata

Image Analyst
Image Analyst il 17 Nov 2016
There are only two regions: the region(s) you're interested in, and the region(s) you're not interested in. If you want to mask out the region that is the region you're not interested in, then complement the mask of the ROI. So for example to mask out (set to zero) the region outside the region of interest, you'd do this:
grayImage(~roiMask) = 0;

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by