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",
]

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

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

# Create comparison image
comparison_image = compareImages(images, names, True, 256, (10, 30))
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.3-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: imco-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for imco-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5af3594cf81cd9880af0fc8cde715209689c2388da71eb92d549496e3fdf05cf
MD5 1b4a2db421530ea90855f7e34000d730
BLAKE2b-256 be3730e4d2708739913c1d947993fa306b8c4ec4f1501b913961e718a5d00a11

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