Skip to main content

Computes homological properties of imagess.

Project description

HomCV: Homotopical Computer Vision

HomCV is a Python library deploying homotopy theoretic methods to computer vision.

Installation

Use the package manager pip to install HomCV.

pip install homcv

Examples

import homcv
from skimage.color import rgb2gray
import matplotlib.image as mpimg


disk_image = mpimg.imread('pic_of_disk.png')
circle_image = mpimg.imread('pic_of_circle.png')
figure_eight_image = mpimg.imread('pic_of_figure_eight.png')
two_circles_image = mpimg.imread('pic_of_two_circles.png')

disk_gs_image = rgb2gray(disk_image)
circle_gs_image = rgb2gray(circle_image)
figure_eight_gs_image = rgb2gray(figure_eight_image)
two_circles_gs_image = rgb2gray(two_circles_image)

bn = betti_numbers()

bn.compute_betti_numbers(disk_gs_image, level = 0.5) 
# returns [1, 0]
bn.compute_betti_numbers(circle_gs_image, level = 0.5) 
# returns [1, 1]
bn.compute_betti_numbers(figure_eight_gs_image, level = 0.5) 
# returns [1, 2]
bn.compute_betti_numbers(two_circles_gs_image, level = 0.5) 
# returns [2, 2]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

homcv-0.1.dev0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

homcv-0.1.dev0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file homcv-0.1.dev0.tar.gz.

File metadata

  • Download URL: homcv-0.1.dev0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for homcv-0.1.dev0.tar.gz
Algorithm Hash digest
SHA256 5ab564e9b82330d319224ecac6fa8bd152e60b315200da8dff107c90cf719a1e
MD5 111c339a6a14b965776ea53bcc8b8a18
BLAKE2b-256 eeb63f1d05b22a41caedca338ee15faf631874820a049362a7096c1c6caa1092

See more details on using hashes here.

File details

Details for the file homcv-0.1.dev0-py3-none-any.whl.

File metadata

  • Download URL: homcv-0.1.dev0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for homcv-0.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 441eb786991d7cc468d6b53bd7a5d886db4416ad2cbe6e877a172f92b8e8fa86
MD5 3968fe811e9ad9d1aab892f7f551dc4e
BLAKE2b-256 9fd6bb6c1232b980b7da2215f200b09aadf884228bca8af3d97f0c443c635827

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