2022
09-18
09-18
基于Python的OpenCV骨架化图像并显示(skeletonize)
1.效果图自己画一张图,原图VS骨架效果图如下:opencvlogo原图VS骨架化效果图如下:2.源码#图像骨架化~importcv2importimutilsimportnumpyasnpimg=np.zeros((390,390,3),dtype="uint8")cv2.putText(img,"BeautifulGirl.....",(50,190),cv2.FONT_HERSHEY_SIMPLEX,1,(255,255,255),3)cv2.imshow("img",img)cv2.waitKey(0)cv2.imwrite("j.jpg",img)#骨架图依赖灰度图#灰度图转换法一img=cv2.imread...
继续阅读 >