导航

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

    6vdo

    @6vdo

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

    6vdo 关注

    6vdo 发布的帖子

    • RE: 这个是什么问题,求助????怎么解决???

      @kidswong999 在 这个是什么问题,求助????怎么解决??? 中说:

      请提供全部的代码,可以运行的文本

      import sensor, image, time
      from pyb import UART
      import json
      yellow_threshold   = (35, 56, -6, 127, -1, 104)
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA)
      sensor.skip_frames(10)
      sensor.set_auto_whitebal(False)
      clock = time.clock()
      uart = UART(3, 115200)
      def find_max(blobs):
          max_size=0
          for blob in blobs:
              if blob.pixels() > max_size:
                  max_blob=blob
                  max_size = blob.pixels()
          return max_blob
      def tongxin():
          img = sensor.snapshot()
          blobs = img.find_blobs([yellow_threshold])
          if blobs:
              max_blob=find_max(blobs)
              print('sum :', len(blobs))
              img.draw_rectangle(max_blob.rect())
              img.draw_cross(max_blob.cx(), max_blob.cy())
              output_str='2'
              return('you send:',output_str)
              uart.write(output_str)
          else:
              return('not found!')
      while(True):
          uart.write('2')
          #print(a)
          if uart.any():
              b=uart.readline()
              print(b)
      
      
      发布在 OpenMV Cam
      6
      6vdo
    • RE: 这个是什么问题,求助????怎么解决???

      这个不能运行吗?

      发布在 OpenMV Cam
      6
      6vdo
    • 这个是什么问题,求助????怎么解决???

      0_1544791701168_20181214204336.png

      发布在 OpenMV Cam
      6
      6vdo