hackmachine
hackmachine

Reputation: 17

mean shift image segmentation

I've implemented the meanshift algorithm from http://courses.csail.mit.edu/6.869/handouts/PAMIMeanshift.pdf with fixed bandwidth for now. When I run my MATLAB on the cameraman image with h=[8 4 10] as they suggest I get around 4000 clusters (I do a raster scan of the pixels, for each one compute the mode to which it maps and merge regions if they are within h). This algorithm also takes around 5 minutes for 256x256 case.

I have tried reading/using their code but I would need some explanations...

Are my results to be expected or can I get this to fewer clusters without some post processing?

Upvotes: 0

Views: 6117

Answers (2)

mkuse
mkuse

Reputation: 2488

There is an implementation called EDISON which implements mean-shift clustering. It is available as a GUI package as well as a mex-matlab wrapper http://coewww.rutgers.edu/riul/research/code/EDISON/index.html

You may find it helpful to compare your results with it.

Upvotes: 1

hackmachine
hackmachine

Reputation: 17

If I look at the number of pixels per cluster i see that most of the 4000 have fewer than 20 points (the third number in the h vector defined in the paper) so by merging those regions with larger ones there is a more manageable number of clusters

Upvotes: 1

Related Questions