Esempio n. 1
0
            /// <summary>
            /// Create k-d feature trees using the SURF feature extracted from the model image.
            /// </summary>
            /// <param name="modelFeatures">The SURF feature extracted from the model image</param>
            public SURFMatcher(SURFFeature[] modelFeatures)
            {
                Debug.Assert(modelFeatures.Length > 0, "Model Features should have size > 0");

                _modelIndex = new Flann.Index(
                    Util.GetMatrixFromDescriptors(
                        Array.ConvertAll <SURFFeature, float[]>(
                            modelFeatures,
                            delegate(SURFFeature f) { return(f.Descriptor); })),
                    1);
                _modelFeatures = modelFeatures;
            }
Esempio n. 2
0
 /// <summary>
 /// Create k-d feature trees using the SURF feature extracted from the model image.
 /// </summary>
 /// <param name="modelFeatures">The SURF feature extracted from the model image</param>
 public SURFMatcher(SURFFeature[] modelFeatures)
 {
    Debug.Assert(modelFeatures.Length > 0, "Model Features should have size > 0");
    
    _modelIndex = new Flann.Index(
       Util.GetMatrixFromDescriptors(
          Array.ConvertAll<SURFFeature, float[]>(
             modelFeatures,
             delegate(SURFFeature f) { return f.Descriptor; })),
       1);
    _modelFeatures = modelFeatures;
 }