필터 지우기
필터 지우기

Impoly to choose all the ROI

조회 수: 1 (최근 30일)
Ann G
Ann G 2015년 10월 2일
댓글: Image Analyst 2015년 10월 6일
Hello! I would like to ask, how can I use impoly to choose all the ROI and not just the polygon that is around it!

채택된 답변

Adam
Adam 2015년 10월 2일
편집: Adam 2015년 10월 2일
mask = createMask( hROI, hIm );
should give you a binary mask for the region, where hROI is your impoly and hIm is the handle of image on which it was drawn.
  댓글 수: 5
Ann G
Ann G 2015년 10월 6일
Thank u for your help but unfortunately i still have a problem because i dont want a mask. Using mask as a return I get 0s and 1s and I need the elements of the ROI as they are!
Image Analyst
Image Analyst 2015년 10월 6일
This will apply the mask to the original image to erase the original pixels everywhere outside the mask:
% Initialize output to be same as input.
maskedImage = grayImage;
% Now erase pixels outside the mask.
maskedImage(~mask) = 0;

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by