Esempio n. 1
0
        SkeletonBuilder ProcessSkeleton(string name, BinaryMap binary)
        {
            SkeletonBuilder skeleton = null;

            DetailLogger.RunInContext(name, delegate()
            {
                Logger.Log("Binarized", binary);
                BinaryMap thinned = Thinner.Thin(binary);
                skeleton          = new SkeletonBuilder();
                RidgeTracer.Trace(thinned, skeleton);
                DotRemover.Filter(skeleton);
                PoreRemover.Filter(skeleton);
                GapRemover.Filter(skeleton);
                TailRemover.Filter(skeleton);
                FragmentRemover.Filter(skeleton);
                BranchMinutiaRemover.Filter(skeleton);
            });
            return(skeleton);
        }
Esempio n. 2
0
        SkeletonBuilder ProcessSkeleton(string name, BinaryMap binary)
        {
            SkeletonBuilder skeleton = null;

            DetailLogger.RunInContext(name, delegate()
            {
                Logger.Log("Binarized", binary);
                BinaryMap thinned = Thinner.Thin(binary);
                skeleton          = new SkeletonBuilder();
                RidgeTracer.Trace(thinned, skeleton);

                ////Testing Start
                //var outFileDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "outputSkeletonRidgeTracer-" + name + DateTime.UtcNow.Millisecond + ".bin");
                //var file = new FileStream(outFileDir, FileMode.CreateNew);
                //var binWrite = new BinaryWriter(file);
                //binWrite.Write(skeleton.Minutiae.Count());
                //Console.WriteLine(skeleton.Minutiae.Count());
                //foreach (var minutia in skeleton.Minutiae)
                //{
                //    binWrite.Write(minutia.Valid);
                //    Console.WriteLine(minutia.Valid);
                //    binWrite.Write(minutia.Position.X);
                //    Console.WriteLine(minutia.Position.X);
                //    binWrite.Write(minutia.Position.Y);
                //    Console.WriteLine(minutia.Position.Y);
                //    binWrite.Write(minutia.Ridges.Count);
                //    Console.WriteLine(minutia.Ridges.Count);
                //}
                //binWrite.Close();
                //file.Close();
                ////Testing Finish

                DotRemover.Filter(skeleton);
                PoreRemover.Filter(skeleton);
                GapRemover.Filter(skeleton);
                TailRemover.Filter(skeleton);
                FragmentRemover.Filter(skeleton);
                BranchMinutiaRemover.Filter(skeleton);
            });
            Count++;
            return(skeleton);
        }