How to merge nearest boudingbox from regionprops in matlab

2 ビュー (過去 30 日間)
Vortana
Vortana 2014 年 1 月 9 日
回答済み: Thou Raya 2019 年 2 月 26 日
I am a newbie in Matlab.
I have an image, let's say,
I want to do segmentation all the objects from the image, coin and text.
I can get all the object using Bounding box of regionprops; I could get coins and each characters.
*However, what I want is not each characters but if the characters are near to each other let say '7 AU' I want to get a boundingbox of this so I could crop an image 7 AU.
What I think right now is to merge the bounding box of the nearest object or characters.*
Maybe there are other ways, What do you think?
If the question is not clear drop your question I will answer it as soon as possible..
Thank

採用された回答

Sean de Wolski
Sean de Wolski 2014 年 1 月 9 日
Dilate the mask ( imdilate ) the acceptable "closeness" distance first so that the objects touch, then use regionprops.
  1 件のコメント
Vortana
Vortana 2014 年 1 月 9 日
Thank for your answer.
Could you explain a bit more?
What i get so far is the image with background white and objects are black, so If I use the imdilate some small characters will be white and the regionprops could not be detected, and I cannot get the bounding-box of those small characters.

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

その他の回答 (1 件)

Thou Raya
Thou Raya 2019 年 2 月 26 日
Hello
please did you find a solution for your problem ?
thanks in advance

Community Treasure Hunt

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

Start Hunting!

Translated by