# Determining mid point of projected line in image space

For the following image points projected from a rectangle:

How do I find the image coordinate pair of line p1, p2 that corresponds to the midpoint of line p1,p2 of a model in space projecting said points? I am looking for a solution that doesn’t necessarily include homography – is this possible?

unless you give more details, it’s just a plain maths problem,
and the midpoint is simply:

``p1 + (p2-p1) / 2``

if a perspective is involved, you will have to use homographies.

that does not mean you have to warp a picture!

this is “computer graphics”, specifically “rendering”, 3D projection, rasterization, barycentric coordinates, Gouraud shading, … but vitally: perspective correction, because those 2D operations happen in 2D, but have to take 3D into account. a lot is written about this. I don’t remember the details. graphics cards do this all the time when they have to calculate the coordinates of triangles (for texture/color) from a point on the screen.

my ad-hoc approach would be to calculate a homography to turn this quadrilateral into a rectangle, define your midpoint in the rectangle, and map that back to the quadrilateral.

Thank you for the thorough response. Its clear that the answer for perspective attributes = homographies and line = 3D, requiring more in depth math ruling out any simpler resolution. I’ll have to adjust my strategy accordingly.

my ad-hoc approach would be to calculate a homography to turn this quadrilateral into a rectangle, define your midpoint in the rectangle, and map that back to the quadrilateral.

This is what I thought. I was hoping to use midpoints in addition to corners for a PnP fx more accurate with a total of 8 not 4. But the homography must be setup first with the 4 corner points to find the other 4 midpoints making a homography with 8 points moot and stuck with 4.