I asked google and I've tried to find something in the API of OpenCV, but hadn't any good hints on split and merge image segmentation method. I want to test it, if it's working better than my proposed method which I posted a while ago here on SP. Do you know if there exists a free library or OpenCV extension for this segmentation method? Any good hints for writing it fast by myself are welcome, if there is no available solution.

kind regards


I asked Google again for you, but I did manage to find some hits in the end. There is already a very good question on stackoverflow concerning the exact same thing you are interested in.

There is a very nice explanation of split-and-merge provided in one of the answers, as well as simplified pseudocode.

The other answer provides a link to the implementation (although I did not check it, I'm not sure which language the implementation is in).

If you want to use split-and-merge as a reference segmentation technique to compare your idea with, other segmentation methods offered by OpenCV might also be interesting:

In the end, you can choose one of the already offered methods as the reference method after all, or, if you want to present amazing, all-encompassing comparisson, you might also want to use more than one reference method


Here's a link to an implementation of ISODATA. Its something that I used for a project of mine earlier.


ISODATA is a merge and split algorithm which is based off the size of the region. Other merge and split algorithms may use 'different techniques' based on different parameters for merging and splitting regions.


I stumbled upon this link. It offers an implementation of watershed segmentation using opencv. There is also an example of using grabcut, which can help in segmenting out fo

  • 1
    $\begingroup$ did you post the answer unfinished? Also, I don't think watershed segmentation is a right way to go here: it provides a segmentation in to a large number of small, homogenous regions, while the question is about an object segmentation implementation that can be used as a reference to compare a new object segmentation method? $\endgroup$ – penelope Nov 21 '12 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.