Skip to main content

No project description provided

Project description

Points and lines matcher

This module is baesd on  hungarian match with cost matrix

Example:

from  LPMatcher import topology_match



xmin, ymin, xmax, ymax = [97, 348, 533, 620], [131, 133, 180, 50], [197, 451, 581, 660], [186, 209, 281, 120]

test_points = list(zip(xmin, ymin, xmax, ymax))

test_lines = [((638, 2), (638, 47)),((455, 159), (638, 159)), ((638, 124), (638, 159)), ((639, 159), (713, 159)), ((3, 159), (93, 159)),

              ((201, 159), (344, 159)), ((557, 161), (557, 176))]

tm = topology_match(img_path='./img/test2.png', lines=test_lines, points=test_points)

print("the number of lines: " ,tm.get_line_num)

print("the number of points: ", tm.get_point_num)

match_map = tm.hungarian_match_with_cost(distance_threshold=60, show=False)

print(match_map)

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

LPMatcher-0.1.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

LPMatcher-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file LPMatcher-0.1.3.tar.gz.

File metadata

  • Download URL: LPMatcher-0.1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for LPMatcher-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d7256e3c85377730b9fe9cf496ebd83b62f09dcfd9b35356a7abf85028c55607
MD5 a083f69d444933495a69c32a6e6f5b86
BLAKE2b-256 58d92c9ea7d0a3880a7aefdaa30375f76360b4863567f163069e542597a4ba06

See more details on using hashes here.

File details

Details for the file LPMatcher-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: LPMatcher-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for LPMatcher-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a875c54a64004d6c7220d61775478a214def2b76962e9fc1c002d3085e5d3bd0
MD5 0fcbeef4d6696ae69b8a11ee17869fa8
BLAKE2b-256 4c06ccf04e723c5247011f591c803aa1fdcb615f07c56e1b2ceb9a926a64f1ac

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