How to use the airtest.aircv.imread function in airtest

To help you get started, we’ve selected a few airtest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AirtestProject / Airtest / airtest / report / report.py View on Github external
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
github AirtestProject / Airtest / tests / test_aircv.py View on Github external
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")
github AirtestProject / Airtest / tests / test_aircv.py View on Github external
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")
github AirtestProject / Airtest / airtest / core / cv.py View on Github external
def _imread(self):
        return aircv.imread(self.filepath)
github AirtestProject / Airtest / benchmark / profile_recorder.py View on Github external
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)
github AirtestProject / Airtest / tests / test_aircv.py View on Github external
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")