def extract_all(self, image): sift = cv2.xfeatures2d.SIFT_create() features, descriptors = sift.detectAndCompute(image, None) features, descriptors = fu.filter_by_kpt_response( MAX_CV_KPTS, features, descriptors) return (features, descriptors)
def extract_all(self, image): kaze = cv2.KAZE_create() features, descriptors = kaze.detectAndCompute(image,None) pts, descriptors = fu.filter_by_kpt_response(MAX_CV_KPTS, features, descriptors) return (pts, descriptors)
def detect_feature(self, image): kaze = cv2.KAZE_create() features = kaze.detect(image,None) pts = fu.filter_by_kpt_response(MAX_CV_KPTS, features) return pts
def detect_feature(self, image): harLap = cv2.xfeatures2d.HarrisLaplaceFeatureDetector_create() features = harLap.detect(image, None) pts = fu.filter_by_kpt_response(MAX_CV_KPTS, features) return pts
def detect_feature(self, image): surf = cv2.xfeatures2d.SURF_create() features = surf.detect(image, None) pts = fu.filter_by_kpt_response(MAX_CV_KPTS, features) return pts
def extract_descriptor(self, image, feature): sift = cv2.xfeatures2d.SIFT_create() features, descriptors = sift.compute(image, feature) _, descriptors = fu.filter_by_kpt_response(MAX_CV_KPTS, features, descriptors) return descriptors