/image_color_correction

Color Correction, with Color Cards using CV2 Aruco

Primary LanguagePythonMIT LicenseMIT

White-Balance with Color Cards

A python function to correct image White-Balance using Color Cards, detecting with CV2 Aruco. Base Idea: https://pyimagesearch.com/2021/02/15/automatic-color-correction-with-opencv-and-python/

You just need an already optimized color input image and another image which is not color optimized. Both images with Color Card, using ArUCo Marker (you can glue them on the Corners of every imageCard to for detecting)

python color_correction.py --reference ref.jpg --input test.jpg --out output.jpg

Image Inputs

First you need a color optimized Image as Reference using a Color Card with Aruco Markers (or follow the Link to purchase the Panton Color Card).

image

1.) A ReferenceImage used as the basis for all further image processes. The colors of this Card image should be optimized to your liking.

--reference ref.jpg

image

2.) you have to choose a none color optimized Image with the a Color card, to detect the Color Difference between both images

--input test.jpg

image

3.) As result you get the Final color optimized Output Image based on the reference Histogram Colors

image

Python command

Output File

python color_correction.py --reference raw.jpg --input test.jpg --out output.jpg

Special output File width

python color_correction.py --reference raw.jpg --input test.jpg --out output.jpg --width 1280

with output Preview

python color_correction.py --reference raw.jpg --input test.jpg --view

with an output Preview and file output

python color_correction.py --reference raw.jpg --input test.jpg --out output.jpg --view

Blog: https://pyimagesearch.com/2021/02/15/automatic-color-correction-with-opencv-and-python/

Stackoverflow: https://stackoverflow.com/questions/70233645/color-correction-using-opencv-and-color-cards/73566972#73566972