フィルターのクリア

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

2 ビュー (過去 30 日間)
nithin birudurat
nithin birudurat 2016 年 11 月 17 日
回答済み: Image Analyst 2016 年 11 月 17 日
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