matcher.cpu_extractor — Extracting Features from Images

The matcher.cpu_extractor module

New in version 0.1.0.

autocnet.matcher.cpu_extractor.extract_features(array, extractor_method='sift', extractor_parameters={})[source]

This method finds and extracts features from an image using the given dictionary of keyword arguments. The input image is represented as NumPy array and the output features are represented as keypoint IDs with corresponding descriptors.

Parameters
  • array (ndarray) – a NumPy array that represents an image

  • extractor_method ({'orb', 'sift', 'fast', 'surf', 'vl_sift'}) – The detector method to be used. Note that vl_sift requires that vlfeat and cyvlfeat dependencies be installed.

  • extractor_parameters (dict) – A dictionary containing OpenCV SIFT parameters names and values.

Returns

  • keypoints (DataFrame) – data frame of coordinates (‘x’, ‘y’, ‘size’, ‘angle’, and other available information)

  • descriptors (ndarray) – Of descriptors

autocnet.matcher.cpu_extractor.extract_most_interesting(image, extractor_method='orb', extractor_parameters={'nfeatures': 10})[source]

Given an image, extract the most interesting feature. Interesting is defined as the feature descriptor that has the maximum variance. By default, this func finds 10 features in the image and then selects the best.

Parameters
  • image (ndarray) – of DN values

  • extractor_method (str) – Any valid, autocnet extractor. Default (orb)

  • exctractor_parameters (dict) – of extractor parameters passed through to the feature extractor

Returns

The keypoints row with the higest variance. The row has ‘x’ and ‘y’ columns to get the location.

Return type

pd.series