コード例 #1
0
        public static bool[][] KwonWoongKangThinningAlg(bool[][] s)
        {
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s); // make a deep copy to start..
            int      count = 0;

            do  // the first pass
            {
                count  = stepKwonWoongKangThinningThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepKwonWoongKangThinningThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);

            // pokracovanie druha podmienka

            do  // the second pass
            {
                count = passKwonWoongKangThinningThinning(temp, s);
                temp  = ThinningHelper.ArrayClone(s);     // ..and on each..
            }while (count > 0);
            Benchmark.End();

            return(s);
        }
コード例 #2
0
    {                                   //  Zhang, Y. Y.;  Wang P. S. P. A fast and flexible thinning algorithm. IEEE Transactions on Computers Year: 1989, Volume: 38, Issue: 5 Pages: 741 - 745, DOI: 10.1109/12.24276
        public static bool[][] WangZhangThinningAlg(bool[][] s)
        {
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s); // make a deep copy to start..
            int      count = 0;

            do  // the missing iteration
            {
                count  = stepWangZhangThinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepWangZhangThinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
コード例 #3
0
        public static bool[][] ZhangSuenThinningAlg(bool[][] s)      //   http://stackoverflow.com/questions/20245003/zhang-suen-thinning-algorithm-c-sharp
        {
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s); // make a deep copy to start..
            int      count = 0;

            do  // the missing iteration
            {
                count  = stepZhangSuenThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepZhangSuenThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
コード例 #4
0
        public static bool[][] LuWangThinningAlg(bool[][] s) //http://shodhganga.inflibnet.ac.in/bitstream/10603/3466/10/10_chapter%202.pdf
        {                                                    // str. 3
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s);   // make a deep copy to start..
            int      count = 0;

            do  // the missing iteration
            {
                count  = stepLuWangThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepLuWangThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
コード例 #5
0
        public static bool[][] EfficientThinningAlg(bool[][] s)      // http://www.academia.edu/2075831/An_Efficient_Parallel_Thinning_Algorithm_using_One_and_Two_Sub-Iterations
        {
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s); // make a deep copy to start..
            int      count = 0;

            do  // the missing iteration
            {
                count  = stepEfficientThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepEfficientThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
        public static bool[][] ModifiedThinningalgorithmZhangWangThinningAlg(bool[][] s) //https://gist.github.com/anonymous/fe757151d37a7f229386#file-thinning-algs
        {                                                                                // http://www.uel.br/pessoal/josealexandre/stuff/thinning/ftp/zhang-wang.pdf
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s);                               // make a deep copy to start..
            int      count = 0;

            do  // the missing iteration
            {
                count  = stepZhangWangThinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepZhangWangThinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
コード例 #7
0
        /**
         * {@inheritDoc}
         */


        public bool[][] Hilditch2ThinningAlg(bool[][] s)
        {
            bool[][] temp = ThinningHelper.ArrayClone(s);  // make a deep copy to start..


            int count = 0;

            do  // the missing iteration
            {
                count  = Hilditch2Thinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += Hilditch2Thinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);

            return(s);
        }
コード例 #8
0
        public static bool[][] HybridAlg(bool[][] s)            //https://www.scribd.com/document/116907201/A-Novel-Embedded-Hybrid-Thinning-Algorithm-For
        {
            Benchmark.Start();
            bool[][] temp = ThinningHelper.ArrayClone(s);  // make a deep copy to start..

            int count = 0;

            do  // the missing iteration
            {
                count  = HybridAlgThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += HybridAlgThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
コード例 #9
0
        public bool[][] MorphologicalThinningAlg(bool[][] s)
        {
            bool[][] temp = ThinningHelper.ArrayClone(s);  // make a deep copy to start..


            int count = 0;

            do  // the missing iteration
            {
                count  = stepMorphologicalThinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepMorphologicalThinning(temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!

                iteration++;
            }while (count > 0);

            return(s);
        }
コード例 #10
0
        public static bool[][] ArabicParallelThinningAlg(bool[][] s)                // http://www.ancient-asia-journal.com/articles/10.5334/aa.06114/
        {
            Benchmark.Start();
            bool[][] temp  = ThinningHelper.ArrayClone(s); // make a deep copy to start..
            int      count = 0;

            do  // the missing iteration
            {
                count  = stepArabicParallelThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepArabicParallelThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
                count += stepArabicParallelThinning(3, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
                count += stepArabicParallelThinning(4, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);
            Benchmark.End();
            return(s);
        }
コード例 #11
0
        public static bool[][] ProposedKwonWoongKangThinningAlg(bool[][] s)
        {
            Benchmark.Start();                             // time counting
            bool[][] temp  = ThinningHelper.ArrayClone(s); // make a deep copy to start..
            int      count = 0;

            do  // the first pass
            {
                count  = stepProposedKwonWoongKangThinningThinning(1, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..and on each..
                count += stepProposedKwonWoongKangThinningThinning(2, temp, s);
                temp   = ThinningHelper.ArrayClone(s);    // ..call!
            }while (count > 0);

            do  // the second pass
            {
                count = pass2ProposedKwonWoongKangThinningThinning(temp, s);
                temp  = ThinningHelper.ArrayClone(s);     // ..and on each..
            }while (count > 0);

            do  // the third pass
            {
                count = pass3ProposedKwonWoongKangThinningThinning(1, temp, s);
                temp  = ThinningHelper.ArrayClone(s);     // ..and on each..
                count = pass3ProposedKwonWoongKangThinningThinning(2, temp, s);
                temp  = ThinningHelper.ArrayClone(s);     // ..and on each..
                count = pass3ProposedKwonWoongKangThinningThinning(3, temp, s);
                temp  = ThinningHelper.ArrayClone(s);     // ..and on each..
                count = pass3ProposedKwonWoongKangThinningThinning(4, temp, s);
                temp  = ThinningHelper.ArrayClone(s);     // ..and on each..
            }while (count > 0);

            Benchmark.End();

            return(s);
        }