Custom feature extractor function, specified the comma-separated pair
consisting of 'CustomExtractor' and a function
handle. This custom function extracts features from the output bagOfFeatures object to learn the visual
vocabulary of the object.
The function, extractorFcn, must be specified as
a function handle for a
file:
extractorFcn = @exampleBagOfFeaturesExtractor;
bag = bagOfFeatures(imds,'CustomExtractor',extractorFcn)where
exampleBagOfFeaturesExtractor is a MATLAB function. For
example:
function [features,featureMetrics] = exampleBagOfFeaturesExtractor(img)
...The
function must be on the path or in the current working directory.
For more details on the custom extractor function and its input and
output requirements, see Create a Custom Feature Extractor.
You can open an example function file, and use it as a template by
typing the following command at the MATLAB command-line:
edit('exampleBagOfFeaturesExtractor.m')