OpenCV Smoother contour

The reason I have been using contours is so that I can export a vector path ( which is the intended output of this program)