Skip to main content

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

Project description

🎨 Color Correction

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.

Installation

pip install color-correction-asdfghjkl

Usage

# Step 1: Define the path to the input image
image_path = "asset/images/cc-19.png"

# Step 2: Load the input image
input_image = cv2.imread(image_path)

# Step 3: Initialize the color correction model with specified parameters
color_corrector = ColorCorrection(
    detection_model="yolov8",
    detection_conf_th=0.25,
    correction_model="least_squares",
    degree=2, # for polynomial correction model
    use_gpu=True,
)

# Step 4: Extract color patches from the input image
color_corrector.set_input_patches(image=input_image, debug=True)
color_corrector.fit()
corrected_image = color_corrector.predict(
    input_image=input_image,
    debug=True,
    debug_output_dir="zzz",
)

Sample output: Sample Output

📈 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.

How it works

📚 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.1b0.tar.gz (1.4 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.1b0-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for color_correction_asdfghjkl-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 7fe98c8fcdb640859844947686101ef4a9d0cf7dea19dbf9ea1a8bb32d64124f
MD5 2bc3db2edf8c2afe381129545e0411ce
BLAKE2b-256 66d208b41289f222478e9f6b0b63abf9fd3db2e52ecc218308baf2a6c8401e6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for color_correction_asdfghjkl-0.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 56268114a2a5e1291092f2aaf3af226d0e073461831309ca5b87827a0024b537
MD5 1d60ba354d8a94ae2ef0ae9d523c6dbc
BLAKE2b-256 eba262b23bfad38a43a7cb5fe07a59b61a4f7b4af0a4629f9791e6d6c41ddd1d

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