コード例 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine($"원본 이미지 주소 : ");
            path = Console.ReadLine();

            Console.WriteLine("유전자 이미지 저장할 경로 : ");
            savePath = Console.ReadLine();

            Console.WriteLine("유전자 csv 파일 저장할 경로 : ");
            csvPath = Console.ReadLine();

            Setting();

            Origin = ImageConv(path);

            GeneticManager genetic = new GeneticManager(Origin);

            genetic.BestGenImage += Genetic_BestGenImage;
            genetic.Run();

            for (; ;)
            {
                median = bool.TryParse(Console.ReadLine(), out bool r) ? r : median;
                Console.WriteLine($"Median 값 : {median} 으로 변경됨.");
            }
        }
コード例 #2
0
        private void Btn_run_Click(object sender, EventArgs e)
        {
            if (pic_origin.Image == null)
            {
                Status = "execute fail";
                MessageBox.Show("not found image");
            }
            else
            {
                Status = "execute";
                text_originsize.Enabled = false;
                text_cutsize.Enabled    = false;
                text_grayscale.Enabled  = false;
                Global.Stop             = false;

                GeneticManager gm = new GeneticManager(new Bitmap(pic_origin.Image));
                gm.BestGenImage += Gm_BestGenImage;
                gm.Run();
            }
        }