Navigation

    • Login
    • Search
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. Home
    2. 34ak
    3
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    34ak

    @34ak

    0
    Reputation
    2
    Posts
    620
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    34ak Follow

    Posts made by 34ak

    • RE: 当识别到多个物体时(包括同种颜色的物体)如何返回所有矩形框的坐标

      救救我,我也好奇怎们弄

      posted in OpenMV Cam
      3
      34ak
    • 单种颜色,三个物块,怎么返回三个物块的中心坐标呀?
         img = sensor.snapshot() # 从感光芯片获得一张图像
      
          blobs = img.find_blobs([green_threshold])
      
          if blobs:
          #如果找到了目标颜色
              for b in blobs:
              #迭代找到的目标颜色区域
                  # Draw a rect around the blob.
                  img.draw_rectangle(b[0:4]) # rect
                  #用矩形标记出目标颜色区域
                  img.draw_cross(b[5], b[6]) # cx, cy
                  #在目标颜色区域的中心画十字形标记
                  for c in blobs:
                  #迭代找到的目标颜色区域
                      # Draw a rect around the blob.
                      img.draw_rectangle(c[0:4]) # rect
                      #用矩形标记出目标颜色区域
                      img.draw_cross(c[5], c[6]) # cx, cy
                      #在目标颜色区域的中心画十字形标记请在这里粘贴代码
      

      这样只是得到一个目标,镜头里出现多个物块的时候,返回的是那一个坐标呀?要怎样分别得到他们的中心坐标?

      posted in OpenMV Cam
      3
      34ak