如何在Imutils库中使用相关功能
关于iMutils
与OpenCV相关的库,我有以下问题:
的函数是什么。Contours.Sort_Contours()
?(cnts,_)= Contours.sort_contours(cnts)
在上述语句中,(CNTS,_)
的含义是什么,尤其是' _'
注意:cnts
是一个包含识别图像轮廓的变量 我的英语不是很好,对不起!谢谢大家的回答和帮助!
Regarding the imutils
library related to OpenCV, I have the following questions:
What is the function of
contours.sort_contours()
?(cnts, _) = contours.sort_contours(cnts)
In the above statement, what is the meaning of(cnts, _)
, especially'_'
Note: cnts
is a variable containing the contours of the recognized image
My English is not very good, sorry! Thank you all for your answers and help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iMutils
库是一个便利库编写,以使基本的图像处理任务更容易( https:/ /Github.com/pyimagesearch/imutils )。这样的任务之一是在图像中对轮廓进行排序和标记。基于在此提供的文档,有一个单独的<代码> Contours.py 文件托管
sort_contours()
和label_contour
函数。 (您需要记住,这些功能只能在使用openCV
找到轮廓后才使用)现在回答您的问题:
1。
Contours.sort_contours()
?sort_contour()
:contours.sortsors.sort_contours()
。2。理解
(cnts,_)= Contours.Sort_Contours(CNTS)
cnts
。cnts
用于存储排序的轮廓。_
,该变量存储了边界框。_
在不需要进一步处理时大多使用变量。The
imutils
library is a convenience library written to make basic image processing tasks easier (https://github.com/PyImageSearch/imutils).One such task is sorting and labelling contours in images. Based on documentation provided here, there is a separate
contours.py
file hostingsort_contours()
andlabel_contour
functions. (You need to remember that these functions can be used only after finding contours usingOpenCV
)Now to answer your questions:
1. What is the function of
contours.sort_contours()
?sort_contour()
from the filecontours.py
in this way:contours.sort_contours()
.2. Understanding
(cnts, _) = contours.sort_contours(cnts)
cnts
.cnts
is used to store the sorted contours._
, which stores the bounding boxes._
is mostly used a variable when it will not be needed for further processing.