This document presents an implementation of an algorithm to perform a morphological opening on a graph. The intent is to remove short branches in a graph while preserving the large scale structure. This implementation is based on the algorithm described in “Efficient Closed Contour Extraction from Range Image’s Edge Points”. We have used the data structures from Boost Graph Library (BGL).

The code is available here.

This work was published in  The MIDAS Journal – Computational Algorithms. Click here to see the full article.