@kidswong999 我测了一下霍夫圆检测要180ms左右
G
g4cp 发布的帖子
-
怎么有效的提高识别圆的帧率,我这儿是fps5左右
import sensor, image, time, pyb
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # grayscale is faster
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)
#sensor.skip_frames(time = 2000)
clock = time.clock()while(True):
#time_start1 = pyb.millis()
clock.tick()img = sensor.snapshot()#.lens_corr(1.8) time_start = pyb.millis() for c in img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,r_min = 2, r_max = 100, r_step = 2): duration = pyb.elapsed_millis(time_start) print(duration) img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0)) print(clock.fps())