MATLAB Answers

helperExtractorFunction error using Monocular SLAM tutorial

14 views (last 30 days)
Nicholas Longworth
Nicholas Longworth on 9 Apr 2020
Answered: Srivardhan Gadila on 12 Apr 2020
Hi everyone,
I am trying to run the Monocular SLAM tutorial found here: https://www.mathworks.com/help/vision/examples/monocular-visual-simultaneous-localization-and-mapping.html. I am using Matlab2020a. I am getting the below error and I can't seem to figure out why. Any help would be appreciated.
Warning: Undefined custom extractor function 'helperExtractorFunction'. Please check if 'helperExtractorFunction' is on MATLAB's
search path.
> In bagOfFeatures/checkCustomExtractorOnLoad (line 1026)
In bagOfFeatures.loadobj (line 1373)
In SLAMTest (line 281)
Unrecognized function or variable 'helperExtractorFunction'.
Error in bagOfFeatures/invokeCustomExtractor (line 799)
[features, featureMetrics, varargout{1:nargout-2}] = extractor(img);
Error in bagOfFeatures>@(img)this.invokeCustomExtractor(img,params.CustomExtractor) (line 782)
this.Extractor = @(img)this.invokeCustomExtractor(img, params.CustomExtractor);
Error in bagOfFeatures/encodeSingleImage (line 591)
[descriptors,~,locations] = this.Extractor(img);
Error in bagOfFeatures/encodeScalarImageSet (line 571)
[features(j,:), words(j)] = this.encodeSingleImage(img, params);
Error in bagOfFeatures/encode (line 337)
this.encodeScalarImageSet(in, params);
Error in invertedImageIndex/addImages (line 200)
[wordHistograms, words] = this.BagOfFeatures.encode(imgSet, ...
Error in SLAMTest (line 303)
addImages(loopDatabase, currds, 'Verbose', false);

Answers (1)

Srivardhan Gadila
Srivardhan Gadila on 12 Apr 2020
I have heard that this issue is known and the concerned parties might fix it in an update or in a future release.
The workaround for this issue is changing the name of the helper function helperSURFFeatureExtractorFunction to helperExtractorFunction. Make sure you follow Syntax for Function Definition while renaming the function.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!