Creating masks for objects in an image
14 ビュー (過去 30 日間)
古いコメントを表示
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:


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
2019 年 9 月 3 日
Are you looking for an automatic segmentation method, or would a manual boundary tracing tool be enough?
回答 (1 件)
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 件のコメント
Image Analyst
2019 年 9 月 3 日
You might try this: https://www.mathworks.com/matlabcentral/fileexchange/37197-dem-diffused-expectation-maximisation-for-image-segmentation
Or try segnet if you have the Deep Learning Toolbox.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!