Page 1 of 1

What does it mean ?

Posted: Wed Mar 13, 2019 4:17 pm
by duyci
This is the example code of the QR code. But I have some question about the this code.
What is the code mean in this line

Code: Select all

 for code in img.find_qrcodes():
And what is the behind of the find_qrcodes() function. How can I find the explanation about the some function.

Code: Select all

# QRCode Example
# This example shows the power of the OpenMV Cam to detect QR Codes
# using lens correction (see the script for higher performance).

import sensor, image, time

sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
clock = time.clock()

    img = sensor.snapshot()
    img.lens_corr(1.8) # strength of 1.8 is good for the 2.8mm lens.
    for code in img.find_qrcodes():
        img.draw_rectangle(code.rect(), color = (255, 0, 0))

Re: What does it mean ?

Posted: Thu Mar 14, 2019 11:55 am
by kwagyeman
Hi, the method finds QR Codes. The C code that implements it is here: ... g/qrcode.c