logo

毕设需求:工业流水线固定位置15cm距离识别2cm普通QR码(仅解码)

2026-05-18 11:52
U
u5unaydqd5gf

毕设需求:工业流水线固定位置15cm距离识别2cm普通QR码(仅解码)

📌 问题类型

  • 评估图像识别需求

🔍 识别目标

  • 普通QR码(非破损、无Logo、标准格式)

📏 物理参数

  • 边长约2cm
  • 识别距离:15cm
  • 视野内物体数量:单个
  • 位置特性:固定位置,无偏移

🎯 应用需求

  • 毕设项目
  • 仅需解码内容(不需坐标/角度/姿态等附加信息)

🖼️ 环境与硬件

  • 识别背景:实验演示背景(无干扰)
  • 安装场景:工业流水线
  • 摄像头视角实拍图如下:
image
2026-05-18 13:25
Z
星小瞳xs
# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# AprilTags Example
#
# This example shows the power of the OpenMV Cam to detect April Tags
# on the OpenMV Cam M7. The M4 versions cannot detect April Tags.

import sensor
import time
import math

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
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...
clock = time.clock()

# Note! Unlike find_qrcodes the find_apriltags method does not need lens correction on the image to work.

# Please use the TAG36H11 tag family for this script - it's the recommended tag family to use.


while True:
    clock.tick()
    img = sensor.snapshot()
    for tag in img.find_apriltags():
        img.draw_rectangle(tag.rect, color=(255, 0, 0))
        img.draw_cross(tag.cx, tag.cy, color=(0, 255, 0))
        print_args = (tag.name, tag.id, (180 * tag.rotation) / math.pi)
        print("Tag Family %s, Tag ID %d, rotation %f (degrees)" % print_args)
    print(clock.fps())