Is it possible to extract the 'true' color of building façade from a photo/ a set of similar photos and removing the distraction of shadow? Currently, I'm using K-means clustering to get the dominant colors, however, it extracts darker colors (if the building is red, then the 1st color would be dark red) as there are lots of shadow areas in real photos.
Any suggestions are greatly appreciated!
Thanks in advance!
You could simply ignore the shadow areas by only evaluating areas of a certain brightness. I suggest you make yourself familiar with the HSI/HSL/HSV colour models
https://en.wikipedia.org/wiki/HSL_and_HSV
Understanding this should help to solve the problem on your own.
If the shadows cover a significant part of the image then this problem is non-trivial.
If the shadow is a small fraction of the area you're interested though you could try using k-medoids instead of k-means and as Piglet mentioned using a different color space with separate chromaticity and luminance channels may help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With