logo

这个识别外形的程序有什么问题吗

2018-05-01 20:55
E
小爆虎

import sensor, image, time

sensor.reset()

sensor.set_pixformat(sensor.RGB565)

sensor.set_framesize(sensor.QVGA)

sensor.skip_frames(time = 2000)

clock = time.clock()

Auto=(0,20,100,100)

while(True):

clock.tick()

img = sensor.snapshot()

for c in img.find_circles(threshold = 1600, x_margin = 10 , y_margin = 10, r_margin = 5, roi=Auto):

img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))

print(c)

print("FPS %f" % clock.fps())

2018-05-01 21:17
I
网红小智智 星瞳科技

请说一下具体的问题,比如要做什么,现在程序有什么问题。

2018-05-02 14:59
T
laoguren1122

将clock.tick()前空两格,就可以了,格式问题