Esempio n. 1
0
        public static DPFP.FeatureSet ExtractFeatures(this DPFP.Sample Sample, DPFP.Processing.DataPurpose Purpose)
        {
            var Extractor = new DPFP.Processing.FeatureExtraction();
            var feedback  = DPFP.Capture.CaptureFeedback.None;
            var features  = new DPFP.FeatureSet();

            Extractor.CreateFeatureSet(Sample, Purpose, ref feedback, ref features);
            if (feedback == DPFP.Capture.CaptureFeedback.Good)
            {
                return(features);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
 protected DPFP.FeatureSet ExtractFeatures(DPFP.Sample Sample, DPFP.Processing.DataPurpose Purpose)
 {
     try
     {
         DPFP.Processing.FeatureExtraction extractor = new DPFP.Processing.FeatureExtraction();        // Create a feature extractor
         DPFP.Capture.CaptureFeedback      feedback  = DPFP.Capture.CaptureFeedback.None;
         DPFP.FeatureSet features = new DPFP.FeatureSet();
         extractor.CreateFeatureSet(Sample, Purpose, ref feedback, ref features); // TODO: return features as a result?
         if ((feedback == DPFP.Capture.CaptureFeedback.Good))
         {
             return(features);
         }
         else
         {
             return(null /* TODO Change to default(_) if this is not a reference type */);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error Extracting Features");
     }
 }