
python
2021黑白灰
这个作者很懒,什么都没留下…
展开
-
python——图像细化算法之矩形中轴线提取完整代码
原图: 提取效果: 迭代225次 迭代230次 完整代码: 迭代次数200,运行次数可能需要五分钟,耐心等待 #! /usr/bin/env python3 # -*- coding:utf-8 -*- import cv2 import copy #原理就是使图像左右方向越来越“瘦” def v_thin(img): h, w = img.shape i_next = 1 for i in range(h): for j in rang.原创 2022-04-26 10:14:39 · 3407 阅读 · 0 评论 -
PyCharm学习笔记
PyCharm使用Anaconda之前创建的虚拟环境 参考: Ubuntu中pycharm中如何使用Anaconda中的虚拟环境_模糊包的博客-优快云博客_pycharm使用anaconda虚拟环境https://blog.youkuaiyun.com/xinjieyuan/article/details/89503006原创 2022-04-19 17:33:32 · 863 阅读 · 0 评论 -
opencv-python——AttributeError: module ‘cv2‘ has no attribute ‘setNumThreads‘完美解决
原因:高版本的opencv-python里的很多函数被集成到了其他地方,具体也不是很清楚 解决: pip install opencv-python==4.1.2 安装较低版本,完美解决!原创 2022-04-15 11:11:24 · 9589 阅读 · 1 评论 -
ValueError: invalid literal for int() with base 10: ‘325.49238578680206‘
Processing: 0%| | 0/3600 [00:00<?, ?it/s] Traceback (most recent call last): File "2.py", line 166, in <module> bndbox = read_xml_annotation(XML_DIR, name) File "2.py", line 30, in read_xml_annotatio.原创 2022-03-29 17:41:30 · 406 阅读 · 0 评论 -
ValueError: threshold must be non-NAN, try sys.maxsize for untruncated representation
如果是python3,代码前有 # -*- coding:utf-8 -*- 的话, 直接把 np.set_printoptions(suppress=True, threshold=sys.inf) 这句注释掉即可。原创 2022-03-29 10:58:48 · 1058 阅读 · 0 评论