How can I complete one of these two rectangles? I want to use it as mask for RGB image.
1 回表示 (過去 30 日間)
古いコメントを表示
採用された回答
Image Analyst
2014 年 11 月 10 日
Use bwconvhull();
% Get convex hull of mask.
mask = bwconvhull(mask);
% Mask the image using bsxfun() function
maskedRgbImage = bsxfun(@times, rgbImage, cast(mask, class(rgbImage)));
You can use ~mask in the cast() if you want the inverse of the mask.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!