Skip to main content

"pnt2" - calculating the degree of similarity between geometric figures of different shapes (by 2 points)

Project description

pnt2

Calculating the degree of similarity between geometric figures of different shapes (by 2 points)

Installation

pip install pnt2

How to use:

from pathlib import Path
from pnt2.src.get_similarity import get_similarity, calc_similarity, convert_to_canonical

""" Get input data """
path_1 = str(Path.cwd() / 'DATA' / 'first.png')
path_2 = str(Path.cwd() / 'DATA' / 'second.png')

similarity_1 = get_similarity(path_1, path_2)

image_1_can = convert_to_canonical('1', path_1)
image_2_can = convert_to_canonical('2', path_2)

similarity_2 = calc_similarity(image_1_can, image_2_can)

print(f'\nsimilarity_1 = {round(similarity_1, 7)}'
      f'\nsimilarity_2 = {round(similarity_2, 7)}')

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

pnt2-1.0.3.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

pnt2-1.0.3-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file pnt2-1.0.3.tar.gz.

File metadata

  • Download URL: pnt2-1.0.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.11 Darwin/23.1.0

File hashes

Hashes for pnt2-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0f3db6d8f2afafceac1dd83aa1efae7854372373cabe6ef86b3732f0402b552a
MD5 4f9e82419ff94e1c9854a07093517c49
BLAKE2b-256 f6a4f4c75c004ae643d30358860072eaa2e45f94fe97af48ca40adcc557d4bd2

See more details on using hashes here.

File details

Details for the file pnt2-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pnt2-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.11 Darwin/23.1.0

File hashes

Hashes for pnt2-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d96dcc6f3c792b8685fc37749b9693390b8074c94fd72df932c02bec0e2efcf
MD5 04bcbb56427843e59cf8ef8c6696faaa
BLAKE2b-256 31f8e574e3a4126823b4f8c05d737d73dac1fbb336f966a3decf792622bec8f7

See more details on using hashes here.

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