Skip to main content

Python package to compare images with metrics

Project description

Image Comparator (imco)

Compare image similarity with metrics printed automatically below every image. See example image below.

comparison_image

Installation

pip install imco

To get the latest version, install:

pip install git+https://github.com/pettod/imco.git@main

Usage

Import following function:

from imco import compareImages

Here is a sample code to use the comparison function:

import cv2

# Paths to images
image_paths = [
    "path/to/image_1.png",
    "path/to/image_2.png",
    "path/to/image_3.png",
]
reference_image_path = "path/to/reference_image.png"

# Read images
images = [cv2.imread(image_path) for image_path in image_paths]
reference_image = cv2.imread(reference_image_path)

# Define image names
names = ["Input", "Prediction 1", "Prediction 2", "Ground Truth"]

# Create comparison image
comparison_image = compareImages(images, reference_image, names, crop_size=256)
cv2.imwrite("comparison_image.png", comparison_image)

License

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

imco-0.1.2-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file imco-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: imco-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for imco-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 228446e09097f98da39a25b6416a46988c81aef34eabcac31c98ccf303aec595
MD5 b8e827ad612dae876e12799a7f112000
BLAKE2b-256 f806f59804485f15b32e40fb1856427a67658d8f0b52005c36b558546309cd1c

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