Find projections of an image and divide it vertically and horizontally
I want to get vertical, horizontal projections and check if there are 2 or more zero values in the projection. I am working on a shelf image, where I want to detect all the shelves and for each shelf, segment the products vertically. I am thinking of the following approach.C:\fakepath\flow.png. I have attached the desired ouput image also.C:\fakepath\project.png. If I get that, I was thinking of getting a grid on the image so that i can get the coordinates for the line segments achieved vertically and horizontally.
FLOW:
Shelf Image - Horizontal shelf detection - vertical product segmentation - getting coordinates for the intersetions(output)
I am working with opencv. Appreciate assistance!
Thanks, Hrishi