I have coloured images, some may be just clipart, some may be artwork, both could be with or without gradients.
Before i run a colour counting algorithm on them, i want to detect if the image has only solid block colours, or gradients in it.(Technically all compressed images will have small gradients in the form of anti aliasing, but i want to detect the gradients that were there in the original image)
I'm thinking of an approach in which i could plot a historam(of rgb or hsl values, or even grayscale) and if it has peaks that are smooth and not steep, then that indicates that the image may have an area with a gradual colour shift, with all colours of one hue appearing more or less equally(like the image of a sky would have gradual changes from blue to lighter blue to white). Does this sound right? Any other approaches for doing this? Thank you.