导航

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

    mesi

    @mesi

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

    mesi 关注

    mesi 发布的帖子

    • RE: 有线图传显示无法显示xga画质?

      @kidswong999 好的 我寄回去测试吧 感谢大大

      发布在 OpenMV Cam
      M
      mesi
    • RE: 有线图传显示无法显示xga画质?

      @kidswong999 加入压缩图片函数 代入代码后也是无法显示 img.compressed(1)

      发布在 OpenMV Cam
      M
      mesi
    • RE: 有线图传显示无法显示xga画质?

      @kidswong999 请教一下大大,现在图片测试程序是可以到缩放到325x240,可以正常显示,但是代入程序后显示还是卡死,如何解决?

      测试代码

      import sensor, image, time ,tv
      
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.XGA)
      sensor.skip_frames(time = 2000)
      
      clock = time.clock()
      tv.init() # 初始化tv
      tv.channel(8) # 用于无线图传扩展板
      while(True):
          clock.tick()
          img = sensor.snapshot()
          img.crop(x_size=325, y_size=240)
          tv.display(img)
          print(clock.fps())
      

      代入代码

      # Barcode Example
      #
      # This example shows off how easy it is to detect bar codes using the
      # OpenMV Cam M7. Barcode detection does not work on the M4 Camera.
      
      import sensor, image, time, math,tv
      import time
      from pyb import Pin, Timer
      
      # 50kHz pin6 timer2 channel1
      #light = Timer(2, freq=50000).channel(1, Timer.PWM, pin=Pin("P6"))
      #light.pulse_width_percent(10) # adjust light 0~100
      
      import sensor, image, time
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.XGA) # High Res!
      sensor.set_windowing((1000, 400))# V Res of 80 == less work (40 for 2X the speed).
      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()
      tv.init() # 初始化tv
      tv.channel(8) # 用于无线图传扩展板
      # Barcode detection can run at the full 640x480 resolution of your OpenMV Cam's
      # OV7725 camera module. Barcode detection will also work in RGB565 mode but at
      # a lower resolution. That said, barcode detection requires a higher resolution
      # to work well so it should always be run at 640x480 in grayscale...
      
      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()
          codeh = 0
          y = 10000000
          print(len(codes))
          if (len(codes)>1):
              for code in codes:
                  img.draw_rectangle(code.rect())
                  y1 =code.y()
                  print(y1)
                  if(y1<y):
                      y = y1
                      codeh = code
      
              if(codeh != ""):
                  print_args = (barcode_name(codeh), codeh.payload(), (180 * codeh.rotation()) / math.pi, codeh.quality(), clock.fps())
                  print("Barcode %s, Payload \"%s\", rotation %f (degrees), quality %d, FPS %f" % print_args)
      
          else:
              for code in codes:
                  img.draw_rectangle(code.rect())
                  codeh = code
                  print_args = (barcode_name(codeh), codeh.payload(), (180 * codeh.rotation()) / math.pi, codeh.quality(), clock.fps())
                  print("Barcode %s, Payload \"%s\", rotation %f (degrees), quality %d, FPS %f" % print_args)
      
      
          #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))
              print(code)
      
      
          img.crop(x_scale=0.352, y_scale=0.6)
          tv.display(img)
      
      
          if not codes:
              print("FPS %f" % clock.fps())
      
      
      
      发布在 OpenMV Cam
      M
      mesi
    • RE: 有线图传显示无法显示xga画质?

      @kidswong999 请教一下大大 openmv有没有类似opencv 的resize函数 我把xga的图像压缩成352x240再显示

      发布在 OpenMV Cam
      M
      mesi
    • RE: 有线图传显示无法显示xga画质?

      @kidswong999 请教一下大大 如果需要外接显示xga需要通过什么方式

      发布在 OpenMV Cam
      M
      mesi
    • RE: 有线图传显示无法显示xga画质?

      @kidswong999请教一下大大 如果需要外接显示xga需要通过什么方式

      发布在 OpenMV Cam
      M
      mesi
    • 有线图传显示无法显示xga画质?

      使用有线图传显示,画质为xga,显示不完整且运行一会就卡死,是硬件不支持吗,需要怎样才能显示xga图像

      
      # Barcode Example
      #
      # This example shows off how easy it is to detect bar codes using the
      # OpenMV Cam M7. Barcode detection does not work on the M4 Camera.
      
      import sensor, image, time, math,tv
      import time
      from pyb import Pin, Timer
      
      # 50kHz pin6 timer2 channel1
      #light = Timer(2, freq=50000).channel(1, Timer.PWM, pin=Pin("P6"))
      #light.pulse_width_percent(10) # adjust light 0~100
      
      import sensor, image, time
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.XGA) # High Res!
      sensor.set_windowing((1000, 400))# V Res of 80 == less work (40 for 2X the speed).
      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()
      tv.init() # 初始化tv
      tv.channel(8) # 用于无线图传扩展板
      # Barcode detection can run at the full 640x480 resolution of your OpenMV Cam's
      # OV7725 camera module. Barcode detection will also work in RGB565 mode but at
      # a lower resolution. That said, barcode detection requires a higher resolution
      # to work well so it should always be run at 640x480 in grayscale...
      
      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()
          codeh = 0
          y = 10000000
          print(len(codes))
          if (len(codes)>1):
              for code in codes:
                  img.draw_rectangle(code.rect())
                  y1 =code.y()
                  print(y1)
                  if(y1<y):
                      y = y1
                      codeh = code
      
              if(codeh != ""):
                  print_args = (barcode_name(codeh), codeh.payload(), (180 * codeh.rotation()) / math.pi, codeh.quality(), clock.fps())
                  print("Barcode %s, Payload \"%s\", rotation %f (degrees), quality %d, FPS %f" % print_args)
      
          else:
              for code in codes:
                  img.draw_rectangle(code.rect())
                  codeh = code
                  print_args = (barcode_name(codeh), codeh.payload(), (180 * codeh.rotation()) / math.pi, codeh.quality(), clock.fps())
                  print("Barcode %s, Payload \"%s\", rotation %f (degrees), quality %d, FPS %f" % print_args)
      
      
          #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))
              print(code)
          tv.display(img)
          if not codes:
              print("FPS %f" % clock.fps())
      
      发布在 OpenMV Cam
      M
      mesi
    • RE: XGA连续识别条形码经常发生卡死现象?

      @kidswong999
      检查了usb接口,然后使用例程里面的条形码 改为xga画质,还是运行一段时间就卡死

      # Barcode Example
      #
      # This example shows off how easy it is to detect bar codes using the
      # OpenMV Cam M7. Barcode detection does not work on the M4 Camera.
      
      import sensor, image, time, math
      
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.XGA) # High Res!
      #sensor.set_windowing((640, 80)) # V Res of 80 == less work (40 for 2X the speed).
      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()
      
      # Barcode detection can run at the full 640x480 resolution of your OpenMV Cam's
      # OV7725 camera module. Barcode detection will also work in RGB565 mode but at
      # a lower resolution. That said, barcode detection requires a higher resolution
      # to work well so it should always be run at 640x480 in grayscale...
      
      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())
      
      
      发布在 OpenMV Cam
      M
      mesi
    • RE: XGA连续识别条形码经常发生卡死现象?

      @kidswong999 因为摸着很烫

      发布在 OpenMV Cam
      M
      mesi
    • RE: XGA连续识别条形码经常发生卡死现象?

      @kidswong999 现在测试第一次12分钟就断连 重新连接后 几分钟就断连,是不是xga大画面传输 导致温度太高了,然后自己断了 。

      发布在 OpenMV Cam
      M
      mesi