Page 1 of 1

Image Alignment when images are of different perspectives

Posted: 2016-06-21T09:40:27-07:00
by jefike
Hello,

I currently have an array of four cameras in an apparatus that points all four cameras at an image projected via a lens onto a single plane. The goal is to get a higher framerate video by interleaving frames from all four cameras, which each being slightly out of sync with the other. Since these cameras are positioned at different angles from the plane, there is a perspective difference for each. I would like to know if there is a clever way to do the perspective corrections with image magick.

As examples here (dropbox link) are three images each from a different camera in the array:
https://www.dropbox.com/sh/5cw7veg6iyh0 ... Iftza?dl=0

Re: Image Alignment when images are of different perspectives

Posted: 2016-06-21T10:03:26-07:00
by snibgo
Two of your images are smaller than the third.

Anyhow, the job is easy. Pick four features that you can see on each image, ideally near the corners. Choose one image as the master, and distort the others to match:

Code: Select all

convert in.ppm -distort Perspective "XX" out.png
... where XX is 16 numbers. See http://www.imagemagick.org/script/comma ... hp#distort