in reply to Re^2: A data selection problem(in3D).
in thread A data selection problem(in3D).

On a different note: have you thought about an approach using clustering (like k-means)? This is what I initially thought of when I saw this problem, but then I had a negative experience with a module called Image::DominantColors.