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_b_path, 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.1.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.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: register2d-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 76f0c7d396bec7c5852fa7a6717f4fdd261b518050d2c59ced74fcea0c2879fb
MD5 af4e8f29bf22ebbc702b5cbd479dc251
BLAKE2b-256 0adecb057cbf53491e881fbd7a45bc7530504e00e93268b98af4eb59aacb0633

See more details on using hashes here.

File details

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

File metadata

  • Download URL: register2d-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b308f4d3c290a7921052bfc720ac1b43db7f02464fc9e88b846168d44bf8a88d
MD5 b4dfb781f913c9b6dc8325f52526c098
BLAKE2b-256 fffc11eec556c1bc712ce07c80b0cf2bf0b16d59974bdae298eac5c4ff4d98bf

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