导航

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

    g5cu

    @g5cu

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

    g5cu 关注

    g5cu 发布的帖子

    • RE: 大佬们,openmv通过帧差异检测到运动物体后,怎样把它从图像中框选出来,并获取它的坐标?

      @kidswong999 怎么找呀?

      发布在 OpenMV Cam
      G
      g5cu
    • RE: openMV云台追踪的问题

      请问楼主解决了吗?

      发布在 OpenMV Cam
      G
      g5cu
    • RE: 关于二维码的疑问

      @openmv萌新 请问是怎么解决的?

      发布在 OpenMV Cam
      G
      g5cu
    • 如何进行运功物体检测并跟踪

      openmv4 cam H7 Plus 能不能进行运动物体检测并跟踪?

      发布在 OpenMV Cam
      G
      g5cu
    • 两个图像特别相似,特征点检测该怎么检测?

      0_1620994967073_11.png

      发布在 OpenMV Cam
      G
      g5cu
    • RE: 请问图像成绿色是怎么回事?

      请问楼主解决了吗?

      发布在 OpenMV Cam
      G
      g5cu
    • openmv 图像呈现绿色什么原因?所有的例程都是这样

      0_1620892180278_无标题.png

      发布在 OpenMV Cam
      G
      g5cu
    • 在颜色和形状同时识别的例程中怎么设置LAB三个阈值?

      我用阈值编辑器时A的最小值比最大值还要大,那 <statistics.a_mode()<左右两边怎么写?

      发布在 OpenMV Cam
      G
      g5cu
    • 程序运行为什么会卡顿?
      from pyb import Pin
      
      import sensor, image, time
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA)
      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()
      flag=0
      
      while(True):
          clock.tick()
          img = sensor.snapshot().lens_corr(1.8)
          for c in img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,
                  r_min = 2, r_max = 100, r_step = 2):
              area = (c.x()-c.r(), c.y()-c.r(), 2*c.r(), 2*c.r())#area为识别到的圆的区域,即圆的外接矩形框
              statistics = img.get_statistics(roi=area)#像素颜色统计
              print(statistics)
              #(0,100,0,120,0,120)是红色的阈值,所以当区域内的众数(也就是最多的颜色),范围在这个阈值内,就说明是红色的圆。
              #l_mode(),a_mode(),b_mode()是L通道,A通道,B通道的众数。
      
              if 0<statistics.l_mode()<100 and 0<statistics.a_mode()<127 and 0<statistics.b_mode()<127:  #if the circle is red
                 img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))#识别到的红色圆形用红色的圆框出来
                 flag=1
              if 0<statistics.l_mode()<100 and -40<statistics.a_mode()<30 and 0<statistics.b_mode()<50:#if the circle is green
                  img.draw_circle(c.x(), c.y(), c.r(), color = (0, 255, 0))#识别到的绿色圆形用绿色的圆框出来
                  time.sleep(1) # 延时 1 毫秒
                  if 0<statistics.l_mode()<100 and 0<statistics.a_mode()<127 and 0<statistics.b_mode()<127:  #if the circle is red
                     img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))#识别到的红色圆  形用红色的圆框出来
                     flag=2
                  else:
                      flag=3
              if  0<statistics.l_mode()<100 and -40<statistics.a_mode()<0 and -40<statistics.b_mode()<20:#if the circle is blue
                   img.draw_circle(c.x(), c.y(), c.r(), color = (0, 0, 255))#识别到的蓝色圆形用蓝色的圆框出来
                   time.sleep(1) # 延时 1 毫秒
                   if 0<statistics.l_mode()<100 and 0<statistics.a_mode()<127 and 0<statistics.b_mode()<127:  #if the circle is red
                      img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))#识别到的红色圆形用红色的圆框出来
                      flag=2
                   else:
                      flag=3
      
              while(flag):
                      if  flag==1:
                          p_out = Pin('P0', Pin.OUT_PP)#设置p_out为输入引脚
                          p_out.high()#设置p0引脚为高
                      elif  flag==2:
                          p_out = Pin('P1', Pin.OUT_PP)#设置p_out为输入引脚
                          p_out.high()#设置p0引脚为高
                      elif flag==3:
                          p_out = Pin('P2', Pin.OUT_PP)#设置p_out为输入引脚
                          p_out.high()#设置p0引脚为高
                      else:
                          print("default")
      
      print("FPS %f" % clock.fps())
      
      
      
      发布在 OpenMV Cam
      G
      g5cu
    • 怎么返回识别到的圆形中心到图片中心的距离?

      需要返回识别到的圆形目标到openmv所在位置的距离

      发布在 OpenMV Cam
      G
      g5cu