Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Assuming you have two curved lines running parallel to each other in your image, here is a suggestion to get the mid point between curved line.

  1. Threshold the image
  2. Find contour and its bounding rectangle for each curved line's contour.
  3. Get angle of its bounding rectangle.
  4. Bounding rectangle of both curved line must be same as it is parallel to each other. If the angle of bounding rect is 0 deg or 90 deg, subtract x coordinate of contour to get the mid point between parallel lines. If the angle of bounding rect is other than 0 deg or 90 deg, subtract y coordinate of contour.

Share your results with image samples.