Example #1
0
        private RecoResult polarRecognition(List <BitmapSymbol> defns)
        {
            RecoResult results = new RecoResult();

            foreach (BitmapSymbol bs in defns)
            {
                SymbolRank polar_result = Polar_Mod_Hausdorff(bs);
                results.Add(ResultType.POLAR, polar_result);
            }
            return(results);
        }
Example #2
0
        private RecoResult screenRecognition(List <SymbolRank> topPolar)
        {
            RecoResult screenResults = new RecoResult();

            foreach (SymbolRank sr in topPolar)
            {
#if JESSI
                Console.WriteLine();
                Console.WriteLine("Doing screen recognition for template " + sr.SymbolName);
#endif
                // clone the BitmapSymbol so that we can rotate it without losing information
                BitmapSymbol clone = (BitmapSymbol)Clone();
                clone.Rotate(-sr.BestOrientation);

                // calculate the data using the rotated clone, but store the output in this symbol's results.
                screenResults.Add(ResultType.PARTIAL_HAUSDORFF, clone.Partial_Hausdorff(sr.Symbol));
                screenResults.Add(ResultType.MOD_HAUSDORFF, clone.Modified_Hausdorff(sr.Symbol));
                screenResults.Add(ResultType.TANIMOTO, clone.Tanimoto_Distance(sr.Symbol));
                screenResults.Add(ResultType.YULE, clone.Yule_Distance(sr.Symbol));
            }
            return(screenResults);
        }
Example #3
0
 private void polarRecognition(List <BitmapSymbol> defns)
 {
     foreach (BitmapSymbol bs in defns)
     {
         SymbolRank polar_result = Polar_Mod_Hausdorff(bs);
         _results.Add(ResultType.POLAR, polar_result);
     }
 }