Package qupath.opencv.ml
Class FeaturePreprocessor
java.lang.Object
qupath.opencv.ml.FeaturePreprocessor
Create a preprocessor for an image or training matrix.
 This can include simple normalization (rescaling) and PCA projection.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidApply preprocessing in-place.voidApply preprocessing in-place.static FeaturePreprocessor.Builderbuilder()Create aFeaturePreprocessor.Builderto build a customFeaturePreprocessor.booleanReturns true if this preprocessor transforms the features beyond a simple normalization.booleanReturns true if this preprocessor has any effect.intGet the number of features required of the input.intGet the number of features expected in the output.toString()
- 
Constructor Details- 
FeaturePreprocessorpublic FeaturePreprocessor()
 
- 
- 
Method Details- 
applyApply preprocessing in-place.- Parameters:
- mat-
- channelFeatures- treat each channel as a feature; otherwise, treat each column as a feature
 
- 
applyApply preprocessing in-place. If theMathas multiple channels, each channel is treated as a feature. Otherwise, each row is treated as a feature.- Parameters:
- mat-
 
- 
doesFeatureTransformpublic boolean doesFeatureTransform()Returns true if this preprocessor transforms the features beyond a simple normalization. In practice, for the current implementation this means PCA.- Returns:
 
- 
doesSomethingpublic boolean doesSomething()Returns true if this preprocessor has any effect.- Returns:
 
- 
getInputLengthpublic int getInputLength()Get the number of features required of the input.- Returns:
 
- 
getOutputLengthpublic int getOutputLength()Get the number of features expected in the output.- Returns:
 
- 
builderCreate aFeaturePreprocessor.Builderto build a customFeaturePreprocessor.- Returns:
 
- 
toString
 
-