Background and Foreground separation.
5 ビュー (過去 30 日間)
古いコメントを表示
I try to separate the foreground and background picture. The picture is two people are standing by the sea. How to separate the back ground and foreground. I use the color threshold but I got confused.Please help me out.
4 件のコメント
Image Analyst
2020 年 6 月 15 日
And what is background and what is foreground? The beach, the sea, the people, the sky?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/316488/image.jpeg)
回答 (1 件)
Image Analyst
2020 年 6 月 28 日
Try this to mask your image
% Mask the image using bsxfun() function to multiply the mask by each channel individually. Works for gray scale as well as RGB Color images.
maskedRgbImage = bsxfun(@times, rgbImage, cast(mask, 'like', rgbImage));
参考
カテゴリ
Help Center および File Exchange で Image Processing and Computer Vision についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!