更新固件后运行旧程序时内存不足
-
# Untitled - By: Misaki - 周六 12月 19 2020 import sensor, image, time,lcd lcd.init(freq=15000000) sensor.reset() #sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) clock = time.clock() while(True): clock.tick() img = sensor.snapshot() lcd.display(img) '''for c in img.find_circles(threshold = 2500, x_margin =10, y_margin = 10, r_margin = 10,r_min = 50, r_max = 200, r_step = 2): img.draw_circle(c.x(), c.y(), c.r(), color = (255, 255, 255)) print(c) for l in img.find_line_segments(merge_distance = 0, max_theta_diff = 0): img.draw_line(l.line(), color = (255, 0, 0)) print(l)''' for r in img.find_rects(threshold=13000): img.draw_rectangle(r.rect(), color = (255, 255, 255)) img.draw_edges(r.corners(), color = (0, 0, 0)) for p in r.corners(): img.draw_circle(p[0], p[1], 5, color = (255, 255, 255)) print(r) print(clock.fps())
-
这程序也没几行,为啥这么点代码就内存不足了
-
OpenMV4 H7的硬件,find_rects只能使用QQVGA,不能使用QVGA