Ask Your Question

Palette: choosing starting bin/cluster centroid and getting bin population

asked 2012-08-22 01:28:37 -0500

ravi gravatar image

updated 2012-08-22 01:29:31 -0500

I have two questions related to Palette related functions:

Q1. Is it possible to specify the starting bin/cluster centroid while finding the Palette, this will help in defining in which direction we want the cluster to converge?

Q2. Also can we get the relative (% or count of pixel) pixel population per bin/cluster with the palette colors? I know of a hack like using drawPaletteColors and then counting the palette colors pixel.

edit retag flag offensive close merge delete


@kscottz sorry for late reply, I would like to do this part for SimpleCV. I will try to do that, will ask/update if stuck/done. Thanks.

ravi gravatar imageravi ( 2012-10-05 02:27:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-08-22 09:13:39 -0500

kscottz gravatar image

So this is a very good question. The short answer is that we don't have that functionality yet, but it would be a really awesome thing to have. Could you resubmit this as a feature request through github?

If you think you are capable of fixing the problem we can help you help us. Most of the code lives here. All you should need to do is set the cluster centers for the kmeans implementation. Doing the percentages would probably need to be a separate method as you would need to iterate over the entire image. Please post a comment on whether you want to tackle this or you want us to get to add this functionality. We just wrapped up Google Summer of Code so I am not sure we have the manpower to get to it right away. If you decide to give it a show fork the repo and send us a pull request with your changes. Please make sure to include documentation and a test for the new functionality.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-08-22 01:28:37 -0500

Seen: 194 times

Last updated: Aug 22 '12