2

For example - I have many photos with grass or forest and they are simply "green".

Photo with sea and sky is blue, photo with snow is white.

I need something ( idea / algorithm ) to solve my problem but dont know how to make it fast and easy. (I prefer c# but java is good too).

Nick Vaccaro
  • 5,428
  • 6
  • 38
  • 60
Arko Jarko
  • 39
  • 2
  • You might want to go into more detail on how you decide which color to get. Right now it's unclear what a picture with both sky and grass would be. – tmesser Oct 30 '12 at 20:39
  • What about a photo with 50% sky and 50% snow? What would you class that as? – Oded Oct 30 '12 at 20:39
  • 3
    I think you may want to research [image histograms](http://en.wikipedia.org/wiki/Image_histogram) for color/tonal distribution maps. – JYelton Oct 30 '12 at 20:41
  • I don't know excalty if it's possible, i just want to get "general" color, something like that - On this image i can see sky and snow I can say that my "looking for color" of this image is brightblue – Arko Jarko Oct 30 '12 at 20:42
  • Surprisingly similar to: http://stackoverflow.com/questions/13146994/how-to-reset-value-of-captured-pixel – LightStriker Oct 30 '12 at 20:43
  • I think JYelton is close to solve, histograms is good point to start. I haven't wrote that i'll work only with images that are quite "one color" (no images with hmm for example rainbow or other thing with lot of colors) – Arko Jarko Oct 30 '12 at 20:45
  • Marc-André Jutras - sum of every pixels isn't bad but i'm worry that it can be quite slow (even when get pixels with locking bitmap) i think it can be faster when use histograms or something else? – Arko Jarko Oct 30 '12 at 20:48
  • Ok i've solved my problem - just scale image to 1 x 1 pixel and that pixel has color which i'm looking for, thanks – Arko Jarko Oct 31 '12 at 09:08

0 Answers0