0

My goal is to separate all the objects from each other. After that I could use blob or detection so that I can measure the area of each one to make a Histogram with the size distribution of the objects.

Original image:

original image

The problem is that the objects are merging with each other, mainly due to their shadow and/or their proximity to each other.

Final results - bounding box:

Final results - bounding box

Binary image:

Binary image

I have tried canny edge detection, holistically-nested-edge-detection, and still having this issue. What can I do to fix it?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Alexandre Tavares
  • 113
  • 1
  • 1
  • 11
  • 1
    Take a look at [this post](https://dsp.stackexchange.com/questions/46174/image-shadow-removal-using-opencv-and-python) that discusses background subtraction and shadow elimination with openCV. – Shir Mar 05 '21 at 11:59

1 Answers1

0

you can get the box coordinates for each detection and extract the detect image based on those coordinates and then apply your filter.

Check out this post on region of interest https://stackoverflow.com/a/58211775/14770223

Phantom
  • 1
  • 1
  • But using these box coordinates will add to the Region of Interest some parts of other objects, right? And if so, it will hinder more than help. – Alexandre Tavares Mar 24 '21 at 11:50