mathematical morphology tools for matlab and c++