导航

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

    iear

    @iear

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

    iear 关注

    iear 发布的帖子

    • openmv 与stm32联调直接用io口,当stm32输出高时,摄像头接收高后才控制开启运行程序是可以的吗?

      😃

      发布在 OpenMV Cam
      I
      iear
    • 如何同时识别形状是矩形,颜色是红绿蓝的物体呢

      😀

      发布在 OpenMV Cam
      I
      iear
    • RE: 怎样识别随机颜色红绿蓝其中一种颜色的色卡呢?还有threshold_index ,color_code又是怎么得到值的

      @kidswong999 那用获取颜色信息阈值( l_max,l_min,a_max,a_min,b_max,b_min)然后 再通过这个阈值范围用find_circles去找到附近的气球相对应的颜色吗 还是说需要find_blobs. 之前用获取颜色信息这个就怕识别红绿蓝的阈值的时候 有误差

      发布在 OpenMV Cam
      I
      iear
    • RE: 怎样识别随机颜色红绿蓝其中一种颜色的色卡呢?还有threshold_index ,color_code又是怎么得到值的

      @kidswong999 我说的随机颜色 是可能红 或绿或蓝 没有固定是红之类的这些

      发布在 OpenMV Cam
      I
      iear
    • RE: 怎样识别随机颜色红绿蓝其中一种颜色的色卡呢?还有threshold_index ,color_code又是怎么得到值的

      @kidswong999 这样子是红色的色卡就识别是红色吗 那可以通过设置这三个的颜色阈值然后find_blobs识别到的颜色通过color_code去获取颜色代码,然后用if那些去判断color_code是红或绿或蓝 然后在这个if语句里面用find_circles去找到位于色卡前面的颜色气球吗

      发布在 OpenMV Cam
      I
      iear
    • 怎样识别随机颜色红绿蓝其中一种颜色的色卡呢?还有threshold_index ,color_code又是怎么得到值的

      ☹

      发布在 OpenMV Cam
      I
      iear
    • RE: 识别色卡颜色并找到相对应颜色的气球扎破,我写的这个代码可以实现吗?

      @kidswong999 0_1632409823687_81b8d602-1e1e-45df-97a8-3d2dbf27c55c-image.png
      代码改了一点 结果是这样的

      发布在 OpenMV Cam
      I
      iear
    • RE: 识别色卡颜色并找到相对应颜色的气球扎破,我写的这个代码可以实现吗?
      import sensor, image, time
      red_threshold=(0, 100, 7, 127, -128, 127)
      green_threshold=(0, 100, -128, -28, -128, 127)
      blue_threshold=(14, 87, -83, 127, -113, -14)
      red_color_code = 1
      blue_color_code = 4
      green_color_code = 8
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QVGA)
      sensor.skip_frames(10) # 跳过10帧,使新设置生效
      sensor.set_auto_whitebal(False)
      sensor.set_auto_gain(False)
      clock=time.clock()
      ROI=(0,0,80,80)
      
      while(True):
          img = sensor.snapshot()
          statistics=img.get_statistics(roi=ROI)
          color_l_min=statistics.l_min()
          color_a_min=statistics.a_min()
          color_b_min=statistics.b_min()
          color_l_max=statistics.l_max()
          color_a_max=statistics.a_max()
          color_b_max=statistics.b_max()
          anycolor_threshold=(color_l_min,color_l_max,color_a_min,color_a_max,color_b_min,color_b_max)
          blobs=img.find_blobs([anycolor_threshold],area_threshold=100)
          if anycolor_threshold==red_threshold:
              blobs =img.find_blobs([red_threshold],area_threshold=100)
          elif anycolor_threshold==green_threshold:
              blobs =img.find_blobs([green_threshold],area_threshold=100)
          elif anycolor_threshold==blue_threshold:
              blobs =img.find_blobs([blue_threshold],area_threshold=100)
          if blobs:
              for blob in blobs:
              #迭代找到的目标颜色区域
                  x = blob[0]
                  y = blob[1]
                  width = blob[2]
                  height = blob[3]
                  center_x = blob[5]
                  center_y = blob[6]
                  color_code = blob[8]
                  if color_code == red_color_code:
                      img.draw_string(x, y - 10, "red", color = (0xFF, 0x00, 0x00))
                  elif color_code == blue_color_code:
                      img.draw_string(x, y - 10, "blue", color = (0xFF, 0x00, 0x00))
                  elif color_code == green_color_code:
                      img.draw_string(x, y - 10, "green", color = (0xFF, 0x00, 0x00))
      
                  #用矩形标记出目标颜色区域
                  img.draw_rectangle(blob[0],blob[1],blob[2],blob[3])
                  #在目标颜色区域的中心画十字形标记
                  img.draw_cross(blob[5], blob[6])
      
      
      
          print(clock.fps())
      
      
      发布在 OpenMV Cam
      I
      iear
    • RE: 识别色卡颜色并找到相对应颜色的气球扎破,我写的这个代码可以实现吗?

      @kidswong999 这个代码测出来的画面有跟踪颜色的,是可以的,是我这个的代码不对吗,用统计信息得到的LAB颜色值是不等同于颜色阈值吗,我把roi调成(0,0,320,240)还是这样 黑色也出现好多+
      0_1632301104580_19fa9e13-b144-4ac6-8fcc-ae7555db9a50-image.png

      发布在 OpenMV Cam
      I
      iear
    • RE: 识别色卡颜色并找到相对应颜色的气球扎破,我写的这个代码可以实现吗?

      0_1631938486699_视觉.png 请问这是什么原因呢

      发布在 OpenMV Cam
      I
      iear