-
This is a question than an issue. I am designing software with GUI allowing users to extract color values of patches in different color targets (e.g., X-rite color checker SG, IT8.7/2, and HCT). I think that color target detection in the software does not have to be automatic as it can ask users to select 4 corner points. I wonder how your code can be extended for the other color targets. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments
-
Hi @statcom, The code is not really implemented to detect other checkers than the X-Rite ColorChecker Classic and Passport, however, it is parameterizable and could be generalised, e.g. https://github.com/colour-science/colour-checker-detection/blob/develop/colour_checker_detection/detection/segmentation.py#L60. Upon having the swatches sampled, and assuming you have reference values, you can then compute the fitting matrix. There is a full example here: https://nbviewer.jupyter.org/github/colour-science/colour-checker-detection/blob/master/colour_checker_detection/examples/examples_detection.ipynb |
Beta Was this translation helpful? Give feedback.
-
Thanks for your prompt reply! That code is exactly what I need. I will look into it. In my experience with Matlab, the generalization/parameterization was not too difficult. The color targets are rectangular grids with different number of swatches where some cells are missing (not applicable). BTW, great project and thanks for sharing! |
Beta Was this translation helpful? Give feedback.
-
You are welcome! If you have something nice that you want to be integrated into the project, feel free to open a PR! I think the builds are breaking currently though, haven't had time to check now. |
Beta Was this translation helpful? Give feedback.
-
Considering Datacolor's SpyderCheckr24 has the same layout and reference values are available on their website, would it be sufficient to leave segmentation.py as it is and only update chromaticity_coordinates.py with the values? |
Beta Was this translation helpful? Give feedback.
-
Hi @kvok, You would indeed not need to change |
Beta Was this translation helpful? Give feedback.
-
I want to apply the example of colour checker detection for one image so how I can convert this code for one image |
Beta Was this translation helpful? Give feedback.
-
Hello @farhanalfin, Sorry, I'm not quite sure to understand, the Cheers, Thomas |
Beta Was this translation helpful? Give feedback.
-
Hello Thomas for swatches, colour_checker, masks in detect_colour_checkers_segmentation( is this code for one image which have one colour checker in it. |
Beta Was this translation helpful? Give feedback.
-
Correct! |
Beta Was this translation helpful? Give feedback.
-
When I tried to use a color detection library of color project for an image opened by OpenCV, I thought I would have to convert it to RGB. But when I did that, I received an incorrect result of color checker segmentation. In the original example of color checker segmentation example, the image opened using: Detection
The images decoded during opening and then encoded to use it for detect_colour_checkers_segmentation and to display the result had to encoding the resulted image. These were taking a long time and the calculating results make the result not accurate. I found that it is better to open image by OpenCV as BGR and use it in detect_colour_checkers_segmentation and encoding the resulted image. this take less time |
Beta Was this translation helpful? Give feedback.
-
Hi, Would you have an image to share? It is really hard ATM to understand the issue you are having. Cheers, Thomas |
Beta Was this translation helpful? Give feedback.
-
In more simple words, can I use image by OpenCv (BGR uint8) in colorchecker detection functions
if not how ı can convert the image to be suitable |
Beta Was this translation helpful? Give feedback.
-
Sorry, I'm on a trip with a limited internet connection. The expectation is for the image to be linear floating-point RGB. If you were to use .png files, for example, you might decode them as follows:
|
Beta Was this translation helpful? Give feedback.
Hi @statcom,
The code is not really implemented to detect other checkers than the X-Rite ColorChecker Classic and Passport, however, it is parameterizable and could be generalised, e.g. https://github.com/colour-science/colour-checker-detection/blob/develop/colour_checker_detection/detection/segmentation.py#L60.
Upon having the swatches sampled, and assuming you have reference values, you can then compute the fitting matrix. There is a full example here: https://nbviewer.jupyter.org/github/colour-science/colour-checker-detection/blob/master/colour_checker_detection/examples/examples_detection.ipynb