另外接上这两个口后,连接的时候灯也不闪了
qy6m
@qy6m
qy6m 发布的帖子
-
usb无法连接
早上用还正常,下午就连不上了,连接电脑的时候无法识别usb。。尝试dfu。连上boot和rst后接电脑没有看到教程所示的stm device dfu model...
-
RE: 遍历图像用什么接口?
@kidswong999 不是的。。测了一下 不带循环能跑30-40帧,加了循环7-8帧 320*240的,还能接受。循环里写get_pixel就只能跑0.3-0.5帧。。我用的是例子里clock.fps输出帧数。。
-
识别圆怎么不把不完整的圆带进来
img = sensor.snapshot().lens_corr(1.8) #获取图像img.binary([thresholds[color]]) #二值化
nMaxSize = 0 #最大尺寸
nCount = 0 #计数
imgSize = [0, 0]
circlePix = [0, 0, 0]
imgSize[0] = img.width()
imgSize[1] = img.height()
for cir in img.find_circles(threshold = 2500, x_margin = 10, y_margin = 10, r_margin = 10, r_min = 50, r_max = 100, r_step = 2):
if nCount == 0:
nMaxSize = cir.r()
circlePix[0] = cir.x()
circlePix[1] = cir.y()
circlePix[2] = cir.r()
nCount = nCount + 1
else :
nNowSize = cir.r()
if nMaxSize < nNowSize:
nMaxSize = nNowSize
nCount = nCount + 1
circlePix[0] = cir.x()
circlePix[1] = cir.y()
circlePix[2] = cir.r()
if nCount == -1:return False
else :
img.draw_circle(circlePix[0], circlePix[1], circlePix[2])
circlePixels[0] = circlePix[0]–imgSize[0]/2
circlePixels[1] = circlePix[1] - imgSize[1]/2
circlePixels[2] = circlePix[2]
代码是求最大圆,可是会把一些不是圆的识别进来
图上实际只是一根弯曲的线 -
rgb_to_lab问题
img= sensor. snapshot()
trgb=[(200, 0, 0) , (255, 50, 50)]
tlab=img.rgb_to_lab(tfb[0[])
报错 Image object has no attribute 'rgb
_to_lab'