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.