Ejemplo n.º 1
0
    def check_detection_input(im_source, im_search):
        if not isinstance(im_source, IMAGE):
            im_source = IMAGE(im_source)
        if not isinstance(im_search, IMAGE):
            im_search = IMAGE(im_search)

        im_source.transform_gpu()
        im_search.transform_gpu()
        return im_source, im_search
Ejemplo n.º 2
0
    def check_detection_input(self, im_source: IMAGE,
                              im_search: IMAGE) -> Tuple[IMAGE, IMAGE]:
        if not isinstance(im_source, IMAGE):
            im_source = IMAGE(im_source)
        if not isinstance(im_search, IMAGE):
            im_search = IMAGE(im_search)

        im_source.transform_gpu()
        im_search.transform_gpu()
        return im_source, im_search
Ejemplo n.º 3
0
    def check_detection_input(self, im_source: IMAGE, im_search: IMAGE):
        if not isinstance(im_source, IMAGE):
            im_source = IMAGE(im_source)
        if not isinstance(im_search, IMAGE):
            im_search = IMAGE(im_search)

        im_source.transform_gpu()
        im_search.transform_gpu()

        self._check_image_size(im_source)
        self._check_image_size(im_search)
        return im_source, im_search
Ejemplo n.º 4
0
    def _update_app_info(self, apk: Apk):
        if isinstance(apk, Apk):
            icon: CustomLabel = self.device_app_manage_widget.icon
            info_top: CustomFormLayout = self.device_app_manage_widget.info_top
            info_left: CustomFormLayout = self.device_app_manage_widget.info_left
            info_right: CustomFormLayout = self.device_app_manage_widget.info_right

            icon_local_path = f'./icon/{apk.packageName}.png'
            apk.get_icon_file(local=icon_local_path)
            icon.setPixmap(
                IMAGE(img=icon_local_path).resize(APK_ICON_WIDTH,
                                                  APK_ICON_HEIGHT))

            info_top.getField('app_label_name').setText(apk.name)
            info_top.getField('app_package_name').setText(apk.packageName)
            info_top.getField('app_main_activity').setText(apk.main_activity)
            info_left.getField('app_version_id').setText(apk.version_code)
            info_left.getField('app_version_name').setText(apk.version_name)
            package_size = f'{(apk.device.get_file_size(remote=apk.install_path) / 1024):.1f}MB'
            info_right.getField('package_size').setText(package_size)
Ejemplo n.º 5
0
from image_registration import match_template, ORB, SIFT
from baseImage import IMAGE, Rect

orb = ORB()
sift = SIFT()

im_source = IMAGE('./image/test.png')
im_search = IMAGE('./image/start.png')

# tpl = match_template()

result = orb.find_all(im_source=im_source, im_search=im_search)
print(result)
Ejemplo n.º 6
0
def cv_to_qtimg(img: IMAGE):
    height, width, depth = img.shape
    img = img.cvtColor(cv2.COLOR_BGR2RGB)
    return QImage(img.data, width, height, width * depth, QImage.Format_RGB888)