2

Detecting the most dominant color in a single image has been discussed in many posts, including:

but is there a way to find the most dominant color for each image, when given multiple images? I'm looking for an approach where we use all of the images jointly in order to more intelligently determine the dominant color for each image, rather than finding the dominant color for each image individually.

Here is an example image containing multiple objects with similar shapes, but with different dominant colors (in reality each object is contained within a single image file, but I've horizontally concatenated 4 image files into a single file for simplicity's sake).

I "could" in theory concatenate all of the image file and then get a palette of prominent colors using tools such as Color Thief, but then I would have to:

  • associate each color back to the original image, and
  • remove any shared non-dominant colors (e.g. gray/silver in the image above)

Is there a simpler way of solving this problem?

Community
  • 1
  • 1
mrorii
  • 21
  • 1
  • 4
  • I don't get what you want. If you want to get the dominant colour for each image when given multiple images and you know how to calculate it for single images, why don't you just calculate it for every image? – Piglet Feb 22 '16 at 11:55
  • As the example image shows, the objects have similar shapes (and in this case in particular, have a common gray/silver-colored top). When you calculate the dominant color for a single image, it can sometimes falsely detect the gray color. I'm trying to look for an approach where we use all of the images jointly in order to more intelligently determine the dominant color for each image. – mrorii Feb 22 '16 at 21:41
  • I've edited the post to make the question more clear. – mrorii Feb 22 '16 at 22:02
  • If gray is extracted as the dominant colour and it is not a colour by your definition than you should change your extraction algorithm. Use hue and saturation to restrict your search to "colours" and avoid neutral values like white or gray – Piglet Feb 23 '16 at 11:28

0 Answers0