关于blob赋值给变量的问题
-
def find_bluemax(blobs,cox,coy,cw,ch): max_sizes=0 global min_blob for blob in blobs: if blob[0]>=cox and blob[1]>=coy and blob[3]<=ch and blob[2]<=cw and blob[0]<=(cox+cw) and blob[1]<= (coy+ch) and blob[4]>=100: if blob[2]*blob[3] > max_sizes: min_blob=blob max_sizes = blob[2]*blob[3] return min_blob
程序逻辑不用看,就一个问题,blob赋值min_blob(一开始以为变量定义的名字错误,然后瞎改的)系统提示说min_blob没有定义
-
http://book.openmv.cc/project/zhui-xiao-qiu-de-xiao-8f665d28-project-pan-tilt-md.html#调整参数,实现跟随
看我写的find_max函数