导航

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

    gks4

    @gks4

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

    gks4 关注

    gks4 发布的帖子

    • 代码写对了,运行说语法错误,为什么?

      r01 = FirstFindTemplate(template01)0_1721286974929_33f6b9e9a87f0ba25238a375644be56.png

      发布在 OpenMV Cam
      G
      gks4
    • 代码倒数第四行,运行后说是没有定义,问一下在哪里定义?
      #Single Color RGB565 Blob Tracking Example
      #
      #This example shows off single color RGB565 tracking using the OpenMv Cam.
      
      import sensor, image, time
      
      #Color Tracking Thresholds (L Min, L Max, A Min, A Max, B Min, B Max,)
      #The below thresholds track in general red/green/blue things. You may wish to tune them..
      thresholds = (30,100,15,127,15,127) # generic_red_thresholds
      
      
      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()
      
      #Only = blobs that with more pixels than "pixel_threshold" and more area than "area_threshold" area
      # returned by "find_blobs"below. Change "pixels_threshold" and "area_threshold" if you change the
      # camera resolution. "merge=True" merges all overlapping blobs in the image.
      
      while(True):
          clock.tick()
          img = sensor.snapshot()
          for blob in img.find_blobs([thresholds[threshold_index]], pixels_threshold = 200,area_threshold = 200, merge=True):
              img.draw_rectangle(blob.rect())
              img.draw_cross(blob.cx(),blob.cy())
              print(clock.fps())
      
      发布在 OpenMV Cam
      G
      gks4
    • template3L = image.Image("/3L.pgm")

      语法错误:无效语法。为什么?

      发布在 OpenMV Cam
      G
      gks4