Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for key, value in step_data["call_args"].items():
args.append({
"key": key,
"value": value,
})
for k, arg in enumerate(args):
value = arg["value"]
if isinstance(value, dict) and value.get("__class__") == "Template":
if self.export_dir: # all relative path
image_path = value['filename']
if not os.path.isfile(os.path.join(self.script_root, image_path)):
shutil.copy(value['_filepath'], self.script_root) # copy image used by using statement
else:
image_path = os.path.abspath(value['_filepath'] or value['filename'])
arg["image"] = image_path
crop_img = imread(value['_filepath'] or value['filename'])
arg["resolution"] = get_resolution(crop_img)
return code
def setUpClass(cls):
cls.keypoint_sch = imread("matching_images/keypoint_search.png")
cls.keypoint_src = imread("matching_images/keypoint_screen.png")
cls.template_sch = imread("matching_images/template_search.png")
cls.template_src = imread("matching_images/template_screen.png")
def setUpClass(cls):
cls.keypoint_sch = imread("matching_images/keypoint_search.png")
cls.keypoint_src = imread("matching_images/keypoint_screen.png")
cls.template_sch = imread("matching_images/template_search.png")
cls.template_src = imread("matching_images/template_screen.png")
def _imread(self):
return aircv.imread(self.filepath)
def load_images(self, search_file, source_file):
"""加载待匹配图片."""
self.search_file, self.source_file = search_file, source_file
self.im_search, self.im_source = imread(self.search_file), imread(self.source_file)
# 初始化对象
self.check_macthing_object = CheckKeypointResult(self.im_search, self.im_source)
def setUpClass(cls):
cls.keypoint_sch = imread("matching_images/keypoint_search.png")
cls.keypoint_src = imread("matching_images/keypoint_screen.png")
cls.template_sch = imread("matching_images/template_search.png")
cls.template_src = imread("matching_images/template_screen.png")