Perspective transformation for binary images

I am trying to register two binary images. The fixed image is a planar shape, and the moving image comes from a camera image of the same shape but additionally has a perspective distortion due to the camera angle. Here is an example:

02

For this simple example, I used an affine transformation as an approximation, but it’s not perfect since any lines that are parallel before an affine transformation stay parallel afterwards, as it only does rotation, scale, shear, and translation.

I believe what I need is a projective/homography transformation that will take into account the perspective distortion.
https://www.graphicsmill.com/docs/gm5/Transformations.htm

Do you know if any image registration tool can apply projective transformations? I used SimpleElastix in this example.

Thank you very much for your help and interest.

Kind regards,
Doga

2 Likes

Hi,

I see this is an old topic - but I am looking for the same answer :slight_smile:

Any luck finding a solution? I’m trying to replicate a workflow in OpenCV for correcting the perspective of some images using a perspective projection matrix.

Best,
Tom