0

I'm finding difficult to get the colors used of an Bitmap image in Java. How to get the most used colors of an image in java programming with octree color quantization algorithm or any other better algorithm?

Vishanth
  • 1,320
  • 3
  • 14
  • 26

1 Answers1

0

You can get color of a pixel in your Image and store its count and color code in Map and increment the count each time that code encounters. Finally sorting that Map will give you the most used color in your Image. You can get help from this code which generates and plots a histogram of a given image.Hope this helps !

er_suthar
  • 319
  • 1
  • 8