> Overload resolution failed:> - Can‘t parse ‘pt‘. Sequence item with index 0 has a wrong type
long_songs 正在上传…重新上传取消 于 2022-05-12 17:42:57 发布 1260 收藏 1
分类专栏: python 文章标签: python opencv 机器学习
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/long_songs/article/details/124736338</a>
版权
<div id="blogColumnPayAdvert">
<div class="column-group">
<div class="column-group-item column-group0 column-group-item-one">
<div class="item-l">
<a class="item-target" href="https://blog.csdn.net/long_songs/category_11645474.html" target="_blank" title="python" data-report-click="{"spm":"1001.2101.3001.6332"}">
<img class="item-target" src="https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="">
<span class="title item-target">
<span>
<span class="tit">python</span>
<span class="dec">专栏收录该内容</span>
</span>
</span>
</a>
</div>
<div class="item-m">
<span>16 篇文章</span>
<span>1 订阅</span>
</div>
<div class="item-r">
<a class="item-target article-column-bt articleColumnFreeBt" data-id="11645474">订阅专栏</a>
</div>
</div>
</div>
</div>
<article class="baidu_pl">
<div id="article_content" class="article_content clearfix">
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-bbac9290cd.css">
<div id="content_views" class="htmledit_views">
<p>这种就是因为不是int</p>
被这种折磨坏了?
-
File "/Users/alex/opt/anaconda3/lib/python3.8/multiprocessing/pool.py", line 125, in worker
-
result = (True, func(args, *kwds))
-
File "/Users/alex/opt/anaconda3/lib/python3.8/multiprocessing/pool.py", line 51, in starmapstar
-
return list(itertools.starmap(args[0], args[1]))
-
File "/Users/alex/Desktop/CLAM/CLAM/wsicore/WholeSlideImage.py", line 481, in processcoord_candidate
-
if WholeSlideImage.isInContours(cont_check_fn, coord, contour_holes, ref_patch_size):
-
File "/Users/alex/Desktop/CLAM/CLAM/wsi_core/WholeSlideImage.py", line 345, in isInContours
-
if cont_check_fn(pt):
-
File "/Users/alex/Desktop/CLAM/CLAM/wsi_core/util_classes.py", line 86, in __call
-
if cv2.pointPolygonTest(self.cont, points, False) >= 0:
-
cv2.error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'pointPolygonTest'
-
> Overload resolution failed:
-
> - Can't parse 'pt'. Sequence item with index 0 has a wrong type
-
> - Can't parse 'pt'. Sequence item with index 0 has a wrong type
不需要修改版本,也不需要重新配置,
只用一步,药到病除!
-
cv2.floodFill(src_image, mask, (col,row), (255, 255, 255), (30, 30, 30), (30, 30, 30), flags)
-
cv2.circle(flood_img,center=(col,row),radius=2,color=(0,0,255),thickness=2)
在能加int的地方全给 int()上就完事了!
-
cv2.floodFill(src_image, mask, (int(col),int(row)), (255, 255, 255), (30, 30, 30), (30, 30, 30), int(flags))
-
cv2.circle(flood_img,center=(int(col),int(row)),radius=2,color=(0,0,255),thickness=2)