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.1 includes a new option for the constructor that lets the system decide as to which image to use as the model and which image as the data. In general, for color and grayscale images, you get superior registration if the image that results in fewer pixels for ICP processing is used as the data image.

Typical usage syntax:

import ICP

icp = ICP(

model_image = “modelterrain.jpg”, data_image = “cameraimage.jpg”, binary_or_color = “color”, iterations = 40, connectivity_threshold = 5, output_image_size = 100, display_step = 1, debug = 1 )

icp.icp()

icp.display_results()

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