导航

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

    zehg

    @zehg

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

    zehg 关注

    zehg 发布的帖子

    • arduino该怎么读openmv传来的数据?
      import sensor, image, time
      import json
      from pyb import UART
      sensor.reset()#重启摄像头
      sensor.set_pixformat(sensor.RGB565) # grayscale is faster
      #设置图像的大小
      sensor.set_framesize(sensor.QQVGA)#表示拍摄画面的大小为160×120像素
      #因为sensor参数设定之后, 图像质量不稳定, 要过一段时间。 跳过n张照片,在更改
      #设置后,跳过一些帧,等待感光元件变稳定。这里是跳过2000毫秒
      sensor.skip_frames(time = 2000)
      clock = time.clock()
      uart = UART(3, 115200)
      while(True):
          clock.tick() #每次循环更新时钟
          img = sensor.snapshot().lens_corr(1.8)
          for c in img.find_circles(threshold = 2500, x_margin = 10, y_margin = 10, r_margin = 10,
                  r_min = 2, r_max = 100, r_step = 2):
              img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))
              
              output_str="%d"%(c.r()) 
              
              uart.write(output_str)
              
          print("you send:",output_str)
      

      0_1566365354808_72fa26c4-2163-4dc3-b4c2-ec1484f21855-image.png

      发布在 OpenMV Cam
      Z
      zehg