How to find shelves on image?
Hello. I have a lot of photos. Each photo contains many similar items. I need to find each shelves or space between shelves. An example on the photos. Shelves between blue lines and the necessary space between red lines. I tried methods that separate shelves color from other colors and try to recognize the shelf. But shelves have different colors and different shades of each color on different photos. Therefore, the specified color can not always be found. Or maybe I'm wrong to use such methods. Tell me, please, how to recognize shelves or space between shelves. The space between the shelves is more priority than the shelves.
Have you already tried Hough Line and filter results along the horizontal direction? Horizontal books will introduce some results too, but you can filter them looking at length of the associated contour, since the shelve is the longest in image
take a look at this maybe it will be useful.