import aircv as ac
def matcha(bb,aa):#从bb查找aa,如果有则返回其坐标位置
    yuan=ac.imread(bb)
    mubi=ac.imread(aa)
    result=ac.find_template(yuan,mubi,0.7)#0.7相似度
    if(result!=None):        
        return result['result'][0],result['result'][1]
        #return yuan.shape[1],yuan.shape[0]
    return None

aa="./xm1.png"
bb="./tmall4a.png"
dd=matcha(bb,aa)
print(dd)

结果:

(90.0, 429.0)

相关文章:

  • 2021-05-02
  • 2021-05-25
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-09-15
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2021-12-10
  • 2021-11-30
  • 2021-12-30
  • 2022-12-23
  • 2021-07-21
相关资源
相似解决方案