This code is borderline functional due to the underlying UCM/Normalised cut implementation of [https://github.com/HiDiYANG/gPb-GSoC]. In particular, seg-faults occur predominantly when input images are large >400x400. Feel free to suggest bug fixes/PRs.
This method generates Ultra Metric Contour hierarchical segmentation of images as in
Arbelaez, Pablo, et al. "Contour detection and hierarchical image segmentation." IEEE transactions on pattern analysis and machine intelligence 33.5 (2010): 898-916.
It is a port from https://github.com/vrabaud/gPb. It comes with a boost/python wrapper and uses OpenCV internally.
- OpenCv > 4
To compile with python wrapper you will need:
It is tested with Boost > 1.58, OpenCV > 4, and Python > 3
Clone repository along with submodules
git clone --recurse-submodules [email protected]:lejeunel/gPb-GSoC.git
Install the package with:
cd gPb-GSoC
mkdir build
cd build
For python wrapper:
cmake -DUSE_PY ..
make
python src/setup.py install
Without wrapper:
cmake ..
make
See demo.py or main