Skip to main content

help to do color correction on images based on color checker card classic 24 patch.

Project description

🎨 Color Correction Toolkit

Note: The "asdfghjkl" is just a placeholder due to some naming difficulties.

This package is designed to perform color correction on images using the Color Checker Classic 24 Patch card. It provides a robust solution for ensuring accurate color representation in your images.

🛠️ How It Works

  1. Input Requirements:

    • An image containing the Color Checker Classic 24 Patch card (referred to as the color checker).
    • A reference image of the color checker.
  2. Process:

    • The package computes a color correction matrix based on the input image and reference image.
    • This matrix can then be used to correct the colors of the input image or other images with the same color profile.

    Workflow:

    Input Image + Reference Image -> Color Correction Matrix -> Corrected Image
    
  3. Advanced Usage:

    • For multiple images, it’s recommended to preprocess the images using white balance before calculating the color correction matrix. This ensures that all images are in the same color profile, leading to a more accurate correction matrix.

    Enhanced Workflow:

    Input Images -> White Balance -> Compute (Input Image with Color Checker, Reference Image) -> Color Correction Matrix -> Corrected Images
    

📈 Benefits

  • Consistency: Ensure uniform color correction across multiple images.
  • Accuracy: Leverage the color correction matrix for precise color adjustments.
  • Flexibility: Adaptable for various image sets with different color profiles.

Installation

pip install color-correction-asdfghjkl

Usage

import cv2

from color_correction_asdfghjkl import ColorCorrection

cc = ColorCorrection(
    detection_model="yolov8",
    correction_model="least_squares",
    use_gpu=False,
)

input_image = cv2.imread("cc-19.png")
cc.fit(input_image=input_image.copy())
corrected_image = cc.correct_image(input_image=input_image.copy())
cv2.imwrite("corrected_image.png", corrected_image)

📚 References

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

color_correction_asdfghjkl-0.0.1a1.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

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

color_correction_asdfghjkl-0.0.1a1-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file color_correction_asdfghjkl-0.0.1a1.tar.gz.

File metadata

File hashes

Hashes for color_correction_asdfghjkl-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 942569f41bcf55de7c896012be30a471124b0399b5a9482f4fb8f2e82b235622
MD5 ce9b426d19fa555c89c8c00c72b51f8d
BLAKE2b-256 587ebaa17614669b03809a1acdd7b292327cb0ffd5207dba59b5efd20a7879af

See more details on using hashes here.

File details

Details for the file color_correction_asdfghjkl-0.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for color_correction_asdfghjkl-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 f921b560f9e9008607c72afa01d7def09b15495dea467fdda90d8c796cffaf0b
MD5 19ba61d25e1315c185e8aee84b56af7d
BLAKE2b-256 6de1db73b4353cf36f050efe0cdf948b1c0066e75921e21b98484ceffb8a0c5b

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