def set_from_config(self, config): Detector.set_from_config(self, config) self.set_n_features(config.n_features.value()) self.set_n_octave_layers(config.n_octave_layers.value()) self.set_contrast_threshold(config.contrast_threshold.value()) self.set_edge_threshold(config.edge_threshold.value()) self.set_sigma(config.sigma.value())
def set_from_config(self, config): Detector.set_from_config(self, config) self.set_hessian_threshold(config.hessian_threshold.value()) self.set_n_octaves(config.n_octaves.value()) self.set_n_octave_layers(config.n_octave_layers.value()) self.set_extended(config.extended.value()) self.set_upright(config.upright.value())
def set_from_config(self, config): Detector.set_from_config(self, config) self.set_n_features(config.n_features.value()) self.set_scale_factor(config.scale_factor.value()) self.set_n_levels(config.n_levels.value()) self.set_edge_threshold(config.edge_threshold.value()) self.set_first_level(config.first_level.value()) self.set_wta_k(config.wta_k.value()) self.set_score_type(config.score_type.value()) self.set_patch_size(config.patch_size.value())
def __init__(self): Detector.__init__(self, DetectorType.ORB) self._n_features = self.DEFAULT_N_FEATURES self._scale_factor = self.DEFAULT_SCALE_FACTOR self._n_levels = self.DEFAULT_N_LEVELS self._edge_threshold = self.DEFAULT_EDGE_THRESHOLD self._first_level = self.DEFAULT_FIRST_LEVEL self._wta_k = self.DEFAULT_WTA_K self._score_type = self.DEFAULT_SCORE_TYPE self._patch_size = self.DEFAULT_PATCH_SIZE
def set_from_config(self, config): Detector.set_from_config(self, config) self.set_delta(config.delta.value()) self.set_min_area(config.min_area.value()) self.set_max_area(config.max_area.value()) self.set_max_variation(config.max_variation.value()) self.set_min_diversity(config.min_diversity.value()) self.set_max_evolution(config.max_evolution.value()) self.set_area_threshold(config.area_threshold.value()) self.set_min_margin(config.min_margin.value()) self.set_edge_blur_size(config.edge_blur_size.value())
def __init__(self): Detector.__init__(self, DetectorType.SIFT) # SIFT is not free and a licence should be obtained if using for commercial purposes self._is_non_free = True self._n_features = self.DEFAULT_N_FEATURES self._n_octave_layers = self.DEFAULT_N_OCTAVE_LAYERS self._contrast_threshold = self.DEFAULT_CONTRAST_THRESHOLD self._edge_threshold = self.DEFAULT_EDGE_THRESHOLD self._sigma = self.DEFAULT_SIGMA
def __init__(self): Detector.__init__(self, DetectorType.SURF) # SURF is not free and a licence should be obtained if using for commercial purposes self._is_non_free = True self._hessian_threshold = self.DEFAULT_HESSIAN_THRESHOLD self._n_octaves = self.DEFAULT_N_OCTAVES self._n_octave_layers = self.DEFAULT_N_OCTAVE_LAYERS self._extended = self.DEFAULT_EXTENDED self._upright = self.DEFAULT_UPRIGHT
def __init__(self): Detector.__init__(self, DetectorType.MSER) self._delta = self.DEFAULT_DELTA self._min_area = self.DEFAULT_MIN_AREA self._max_area = self.DEFAULT_MAX_AREA self._max_variation = self.DEFAULT_MAX_VARIATION self._min_diversity = self.DEFAULT_MIN_DIVERSITY self._max_evolution = self.DEFAULT_MAX_EVOLUTION self._area_threshold = self.DEFAULT_AREA_THRESHOLD self._min_margin = self.DEFAULT_MIN_MARGIN self._edge_blur_size = self.DEFAULT_EDGE_BLUR_SIZE
def create(det_type, options=None): if det_type not in DetectorType.LIST_ALL: raise FeatureDetectorError( "Unknown detector type: {}".format(det_type)) if det_type == DetectorType.ORB: detector = OrbDetector() elif det_type == DetectorType.SIFT: detector = SiftDetector() elif det_type == DetectorType.SURF: detector = SurfDetector() # MSER currently has no wrapper class due to the format of the output - need to update to reinstate this # elif type == DetectorType.MSER: # detector = MserDetector() elif det_type == DetectorType.BRISK: detector = BriskDetector() else: detector = Detector(detector=det_type) if options is not None: detector_options = options.get_detector_options(det_type) detector.set_from_config(detector_options) if detector.is_non_free(): licensing = options.get_licensing_options() use_non_free = licensing.use_non_free.value() if not use_non_free: detector.set_enabled(False) return detector
def create(det_type, options=None): if det_type not in DetectorType.LIST_ALL: raise FeatureDetectorError( "Unknown detector type: {}".format(det_type)) if det_type == DetectorType.ORB: detector = OrbDetector() elif det_type == DetectorType.BRISK: detector = BriskDetector() else: detector = Detector(detector=det_type) if options is not None: detector_options = options.get_detector_options(det_type) detector.set_from_config(detector_options) return detector
def set_from_config(self, config): Detector.set_from_config(self, config) self.set_thresh(config.thresh.value()) self.set_octaves(config.octaves.value()) self.set_pattern_scale(config.pattern_scale.value())
def __init__(self): Detector.__init__(self, DetectorType.BRISK) self._thresh = self.DEFAULT_THRESH self._octaves = self.DEFAULT_OCTAVES self._pattern_scale = self.DEFAULT_PATTERN_SCALE