A C++ implementation of matlab's bwlabel



Hi all, I need an efficient C++ implementation of matlab's bwlabel. I was wondering if a publicly available one already exists; and if not, where can I find a description of the most efficient algorithm for it.

Thanks,
RS
.