这种就是因为不是int
被这种折磨坏了?
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/wsi_core/WholeSlideImage.py", line 481, in process_coord_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)
无脑添加,畅通无阻 !
解决90%以上此类问题,解决不了直接来喷我
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/73530.html