Closed ddonohoe closed 3 years ago
HI @ddonohoe,
Sorry for the late reply, it seems like we could expose a few more arguments to control the behaviour.
That being said, looking at your image, the colour checker is really highly distorted and noisy, I'm actually surprised it works at all! It might be a good idea to undistort the image before.
Cheers,
Thomas
Hi Thomas,
Thank you very much for the suggestions, this is really helpful! I can certainly undistort the image and reduce the noise.
Best Regards, Dave
Colour checker detection fails with the following image:
colourchecker.bmp.gz
The following is my minimal test case:
I found that I can make the detection work if I replace INTER_CUBIC with INTER_LINEAR in adjust_image(). With Cubic interpolation, only 15 swatches are detected ("counts" in colour_checkers_coordinates_segmentation()), whereas with Linear interpolation, 19 swatches are detected.
A strange thing I observed is that if I convert the image to .png first, everything changes, even though the images should be identical. In this case Linear interpolation detects 18 swatches, whereas Cubic interpolation detects 19.