Class FeatureExtractors
java.lang.Object
qupath.opencv.ml.objects.features.FeatureExtractors
Helper class for extracting features from objects, used along with ObjectClassifiers.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> FeatureExtractor
<T> createMeasurementListFeatureExtractor
(List<String> measurements) static <T> FeatureExtractor
<T> createNormalizingFeatureExtractor
(FeatureExtractor<T> extractor, Normalizer normalizer) Wrap an existingFeatureExtractor
to apply normalization prior to returning the values.static <T> FeatureExtractor
<T> createPCAProjectFeatureExtractor
(FeatureExtractor<T> extractor, Preprocessing.PCAProjector pca) Wrap an existingFeatureExtractor
to apply PCA projection prior to returning the values.static TypeAdapterFactory
Get theTypeAdapterFactory
default used forFeatureExtractor
objects.
-
Constructor Details
-
FeatureExtractors
public FeatureExtractors()
-
-
Method Details
-
getTypeAdapterFactory
Get theTypeAdapterFactory
default used forFeatureExtractor
objects. This is intended for internal use by QuPath, and should be registered withGsonTools
.- Returns:
-
createMeasurementListFeatureExtractor
public static <T> FeatureExtractor<T> createMeasurementListFeatureExtractor(List<String> measurements) - Parameters:
measurements
- list containing the measurement names- Returns:
- the new
FeatureExtractor
-
createNormalizingFeatureExtractor
public static <T> FeatureExtractor<T> createNormalizingFeatureExtractor(FeatureExtractor<T> extractor, Normalizer normalizer) Wrap an existingFeatureExtractor
to apply normalization prior to returning the values.- Parameters:
extractor
- original (base) feature extractornormalizer
-Normalizer
to apply to initial features- Returns:
- the new
FeatureExtractor
-
createPCAProjectFeatureExtractor
public static <T> FeatureExtractor<T> createPCAProjectFeatureExtractor(FeatureExtractor<T> extractor, Preprocessing.PCAProjector pca) Wrap an existingFeatureExtractor
to apply PCA projection prior to returning the values.- Parameters:
extractor
- original (base) feature extractorpca
-Preprocessing.PCAProjector
to apply to initial features- Returns:
- the new
FeatureExtractor
-