Skip to content

philrox/colorfix

Repository files navigation

colorfix

Automatic color correction via ColorChecker. One command, no GUI.

Install

pip install colorfix

Or run directly:

uvx colorfix -r ref.jpg -i ./photos/ -o ./corrected/

Usage

# Basic usage
colorfix -r photo_with_checker.jpg -i ./photos/ -o ./corrected/

# JPEG output with quality setting
colorfix -r ref.jpg -i ./photos/ -f jpeg --quality 95

# JSON output for scripting/agents
colorfix -r ref.jpg -i ./photos/ --json

# With Delta-E report
colorfix -r ref.jpg -i ./photos/ --report

As a Library

from colorfix.pipeline import CorrectionPipeline

pipeline = CorrectionPipeline(reference="ref.jpg")
results = pipeline.run(input_path="./photos/", output_dir="./corrected/")

How It Works

  1. Detects the ColorChecker in the reference image (OpenCV)
  2. Extracts measured RGB values from the 24 color patches
  3. Computes a 3x3 color correction matrix via least squares (NumPy)
  4. Applies the matrix to all input images
  5. Exports as 16-bit TIFF, JPEG, or PNG

No AI. Pure computer vision + linear algebra.

License

MIT

About

Automatic color correction via ColorChecker. One command, no GUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages