导航

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

    zbyf

    @zbyf

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

    zbyf 关注

    zbyf 发布的帖子

    • RE: 我在一个圆环形零件上画了几个黑斑,零件中间有个孔,拍起来是个圆形黑色色块,怎么让他只检测圆环上的黑色色块并框起来?

      0_1683040082361_零件.png

      发布在 OpenMV Cam
      Z
      zbyf
    • 我在一个圆环形零件上画了几个黑斑,零件中间有个孔,拍起来是个圆形黑色色块,怎么让他只检测圆环上的黑色色块并框起来?
      import time, sensor, image,math,pyb
      thresholds = (65, 9)
      thresholdss = (0, 80)
      from image import SEARCH_EX, SEARCH_DS
      sensor.reset()
      sensor.set_contrast(1)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.QQVGA)
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_auto_gain(False)
      sensor.set_auto_whitebal(False)
      sensor.skip_frames(time = 2000)
      template = image.Image("/fhy1.pgm")
      clock = time.clock()
      
      while (True):
          #for i in range(100):
          clock.tick()
          img = sensor.snapshot().lens_corr(1.8)  #畸变矫正
          #img.binary([thresholdss], invert = 1) #二值化
          
          零件 = img.find_template(template, 0.70, step=4, search=SEARCH_EX) #, roi=(10, 0, 60, 60))
          for r in img.find_blobs([thresholds], roi=[40,20,70,70],pixels_threshold=15, area_threshold=15, merge=False):
              #if r.pixels() >100 and r.pixels() <300:
              
                  img.draw_rectangle(r.rect())
          
          if 零件:
              img.draw_rectangle(零件)
              print("检测到零件")
          
          
              if r:
                  print("不合格")
              else:
                  print("合格")![0_1683039656447_零件.png](https://fcdn.singtown.com/0f1cf444-87a0-4b03-a642-a490a84e7983.png) 
      
      发布在 OpenMV Cam
      Z
      zbyf
    • 请问怎么检测零件上的缺口?

      请问怎么检测零件上的缺口?

      发布在 OpenMV Cam
      Z
      zbyf
    • 求助大佬,用openmv筛选表面有瑕疵的次品

      想用openmv筛选表面有瑕疵的次品,用什么功能实现?模板匹配或者特征点检测还是其他的?

      发布在 OpenMV Cam
      Z
      zbyf