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
path
statements and writing them to a text file w3schools.com/graphics/svg_path.asp You may need to make an initial pass to know the maximum dimensions for your page-size, or you just use the dimensions of your original image on which you found the contours. – Norahnorbert