Skip to main content

A 2d black-white binary image registration algorithm.

Project description

register2d

Given a black-and-white binary image A and another smaller black-and-white binary image B, perform translation and rotation on B, and find the position in A that is closest to the transformed B. A and B should be saved in grey PNG image (mode='L').

Installation

pip install register2d

Usage

import register2d
image_a_path = "<Image A Path>"
image_b_path = "<Image B Path>"

# calculate registration
posY, posX, score, rot_deg = register2d.find_match_pos_and_rotate(image_a_path, image_b_path)

# show the position of image B in image A
register2d.get_red_mask_image(image_a_path, image_b_path, posY, posX, rot_deg).show()

# show the position of image B in a white image same size as A
register2d.get_rotated_and_moved_image(image_a_path, IMAGE_PART_INPUT, posY, posX, rot_deg).show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

register2d-0.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

register2d-0.0.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file register2d-0.0.0.tar.gz.

File metadata

  • Download URL: register2d-0.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for register2d-0.0.0.tar.gz
Algorithm Hash digest
SHA256 2e5f10cfb1ef37a24d6e35b1e042eb6d3a7430361bdeae3c15678e47346e3762
MD5 461b48abae8d9ee4cd9428c1ede1bb5f
BLAKE2b-256 cfb6d906db752b1a5ca594f797d3fa002e3b33d8622ab9a66acc9219c201766e

See more details on using hashes here.

File details

Details for the file register2d-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: register2d-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for register2d-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40757cb9d8e3002d10da5b8a06099748966c72df3400c2a1f95a46b476044158
MD5 fc53cbd722c1a5ed3f2aa0c7dbfee11d
BLAKE2b-256 d4dd202fd4ad2842fbb7610fd0996c2a504fb14d752b1a64337e532cfe05aa60

See more details on using hashes here.

Supported by

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