build a python+OpenCV segmentation class with different segmentation methods in it