How can I complete one of these two rectangles? I want to use it as mask for RGB image.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Oveis Hassanijalilian
am 10 Nov. 2014
Kommentiert: Oveis Hassanijalilian
am 10 Nov. 2014
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 10 Nov. 2014
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!