Creating masks for objects in an image

조회 수: 1 (최근 30일)
Stewart Tan
Stewart Tan 2019년 9월 3일
댓글: Image Analyst 2019년 9월 3일
I've seen some people who managed to create a mask for objects in an image and I would like to know how it's done. For example, below:
horses_copy.png
horses_gt_r0_gcs500.png
Where four horses are selected and masked as such, where the shapes are very well preserved. Could anyone explain how it's done or is there any matlab functions that allow me to do so?
  댓글 수: 2
Matt J
Matt J 2019년 9월 3일
Are you looking for an automatic segmentation method, or would a manual boundary tracing tool be enough?
Stewart Tan
Stewart Tan 2019년 9월 3일
편집: Stewart Tan 2019년 9월 3일
@Matt J I guess the manual boundary tracing tool? Also, i forgot to mention that i have the coordinates of the blocks where the regions are similar which are the horses. Sorry bout the confusion.

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

답변 (1개)

Image Analyst
Image Analyst 2019년 9월 3일
Try the Color Thresholding App in HSV color space. Get everything with blue as one mask. Then make another mask with stuff with low saturation to get the building. Clean up each mask with imfill(), bwareafilt(), or bwareaopen() if needed. Then OR the two masks together and invert. You should be left with the horses.
  댓글 수: 2
Stewart Tan
Stewart Tan 2019년 9월 3일
편집: Stewart Tan 2019년 9월 3일
@Image Analyst thanks but this image with horses isn't the only one I'm working with. What i do have in possession are the coordinates of blocks of the image that are similar. Is the manual boundary tracing tool that is suggested above used in this case?
Image Analyst
Image Analyst 2019년 9월 3일

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

Community Treasure Hunt

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

Start Hunting!

Translated by