denseMatter.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:osrmacro 作者: jjvilm 项目源码 文件源码
def check_list(self):
        items_dict = imd.ImageStorage()
        items_dict = items_dict.pickled_dict

        RS.press_button('equipment')
        time.sleep(1)
        for key in items_dict.keys():
            template = items_dict[key]
            #save for DEBUG
            #cv2.imwrite('debug_template_file', template_)
            w, h = template.shape[::-1]
            pattern = RS.get_bag('only','gray')
            res = cv2.matchTemplate(pattern,template,cv2.TM_CCOEFF_NORMED)
            threshold = .8 #default is 8 
            loc = np.where( res >= threshold)

            for pt in zip(*loc[::-1]):#goes through each found image
                print('{} found'.format(key))
                break
            else:
                print('{} not found'.format(key))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号