# i need code to pass a line at the centre center of two curved lines

Hi

I have a two curved lines that runs parallel to each other. Now i need to find the exact centre between curved lines ...now at the centre i need to pass an one more line that follows the other two curved lines

edit retag close merge delete

Do you know the points of the Two Curves?

( 2015-03-19 00:26:23 -0500 )edit
1

Refer to http://stackoverflow.com/questions/14... for finding edges of arc, organize coordinates forming arc in a vector either clock wise or anticlockwise order.. find mid value of vector, which would be the center of arc.

( 2015-03-19 00:39:21 -0500 )edit

( 2015-03-23 05:46:07 -0500 )edit

Sort by ยป oldest newest most voted

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.

more

Official site

GitHub

Wiki

Documentation