Shape detection of blobs

9 次查看(过去 30 天)
RIshabh Golchha
RIshabh Golchha 2019-3-8
Hi,
I have two different types of blobs:
  1. Close to kidney shape but not that perfect
  2. Close to a rectangle but with a dent or two and with filleted vertices
How can I differentiate between the two using Image processing
blob.bmp

回答(1 个)

Image Analyst
Image Analyst 2019-3-8
What I'd probably do is to get the bounding box. Then make a mask that is the bounding box and get the XOR of that with the blob. This will get you the black "bays" (black regions between blob and it's bounding box) as blobs. Then look at the area, and possibly aspect ratio (bounding box) of those blobs to determine which are like slivers, like the rectangular blob, and which are rounded and large like the bay in the kidney.
See my Image Segmentation Tutorial if you need a start.
  3 个评论
Image Analyst
Image Analyst 2019-3-8
Actually I didn't mean bounding box, I meant convex hull. Try bwconvhull()
RIshabh Golchha
RIshabh Golchha 2019-3-8
if I use
ran1 = bwconvhull(ran,'objects') & ~ran; % ran is the original binary image
I get the first image. And then if I use the following to remove thin regions, I get pretty identical shapes. (Although here, the two smaller blobs vary in size but that is not always the case. Hence I need a different parameter to differentiate them)
ran2 = imopen(ran1,strel('disk',2));

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by