Thnx for your very fast reply.
I will try your solution very soon.
But an additional question for my understanding,
You say:
"even though they will all converge to a very small difference/error as you increase the number of samples to the number of pixels in the source image."
I am not sure if I understand that.
What I did was just
- Run the ImageColorExample 100 times
- changed
Histogram hist=Histogram.newFromARGBArray(img.pixels, img.pixels.length/10, tolerance, true);
to (means to me I take all pixels)
Histogram hist=Histogram.newFromARGBArray(img.pixels, img.pixels.length, tolerance, true);
- println(e.getColor().toHex()+": "+e.getFrequency()+": "+hist.getEntries().size());
And I can see differences in all 3 values in the order of 10%. Would you expect that or is there still a misunderstanding
on my side ?