def sizeFiltering(contours):
"""
this function filters out the smaller retroreflector (as well as any noise) by size
"""
if len(contours) == 0:
print "sizeFiltering: Error, no contours found"
return 0
big = contours[0]
for c in contours:
if type(c) and type(big) == numpy.ndarray:
if cv2.contourArea(c) > cv2.contourArea(big):
big = c
else:
print type(c) and type(big)
return 0
x,y,w,h = cv2.boundingRect(big)
return big
Falafel Vision Processing.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录