Skip to content
Snippets Groups Projects
Commit d17e0410 authored by Shahrul Kamil bin Hassan's avatar Shahrul Kamil bin Hassan
Browse files

Replace square_tracking.py

parent 70a3b68f
No related merge requests found
......@@ -23,7 +23,7 @@ sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...
sensor.set_auto_exposure(False, 25000)
sensor.set_auto_exposure(False, 5000)
clock = time.clock()
while(True):
......@@ -38,8 +38,11 @@ while(True):
# have larger edge magnitudes the larger and more contrasty they are...
for r in img.find_rects(threshold = 5000):
#img.draw_rectangle(r.rect(), color = (255, 0, 0))
#for p in r.corners(): img.draw_circle(p[0], p[1], 5, color = (0, 255, 0))
img.draw_rectangle(r.rect(), color = (255, 0, 0))
for p in r.corners(): img.draw_circle(p[0], p[1], 5, color = (0, 255, 0))
print(r)
print("FPS %f" % clock.fps())
#print("FPS %f" % clock.fps())
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment