Remove artefact when dilating Image

2 ビュー (過去 30 日間)
Jason
Jason 2017 年 1 月 10 日
コメント済み: Jason 2017 年 1 月 16 日
Hi. I have a hexagonal grid that I have managed to locate the location of the maximum in each feature (with the kind help of Walter & I.A)
I next want to use these locations to then get the weighted centroid to be more accurate.(i.e. use them as seeds)
But to prepare for RegionProps, I create binary image that I dilate slightly:
se = strel('disk',2);
binary=imdilate(binary,se,'same');
This works except for a little artifact shown by the redline.
I really need at least 1 pixel perimeter round the seeding locations to ensure I can perform a weighted centroid calc, but the artefact treats the 2 joined objects as one and its centroid is incorrectly position in the middle of the two blobs.
Is there away where I can break up the joined blobs but still retain enough pixels to allow centroid calc.
Thanks for any help Jason
  1 件のコメント
Jason
Jason 2017 年 1 月 13 日
anyone?

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

回答 (2 件)

Changoleon
Changoleon 2017 年 1 月 13 日
編集済み: Changoleon 2017 年 1 月 13 日
So what's the problem? that two objects are connected to each other? if yes, use the function imopen.
What it will do is it will erode the image first with a certain limit (you chose this limit) and then will dilate it again. The tiny part which is making two objects as one, will be removed
  1 件のコメント
Jason
Jason 2017 年 1 月 16 日
Hi, Im not able to use any SE in imopen to get this to work. Are there any other suggestions please.
Thanks

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


Image Analyst
Image Analyst 2017 年 1 月 16 日
  1 件のコメント
Jason
Jason 2017 年 1 月 16 日
Thanks. Will take a look

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

Community Treasure Hunt

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

Start Hunting!

Translated by