views:

54

answers:

2

Given image is N*M (R,G,B) pixels like:

alt text

Algorithm should tall us how to find main image colors like: red and white here.

Aeries with relatively same colors means we search for (R,G,B) (222, 12, 10) giving for example such step (40, 20, 10 ) so that (199, 32, 5) will count like what we are searching for like:

alt text

Shapes should be defined by array of connected points (x, y) attached to pixels like:

alt text

Pseudo code will work for me as well as any readable code in OO language like Java or C++ (in this 2 I am especially interested)

What algorithm is fastest for getting relative to image shapes formed by aeries with relatively same colors on the given image?

A: 

Look up algorithms for image segmentation.

zvrba
+1  A: 

Just a warning. You should be carefull with the wording: if you identify the three "main colors" of your image, you may get the following (code in Mahematica):

alt text

belisarius