This repository demonstrates stitching multiple images of a planar target. We analytically derive homographies by assuming the camera poses with respect to the target are known. Hence neihter feature matching nor Linear Transforms (DLTs) are required to estimate the homographies. The following image shows four views stitched in the green reference camera frame.
In the following image the same scene is stitched in a virtual camera whose image plane aligns with the ground plane, having a pixel resolution of 500px per meter, which is suited well for taking direct metric measurements.
Both images exhibit ghosting artefacts caused by blending moving objects and warping objects that violate the in-target-plane assumption.
See PlanarImageStitching.pdf for background information on the stitching process.
The code provided is for demonstration purposes only. It is limited to a scenario in which a moving fisheye camera observes a ground floor. The extrinsics are computed from knowing the fisheye intrinsics/distortions and the pattern configuration.
# Stitch in camera 3 view (index starting at zero)
python stitch.py -r 2
# Stitch in plane pi using px/m of 500
python stitch.py -r -1 -px-per-m 500
# Stitch in plane pi using px/m of 10
python stitch.py -r -1 -px-per-m 10