I am working on an image having musical symbols, like
Before i reach this step i have removed the staff lines to recognize them in efficiency. but now i want to detect on which stave line they exist. They only way i am thinking of is to create a base line, let's say to be the ground of the image. And measure the distance between the object and the base line.
Maybe i can add contour boxes and measure from the base of the box till the ground of the image.
How can i implement this idea?? What algorithm can i use ?