How to filter the points to get only the left most and right most?
Kindly need your attention here.
"m7.pgm"-->attached (converted to .bmp)
n = 0; // number of corner points detected
corner_list[n].x = j; //x coordinate
corner_list[n].y = i; //y coordinate
This is the image and the marking at the contour are the detected points.
"m-004-1.pgm"-->attached (converted to .bmp)
I want to get only the left most and right most points as corner. How can i write the codes to keep only these 2 corner points for every image?
From the left side, we can see there are two points with the same x-coordinate. From the right there are 3 or 4 points at the same x-coordinate.
How can we program to choose the most middle position for the left most and right most corner points?
Please help or give some ideas.