zoukankan      html  css  js  c++  java
  • openmv扫码通信

    import sensor, image, time 
    import json
    from pyb import UART
    
    
    
    
    
    
    sensor.reset() # 初始化相机传感器
    sensor.set_pixformat(sensor.RGB565) # use RGB565.
    sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.
    sensor.skip_frames(10) # 让新设置受到影响。
    sensor.set_auto_whitebal(False) # turn this off.
    clock = time.clock() # 跟踪FPS.
    
    
    uart = UART(3, 9600)
    
    
    while(True):
        clock.tick() # Track elapsed milliseconds between snapshots().
        img = sensor.snapshot() # Take a picture and return the image.
        img.lens_corr(1.8)
        for code in img.find_qrcodes():
            message = code.payload()
            uart.write(message)
            print(code)
  • 相关阅读:
    阴影及定位
    选择器高级、样式及布局
    css的导入与基础选择器
    html知识
    ORM
    python实现进度条
    MySQL单表查询
    一、HTTP
    mysql4
    练习——MySQL
  • 原文地址:https://www.cnblogs.com/zdh6/p/9682094.html
Copyright © 2011-2022 走看看