Skip to content

Provides python code for calibrating image colors containing color cards

License

Notifications You must be signed in to change notification settings

Imageomics/color-calibration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

color-calibration

Provides python tools for calibrating image colors containing color cards.

This repository is under development and may change at any time.

Installation

To install in development mode, create and activate a virtual environment, and install this package using:

pip install -e .[dev]

To test as part of another project, install directly from GitHub:

pip install git+https://github.com/Imageomics/color-calibration

Usage

This package requires cropped color cards from reference and target images. The color cards must be in the same orientation (portrait or landscape).

To calibrate an image containing a color card:

from color_calibration import match_histograms
import cv2

ref_card = cv2.imread('path/to/reference/color/card')
tgt_card = cv2.imread('path/to/target/color/card')
tgt_image = cv2.imread('path/to/target/image')

calibrated_image = match_histograms(ref_card, tgt_card, tgt_image)

About

Provides python code for calibrating image colors containing color cards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages