Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add feature extractor abstract class
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
class FeatureExtractor(object): | ||
def get_requirements(self): | ||
""" | ||
Get a list of names of the point attributes that are needed for this feature extraction. For simple features, | ||
this could be just x, y, and z. Other features can build on again other features to have been computed first. | ||
:return: List of feature names | ||
""" | ||
NotImplementedError("Class %s doesn't implement aMethod()" % (self.__class__.__name__)) | ||
|
||
def get_names(self): | ||
""" | ||
Get a list of names of the feature values. This will return as many names as as the number feature values | ||
that will be returned. For instance, if a feature extractor returns the first 3 Eigen values, this method | ||
should return 3 names, for instance 'eigen_value_1', 'eigen_value_2' and 'eigen_value_3'. | ||
:return: List of feature names | ||
""" | ||
NotImplementedError("Class %s doesn't implement aMethod()" % (self.__class__.__name__)) | ||
|
||
def extract_features(self, point_cloud, target): | ||
""" | ||
Extract the feature value(s) of the point cloud at location of the target. | ||
:param point_cloud: | ||
:param target: | ||
:return: | ||
""" | ||
NotImplementedError("Class %s doesn't implement aMethod()" % (self.__class__.__name__)) |