Skip to main content

An algorithm for registering a camera image with a database image

Project description

This module is a pure-Python implementation of the Iterative Closest Point algorithm for registering a camera image with a database image.

An application scenario would be the registration of an image recorded by a UAV-mounted camera flying over a terrain with an image extracted from GIS (Geographical Information System) database.

Version 1.2 allows for a movie-like display of the superimposed model and data images. This makes it much easier to see the convergence of the registration between the two images. Additional features included in this new version include dealing with large binary images as a special case, etc.

Typical usage syntax:

import ICP
icp = ICP.ICP(
             model_image = "modelterrain.jpg",
             data_image = "cameraimage.jpg",
             binary_or_color = "color",
             iterations = 10,
             connectivity_threshold = 5,
             calculation_image_size = 100,
            )
icp.icp()
icp.display_results()
icp.display_results_as_movie()

The module also includes a static method gendata() to illustrate how one can create simple synthetic images to experiment with the code. A call to this method looks like

import ICP
ICP.ICP.gendata("triangle", (80,80), (10,10), 30, "newtriangle2.jpg" )

for creating an 80x80 image of a triangle whose position offset is (10,10) and whose orientation is 30 degrees.

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page