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').

GitHub repo: https://github.com/GGN-2015/register2d

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.3.tar.gz (6.8 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.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: register2d-0.0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.17.7-aosc-main

File hashes

Hashes for register2d-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f383fdd17e716e7ad5ef549f624db78b9b0044d321d8b8f0e8f42a3fc89959e2
MD5 e2b15ddc67fe27aeecbdb472ce0d6082
BLAKE2b-256 a67ca192e0cbb7d20386830666572dba14cee525e0a07b92cb52ba466fddc054

See more details on using hashes here.

File details

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

File metadata

  • Download URL: register2d-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.17.7-aosc-main

File hashes

Hashes for register2d-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c73390b5327cbb42d26af10a03e3224cf773946e0a93a1a418ae8d5973aa9c00
MD5 d6476defb9c194656e25caad1a2db328
BLAKE2b-256 9a015cbffade890b3a8e4afc53e31c98084e62ca4472f847aa48484331f45c22

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