导航

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

    vxac 发布的帖子

    • RE: AprilTag--MemoryError: Out of fast Frame Buffer Stack Memory

      摄像头远离AprilTag,当距离增大到某个特定的值,就会出现这个问题,我也不知道是怎么回事

      发布在 OpenMV Cam
      V
      vxac
    • AprilTag--MemoryError: Out of fast Frame Buffer Stack Memory
      # AprilTags Example
      #
      # This example shows the power of the OpenMV Cam to detect April Tags
      # on the OpenMV Cam M7. The M4 versions cannot detect April Tags.
      
      import sensor, image, time, math
      
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)#GRAYSCALE
      sensor.set_framesize(sensor.QQVGA) # we run out of memory if the resolution is much bigger...
      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False)  # must turn this off to prevent image washout...
      sensor.set_auto_whitebal(False)  # must turn this off to prevent image washout...
      clock = time.clock()
      roi = (0,0,160,120)
      
      tag_families = 0
      tag_families |= image.TAG16H5 # comment out to disable this family
      tag_families |= image.TAG25H7 # comment out to disable this family
      tag_families |= image.TAG25H9 # comment out to disable this family
      tag_families |= image.TAG36H10 # comment out to disable this family
      tag_families |= image.TAG36H11 # comment out to disable this family (default family)
      tag_families |= image.ARTOOLKIT # comment out to disable this family
      
      
      def family_name(tag):
          if(tag.family() == image.TAG16H5):
              return "TAG16H5"
          if(tag.family() == image.TAG25H7):
              return "TAG25H7"
          if(tag.family() == image.TAG25H9):
              return "TAG25H9"
          if(tag.family() == image.TAG36H10):
              return "TAG36H10"
          if(tag.family() == image.TAG36H11):
              return "TAG36H11"
          if(tag.family() == image.ARTOOLKIT):
              return "ARTOOLKIT"
      
      while(True):
          clock.tick()
          img = sensor.snapshot()
          apriltags = img.find_apriltags(roi = roi, families=tag_families)
          if apriltags:
              for tag in apriltags:
              # defaults to TAG36H11 without "families".
                  x = tag.cx()-tag.w()//2-5
                  y = tag.cy()-tag.h()//2-5
                  w1 = tag.w()+10
                  h1 = tag.h()+10
                  if x<0:
                      x = 0
                  if y<0:
                      y = 0
                  if w1>80:
                      w1 = 80
                  if h1 >60:
                      h1 = 60
                  del roi
                  roi = (x,y,w1,h1)
                  print("roi:",roi)
                  print("apriltag:",tag.rect())
                  img.draw_rectangle(tag.rect(), color = (255, 0, 0))
                  img.draw_cross(tag.cx(), tag.cy(), color = (0, 255, 0))
                  print_args = (family_name(tag), tag.id(), (180 * tag.rotation()) / math.pi)
                  print("Tag Family %s, Tag ID %d, rotation %f (degrees)" % print_args)
          else:
              del roi
              roi = (0,0,80,60)
          print(clock.fps())
      
      

      IDE报错:“MemoryError: Out of fast Frame Buffer Stack Memory! Please reduce the resolution of the image you are running this algorithm on to bypass this issue!”,距离稍微远一点就会报错
      修改分辨率为QQQVGA后同样报错!!!
      求解答🌹 🌹 🌹

      发布在 OpenMV Cam
      V
      vxac
    • AprilTag识别帧率怎么提高呀?
      # AprilTags Example
      #
      # This example shows the power of the OpenMV Cam to detect April Tags
      # on the OpenMV Cam M7. The M4 versions cannot detect April Tags.
      
      import sensor, image, time, math
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA) # we run out of memory if the resolution is much bigger...
      sensor.skip_frames(30)
      sensor.set_auto_gain(False)  # must turn this off to prevent image washout...
      sensor.set_auto_whitebal(False)  # must turn this off to prevent image washout...
      clock = time.clock()
      
      while(True):
          clock.tick()
          img = sensor.snapshot()
          for tag in img.find_apriltags(): # defaults to TAG36H11 without "families".
              img.draw_rectangle(tag.rect(), color = (255, 0, 0))
              img.draw_cross(tag.cx(), tag.cy(), color = (0, 255, 0))
              degress = 180 * tag.rotation() / math.pi
              print(tag.id(),degress)
              
          print(clock.fps())
      
      

      运行例程,禁用framebuffer,帧率只有15fps
      🌹 🌹 感谢感谢

      发布在 OpenMV Cam
      V
      vxac
    • RE: 在小车巡线main.py视频中讲到,line.theta一段代码,怎么就实现了直线角度的调整了。

      默认的坐标系为(90,180,0,90)
      0_1563698435136_默认坐标系.JPG

      发布在 OpenMV Cam
      V
      vxac
    • 怎么给多个目标物体分别标号?。

      需要识别6个圆形,从左到右从上到下依次编号为1-6,怎么实现呢?求思路

      发布在 OpenMV Cam
      V
      vxac