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.2.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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: register2d-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 01a20e05c1a80aa4329bb57b2653d41a6357eb4ca383928407460063a5af8963
MD5 21450dc8279d75856a6e2e8fbda13315
BLAKE2b-256 f4e0853c6f2eb633d2acd9a7e01e56b663cb84d2f6e35251e982e4fbb482f3a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: register2d-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 621614898dd9b61113dd56f53249ad3090fe1ecb16daff42342360abe587a1c7
MD5 0b3feaa8b213aef73f8e0738bdf44d1f
BLAKE2b-256 f1196740489b71817dad28ba8c7a20870772ee15625c3bd1b6a4a4f6386a834b

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