Convert Matplotlib Plot To Opencv Image Segmentation Using Clustering