Python中文
首页
教程
问答
标签
搜索
登录
注册
基于Python-OpenCV的图像分割目标位置检测
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我需要在左边找到肿瘤的位置。在</p> <p>{1}$ <img src="https://i.stack.imgur.com/RXKZb.jpg" width="240"/></p> <p>我尝试使用轮廓和精明的边缘检测来检测侧面,但似乎不起作用</p> <pre><code># Find Canny edges edged = cv2.Canny(img, 30, 200) cv2.waitKey(0) # Finding Contours # Use a copy of the image e.g. edged.copy() # since findContours alters the image contours, hierarchy = cv2.findContours(edged, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) cv2.imshow('Canny Edges After Contouring', edged) cv2.waitKey(0) print("Number of Contours found = " + str(len(contours))) # Draw all contours # -1 signifies drawing all contours cv2.drawContours(img, contours, -1, (0, 255, 0), 3) </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p><code>canny</code>和{<cd2>}不是解决这类问题的好方法。如果你想要一个简单的解决方案,只需使用阈值法。大津阈值也会给你一个很好的结果。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
Python闭包能否存储和更改外部标量?
3 回答
python闭包行为怪异
5 回答
python闭包问题源代码编译器
6 回答
Python问gam
3 回答
Python问答游戏逻辑E
10 回答
Python问答程序。你能帮我找出哪里出了问题吗?谢谢
6 回答
Python问答程序问题与分数
10 回答
Python问题
3 回答
Python问题 | 在https://www.testdome.com开发的代码测试分数有bug吗
7 回答
Python问题,上载文件的名称和缩略图
4 回答
python问题,将img的相对url连接到绝对url
3 回答
Python问题,机械化机器人
5 回答
Python问题,用不同的模板发送大量电子邮件?
4 回答
Python问题,类型错误:“float对象不能解释为integer”。无法在“for”循环中返回函数的值
8 回答
Python问题:“overflowerr:Python int太大,无法转换为C long”
10 回答
Python问题:“空数据帧的绑定方法NDFrame.head”
7 回答
Python问题:AttributeError:'_io.TextIOWrapper'对象没有属性'split'
8 回答
Python问题:AttributeError:'dict'对象没有'upper'属性
7 回答
Python问题:CS圆7C循环,正方形普查
2 回答
Python问题:ODE系统的参数估计,例如系数是函数
2 回答