Python中文
首页
教程
问答
标签
搜索
登录
注册
drawContours的数据类型错误,除非我pickle/unpickle firs
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>在Windows上的python2.7.3上,opencv2.4.3遇到了一个有趣的错误。当我尝试使用drawcurtours时,我得到一个“TypeError:contours data type=5 is not supported”错误,除非我先pickle/unpickle轮廓。</p> <p>这不起作用(我得到“TypeError:contours data type=5 is not supported”):</p> <pre><code>noBg = cv2.blur(src, (5,5)) noBg = cv2.inRange(noBg, np.array([80, 0, 200], np.uint8), np.array([255, 50, 255], np.uint8)) noBg = np.invert(noBg) contours, hierarchy = cv2.findContours(noBg, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) cv2.drawContours(src, contours, -1, (0,255,0), 3) </code></pre> <p>但这确实有效:</p> ^{pr2}$ <p>其他人有没有看到这种行为,或者我遗漏了一些明显的东西?我是python/opencv新手,所以很可能是这样。</p> <p><strong>编辑:</strong>刚刚在我的Mac上测试过,两种情况都很好。可能只是Windows的问题?</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>如果降级到opencv 2.4.2,这将起作用。这似乎是两周前刚刚发布的2.4.3的一个bug。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
文本导入时标题行中的特殊字符
8 回答
文本小部件:在没有输入时更新并在循环后保持空闲
5 回答
文本小部件tkin
1 回答
文本小部件tkinter中的标签更改或文本外观更改是否有撤消功能?
8 回答
文本小部件tkinter复制图像选项
1 回答
文本小部件上的Python Tkinter ttk滚动条未缩放
5 回答
文本小部件上的滚动条可能需要根据制表符ord显示前进行滚动
5 回答
文本小部件不显示lis中的内容
1 回答
文本小部件不显示Unicode字符
1 回答
文本小部件中写入的行间距
6 回答
文本小部件中的文本作为变量
3 回答
文本小部件中的滚动条仅显示在底部
6 回答
文本小部件中的选项卡键空间计数
5 回答
文本小部件作为Lis
4 回答
文本小部件在主框架中扩展列宽
9 回答
文本小部件未使用删除功能清除
1 回答
文本小部件滚动动画(Tkinter、Python)
1 回答
文本居中。格式正确吗?
6 回答
文本差分算法
6 回答
文本已知时音频文件中的单词索引
7 回答