Skip to content

How to perform color correction? #1326

Closed Answered by hardikdava
hardikdava asked this question in Q&A
Discussion options

You must be logged in to vote

@KelSolaar Understood. Thanks for your help. This is the working version, if anyone wants to use it.

from pathlib import Path
import colour
import supervision as sv
import numpy as np

"""
pip install colour-science colour-checker-detection numpy supervision
"""

from colour_checker_detection import (
    detect_colour_checkers_inference)

colour.plotting.colour_style()

input_dir = Path("data/input")
output_dir = Path("data/cc_corrected")
COLOUR_CHECKER_IMAGE_PATHS = sv.list_files_with_extensions(input_dir)

COLOUR_CHECKER_IMAGES = [
    colour.cctf_decoding(colour.io.read_image(path))
    for path in COLOUR_CHECKER_IMAGE_PATHS
]

SWATCHES = []

for image in COLOUR_CHECKER_IMAGES:
    if…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@KelSolaar
Comment options

@hardikdava
Comment options

@KelSolaar
Comment options

@hardikdava
Comment options

Answer selected by hardikdava
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #1324 on January 24, 2025 07:26.