Convert contour paths to svg paths
问题 I am using openCV with python to extract contours from an image. Now I need to export these contour paths (list) as an svg paths. How can I achieve this ? code: ret,thresh = cv2.threshold(imgray,27,25,0) contours, hierarchy = cv2.findContours(thresh, cv2.RETR_EXTERNAL , cv2.CHAIN_APPROX_TC89_L1) print(type(contours)) #type list 回答1: the problem has been solved as follows: c = max(contours, key=cv2.contourArea) #max contour f = open('path.svg', 'w+') f.write('<svg width="'+str(width)+'" height