bluechill
bluechill

Reputation: 437

Image transformation by clustering

I am doing a project on image binarisation where I am required to transform an image such that its divided into individual color layers using clustering. What I mean to say is that there will be no shades in the image, instead the shades of the input image will be converted into a layer dividing the two colors.

The input and output images are given:enter image description here

I am trying to implement this using opencv, but not able to figure out how to do that. Thanks in advance.

Upvotes: 0

Views: 703

Answers (1)

Darcy Rayner
Darcy Rayner

Reputation: 3445

Try using k-means clustering. http://aishack.in/tutorials/kmeans-clustering-opencv/

You get as many colours as you have means.

Here is an example being implemented using the Accord.NET C# library. http://crsouza.blogspot.com.au/2010/10/k-means-clustering.html

Upvotes: 4

Related Questions