selecting shapes out of image

5 ビュー (過去 30 日間)
Mammadbaghir Baghirzade
Mammadbaghir Baghirzade 2020 年 7 月 19 日
編集済み: Mammadbaghir Baghirzade 2020 年 11 月 10 日
Hi all,
I have an attached image, and I aim to automatically select all (or most of them) the white small shapes/polygons from the image.
Currently, I select those shapes by hand one by one using "imdistline" tool which is tedious (The output is in the 2nd attached image below. One can see the selected shapes below).
My aim is first to select those small polygons automatically (not selecting by hand at each time) and then getting and saving their coordinates.
I believe that, this is shouldn't be that easy since there are some noise in the image and not all the shapes are perfectly closed.
My question is, if such thing is doable via Matlab?
Thank you
Regards

採用された回答

Image Analyst
Image Analyst 2020 年 7 月 19 日
You probably made a mistake by doing an edge detection. A given shape has hundreds of pixels in it. How do you want the coordinates? A list of all row,column locations for everything in the shape? Why? What are you going to do with that.
For what it's worth, see my attached demo.
  6 件のコメント
Image Analyst
Image Analyst 2020 年 11 月 10 日
No, but we'd be interested in knowing what method you used. Usually I hear that the method of looking at distances from centroids to perimeter and finding peaks in that signal to find vertices is a pretty reliable method, and I gave a demo for that. So what algorithm did you end up using instead?
Mammadbaghir Baghirzade
Mammadbaghir Baghirzade 2020 年 11 月 10 日
編集済み: Mammadbaghir Baghirzade 2020 年 11 月 10 日
It was the watershed method, and I have just seen and recalled that it was your suggestion. Since it was a while, I thought I have accepted answer, and I really did. Thank you for reminding me, and I am re-accepting it now.
P.S. I've removed my recent comment as well.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by