Example #1
0
        public void main()
        {
            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                Image <Bgr, byte> colorimg = new Image <Bgr, byte>(ofd.FileName);
                Processing        proc     = new Processing();

                var rg = proc.DrawContourAndAreaSize_RG(colorimg);
                var b  = proc.DrawContourAndAreaSize_B(colorimg);

                try
                {
                    //if ( rg.Item1 != null ) imageBox1.Image = rg.Item1;
                }
                catch (Exception)
                {
                }
            }
        }
Example #2
0
        private void btnTestSomething_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                Image <Bgr, byte> colorimg = new Image <Bgr, byte>(ofd.FileName);
                Processing        cnv      = new Processing();

                var rg = cnv.DrawContourAndAreaSize_RG(colorimg);
                try
                {
                    if (rg.Item1 != null)
                    {
                        imageBox1.Image = rg.Item1;
                    }
                    Console.WriteLine(rg.Item2);
                }
                catch (Exception)
                {
                }
            }
        }