Scanned colour checker does not corrected right #18
Unanswered
farhanalfin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote the following script to correct image scanned with colour checker but I faced incorrect color correction, around the colorchecker is the background of scanner cover, what is the wrong !!!
After publishing the discussion , I noticed that there is negative color value in corrected image, and I founded that this is due to there is negative value in REFERENCE SWATCHES.
import colour
import matplotlib.pyplot as plt
from colour_checker_detection import (
detect_colour_checkers_segmentation)
image_RGB = colour.io.read_image("detection/Yeni-X-rite3.jpg")
decoded_image = colour.cctf_decoding(image_RGB)
swatches = detect_colour_checkers_segmentation(decoded_image)
D65 = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65']
REFERENCE_COLOUR_CHECKER = colour.CCS_COLOURCHECKERS['ColorChecker24 - After November 2014']
REFERENCE_SWATCHES = colour.XYZ_to_RGB(colour.xyY_to_XYZ(list(REFERENCE_COLOUR_CHECKER.data.values())), REFERENCE_COLOUR_CHECKER.illuminant, D65, colour.RGB_COLOURSPACES['sRGB'].XYZ_to_RGB_matrix)
correctedimage = colour.cctf_encoding( colour.colour_correction(decoded_image, swatches[0], REFERENCE_SWATCHES))
f = plt.figure()
f.add_subplot(1, 2, 1)
plt.imshow(image_RGB)
plt.title("Original image")
f.add_subplot(1, 2, 2)
plt.imshow(correctedimage)
plt.title("Corrected image")
plt.show()
Beta Was this translation helpful? Give feedback.
All reactions