필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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.

채택된 답변

Image Analyst
Image Analyst 2016년 11월 17일
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;

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by