1 | initial version |
Use undistortPoints to find the coordinates of points lying on the image edges. For each edge, find the maximum/minimum value of x/y coordinates (whichever is necessary for a given edge). These will be your midpoints that you marked with little dashes. The rest is straightforward.