Example explanation 16--qrcodes_with_lens_zoom QR code recognition

Video tutorial 15 - Scan code recognition: https://singtown.com/learn/50017/

This example is 09-qrcodes_with_lens_zoom.py\ The goal of this example is to implement QR code detection.

# 二维码识别示例
#
# 这个例子展示了OpenMV Cam的功能,可以在不需要镜头校正的情况下检测QR码。
import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.VGA)
sensor.set_windowing((240, 240)) # 看VGA分辨率中间的240x240像素。
sensor.skip_frames(30)
sensor.set_auto_gain(False)  # 必须关闭此功能,以防止图像冲洗…
clock = time.clock()

while(True):
    clock.tick()
    img = sensor.snapshot()
    for code in img.find_qrcodes():
        print(code)
    print(clock.fps())

The QR code we scanned:

\ Check the running effect in the terminal:

We found that the output QR code address is [[https://kaizhi-xu.taobao.com/]]

Singtown Technology OpenMV official Chinese document function explanation:

results matching ""

    No results matching ""