modified src to segment and contour - using simplecv