hello,
I met a problem. I want to use the openmv to track the red color, but it doesnt work. How is blob.code() used? follows are the codes from example. is there anyone who can give me some advice? thanks a lot.
while(True):
clock.tick()
img = sensor.snapshot()
for blob in img.find_blobs(thresholds, pixels_threshold=100, area_threshold=100, merge=True):
if blob.code() ==(1 << 0): # r/g code == (1 << 1) | (1 << 0)
img.draw_rectangle(blob.rect())
img.draw_cross(blob.cx(), blob.cy())
print(clock.fps())