필터 지우기
필터 지우기

How can I complete one of these two rectangles? I want to use it as mask for RGB image.

조회 수: 2 (최근 30일)

채택된 답변

Image Analyst
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 CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by