I'm using getPerspectiveTransform
& perspectiveTransform
to map points from a camera frame (let's call it "perspective cam") taken from an arbitrary (but fixed) position to points on a bird's-eye view of the same area (let's call it "bird cam").
I have a quadrilateral overlaying the perspective cam frame (q1). I have the corresponding quadrilateral overlaying my bird cam frame (q2). I.e. I manually specified four points that map to each other.
I use getPerspectiveTransform(q1,q2)
and then I use perspectiveTransform
with the resulting matrix to map arbitrary points from the perspective cam frame to the bird cam frame.
Similarly, I use getPerspectiveTransform(q2,q1)
and then I use perspectiveTransform
with the resulting matrix to map arbitrary points from the bird cam frame to the perspective cam frame.
Finally, my question: Is the mapping always correct? I.e. assuming that neither frame has any barrel distortion, is can the mapping be relied upon as being accurate, or is it just a rough correspondence that depends on the perspective cam's positioning?
Thank you!