导航

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

    1sp3

    @1sp3

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

    1sp3 关注

    1sp3 发布的帖子

    • openmv cam h7 plus系列可以使用nn函数吗??,如果可以怎么添加使用呢?????

      希望得到解答,十分感谢!!

      发布在 OpenMV Cam
      1
      1sp3
    • RE: 恢复到旧版(3.6.4)固件库后例程中还是没有nn库是为什么

      @kidswong999 openmv cam h7 pius系列可以使用nn函数吗

      发布在 OpenMV Cam
      1
      1sp3
    • 怎么解决这个对象不可迭代问题啊?

      0_1627642685723_微信图片_20210730185559.png

      # MAVLink OpticalFlow Script.
      #
      # This script sends out OpticalFlow detections using the MAVLink protocol to
      # an LIGHT/PixHawk UAV controller for position control using your OpenMV Cam.
      #
      # P4 = TXD 115200,8,N,1
      
      
      import sensor, image, time, pyb, struct, math
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE
      sensor.set_framesize(sensor.QQQQVGA) # or B40x30 or B64x64
      clock = time.clock() # Tracks FPS.
      
      old = sensor.snapshot()
      
      uart = pyb.UART(3, 115200, timeout_char = 1000)
      
      def send_optical_flow_packet(x, y, c):
          temp = struct.pack("<bbiii",
                             0xAA,
                             0xAE,
                             int(x * 100000 ), # up sample by 4
                             int(y * 100000 ), # up sample by 4
                             int(c * 100000))
          uart.write(temp)
      
      
      while(True):
          clock.tick() # 获取时间
          img = sensor.snapshot() # 获取一帧图像
          [delta_x, delta_y, response] = old.find_displacement(img) #获取前面一张图像与刚捕获的图像之间的偏移
          old = img.copy()
          #print("%0.6fX   %0.6fY   %0.2fC   %0.2fFPS" % (delta_x, delta_y, response, clock.fps()))
          if (not (math.isnan(delta_x) or math.isnan(delta_y) or math.isnan(response))):
              send_optical_flow_packet(delta_x, delta_y, response)
      
      
      发布在 OpenMV Cam
      1
      1sp3