title: Passing parameters to function handle in bagOfFeatures function
body: <p>Lets say we have a custom extractor function </p>
  
  <p><code>[features,featureMetrics] = exampleBagOfFeaturesExtractor(img,param1, param2)</code></p>
  
  <p>I want to call bagOfFeatures function and pass custom extractor function:</p>
  
  <pre><code>extractorFcn = @exampleBagOfFeaturesExtractor;
  bag = bagOfFeatures(imgSets,'CustomExtractor',extractorFcn)
  </code></pre>
  
  <p>In exampleBagOfFeaturesExtractor function I want to use different local descriptors extractor depending on param1.
  How do I pass param1 to exampleBagOfFeaturesExtractor?</p>
  
  <p>What is the best way to use different local descriptors in my custom extractor function?</p>
  
  <p>Thank you for your help!</p>
  
  <h1>Edit</h1>
  
  <p>This is the custom extractor function I am currently using:</p>
  
  <pre><code>function [features,featureMetrics] = exampleBagOfFeaturesExtractor(img,param1,param2)
  
      keypoint_detector = cv.FeatureDetector(param1);
      descriptor_extractor = cv.DescriptorExtractor(param2);
  
      kpts = keypoint_detector.detect(img);
      [ features, kpts ] = descriptor_extractor.compute(img, kpts);
      featureMetrics=ones(1,size(features,1))/size(features,1);
  end
  </code></pre>