导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. 13250562320
    1
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    13250562320

    @13250562320

    0
    声望
    9
    楼层
    920
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    13250562320 关注

    13250562320 发布的帖子

    • RE: 如何提取条形码的值

      已经把代码重新发了给你。

      发布在 OpenMV Cam
      1
      13250562320
    • 条形码不能通过串口发送code.payload

      import sensor, image, time, math
      from pyb import UART
      import json
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.VGA)
      sensor.set_windowing((640, 80))
      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False)
      sensor.set_auto_whitebal(False)
      clock = time.clock()
      uart = UART(3,4800)
      def barcode_name(code):
      if(code.type() == image.EAN2):
      return "EAN2"
      if(code.type() == image.EAN5):
      return "EAN5"
      if(code.type() == image.EAN8):
      return "EAN8"
      if(code.type() == image.UPCE):
      return "UPCE"
      if(code.type() == image.ISBN10):
      return "ISBN10"
      if(code.type() == image.UPCA):
      return "UPCA"
      if(code.type() == image.EAN13):
      return "EAN13"
      if(code.type() == image.ISBN13):
      return "ISBN13"
      if(code.type() == image.I25):
      return "I25"
      if(code.type() == image.DATABAR):
      return "DATABAR"
      if(code.type() == image.DATABAR_EXP):
      return "DATABAR_EXP"
      if(code.type() == image.CODABAR):
      return "CODABAR"
      if(code.type() == image.CODE39):
      return "CODE39"
      if(code.type() == image.PDF417):
      return "PDF417"
      if(code.type() == image.CODE93):
      return "CODE93"
      if(code.type() == image.CODE128):
      return "CODE128"
      while(True):
      clock.tick()
      img = sensor.snapshot()
      codes = img.find_barcodes()
      for code in codes:
      img.draw_rectangle(code.rect())
      print_args = (barcode_name(code), code.payload(), (180 * code.rotation()) / math.pi, code.quality(), clock.fps())
      print("Barcode %s, Payload "%s", rotation %f (degrees), quality %d, FPS %f" % print_args)
      if not codes:
      print("FPS %f" % clock.fps())
      uart.write( code.payload)
      time.sleep(1000)

      发布在 OpenMV Cam
      1
      13250562320
    • RE: 如何提取条形码的值

      调整排列后,又出现NameError:name' code' is not defined

      发布在 OpenMV Cam
      1
      13250562320
    • RE: 如何提取条形码的值

      报SyntaxError:invalid syntax

      发布在 OpenMV Cam
      1
      13250562320
    • RE: 如何提取条形码的值

      来自星瞳实验室APP: image — 机器视觉 — MicroPython 1.9.2 文档https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html?highlight=qrcode#id19 还是报错啊

      发布在 OpenMV Cam
      1
      13250562320
    • 如何提取条形码的值

      Openmv已经读取了条形码了,但是无法将payload“%S”调取出来(用串口形试)

      发布在 OpenMV Cam
      1
      13250562320
    • 用教程公式的二维码扫描不到,不知道怎么回事

      import sensor, image

      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA) # can be QVGA on M7...
      sensor.skip_frames(30)
      sensor.set_auto_gain(False) # must turn this off to prevent image washout...
      while(True):
      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():
      print(code)

      发布在 OpenMV Cam
      1
      13250562320
    • RE: 我想把MV确认到的颜色控制I0口

      我想MV模块检查出有我想要的颜色,模块的P1口有l0信号

      发布在 OpenMV Cam
      1
      13250562320
    • 我想把MV确认到的颜色控制I0口

      我想MV确认到黄色就P1有电,绿色就P2有电,红色就P3……。

      例程讲解10-Color-Tracking->multi_color_blob_tracking多颜色跟踪

      多颜色跟踪示例

      这个例子显示了使用OpenMV的多色跟踪。

      import sensor, image, time

      颜色跟踪阈值(L Min, L Max, A Min, A Max, B Min, B Max)

      下面的阈值跟踪一般红色/绿色的东西。你不妨调整他们...

      thresholds = [(30, 100, 15, 127, 15, 127), # generic_red_thresholds
      (30, 100, -64, -8, -32, 32), # generic_green_thresholds
      (0, 15, 0, 40, -80, -20)] # generic_blue_thresholds

      不要超过16个颜色阈值

      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QVGA)
      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False) # must be turned off for color tracking
      sensor.set_auto_whitebal(False) # must be turned off for color tracking
      clock = time.clock()

      只有比“pixel_threshold”多的像素和多于“area_threshold”的区域才被

      下面的“find_blobs”返回。 如果更改相机分辨率,

      请更改“pixels_threshold”和“area_threshold”。 “merge = True”合并图像中所有重叠的色块。

      while(True):
      clock.tick()
      img = sensor.snapshot()
      for blob in img.find_blobs(thresholds, pixels_threshold=200, area_threshold=200):
      img.draw_rectangle(blob.rect())
      img.draw_cross(blob.cx(), blob.cy())
      print(clock.fps())

      发布在 OpenMV Cam
      1
      13250562320