Shortcuts

marsvision.pipeline.KeypointFeatureExtractor module

class marsvision.pipeline.KeypointFeatureExtractor.KeypointFeatureExtractor(detector, radius: int = 20)

Bases: object

__init__(detector, radius: int = 20)

This class uses an OpenCV detector to detect keypoints on image and returns reduces the area around the keypoints to a vector of numerical features.

These features are means and variances of the region, and means and variances of the region after applying Canny and Laplacian filters.

This class is ideally used by invoking either extract_keypoint_features to get a matrix of features, or get_means_from keypoints to get a matrix of features from an image.

Parameters:

Detector: OpenCV Feature Detector Radius(Int): Pixel radius to extract features from.

extract_keypoint_features(img)

Build a matrix of features from the feature vectors of each keypoint.

img (numpy.ndarray): image to extract features from, represented as a numpy.ndarray

get_keypoint_points(img)

Use an OpenCV algorithm to detect keypoints.

img (numpy.ndarray): image to extract features from, represented as a numpy.ndarray.

get_means_from_keypoints(img)

Reduce the feature matrix to a vector by taking the mean of each feature.

img (numpy.ndarray): image to get a feature vector from, represented as a numpy.ndarray

select_roi(img, point: list)

Select the ROI (Region of Interest) in a radius around a given point.

img (numpy.ndarray): image to select ROI from, represented as a numpy.ndarray point (list): A 2 element list with x and y coordinates for the point.


© Copyright 2020 Michael Munje, Mariajose Corral, Iris Rafaela, Daniel Palencia.

Built with Sphinx using a theme provided by Read the Docs.

Docs

Lorem ipsum dolor sit amet, consectetur

View Docs

Tutorials

Lorem ipsum dolor sit amet, consectetur

View Tutorials

Resources

Lorem ipsum dolor sit amet, consectetur

View Resources