public AccuracyAlgorithms(OriganalImage beforeImage, OriganalImage afterImage, Info info)
        {
            InitializeComponent();

            originalImage = beforeImage; originalImage2 = afterImage;

            isClicked = false; isClicked2 = false;

            rectModel  = new Rectangle(0, 0, 0, 0);
            rectSearch = new Rectangle(0, 0, 0, 0);
            rectFind   = new Rectangle(0, 0, 0, 0);

            penWhite      = new Pen(Color.White, 1);
            penGreen      = new Pen(Color.Green, 1);
            penYellow     = new Pen(Color.Yellow, 1);
            penDarkOrange = new Pen(Color.DarkOrange, 1);
            rectModel     = new Rectangle();

            this.image  = originalImage.getRedBitmap(); this.image2 = originalImage2.getRedBitmap();
            imageOrigin = (Bitmap)image.Clone(); imageOrigin2 = (Bitmap)image2.Clone();
            imagePaint  = new Bitmap(image.Width, image.Height); imagePaint2 = new Bitmap(image2.Width, image2.Height);

            pictureBox1.Image = image; pictureBox2.Image = image2; image4 = (Bitmap)image2.Clone();

            modelForm = new Model();

            aac = new AccuracyAlgorithmsCorrelation(info);

            points  = new List <Point>();
            points2 = new List <Point>();
            points4 = new List <Point>();
        }
Ejemplo n.º 2
0
        public Accuracy(OriganalImage beforeImage, OriganalImage afterImage, Info info)
        {
            InitializeComponent();

            this.beforeImage = beforeImage;
            this.afterImage  = afterImage;

            currentBefore = (Bitmap)beforeImage.getRedBitmap().Clone();
            currentAfter  = (Bitmap)afterImage.getRedBitmap().Clone();

            pictureBox1.Image = currentBefore;
            pictureBox2.Image = currentAfter;

            imagePaintBefore = new Bitmap(currentBefore.Width, currentBefore.Height);
            imagePaintAfter  = new Bitmap(currentAfter.Width, currentAfter.Height);

            penWhite      = new Pen(Color.White, 1);
            penGreen      = new Pen(Color.Green, 1);
            penYellow     = new Pen(Color.Yellow, 1);
            penDarkOrange = new Pen(Color.DarkOrange, 1);

            isClicked = false;

            rectModel = new Rectangle(0, 0, 0, 0);

            this.info = info;
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Gdal.AllRegister();     //регистрация драйверов для доступа к растровым данным
            Ogr.RegisterAll();      //регистрирует драйвера доступа в векторным данным

            label1.Text = "Версия библиотеки:\n" + Gdal.VersionInfo("");

            progressBar1.Minimum = 0;

            orgImg = new OriganalImage(filename, progressBar1);
        }
Ejemplo n.º 4
0
        private void button10_Click(object sender, EventArgs e)
        {
            Info info = new Info();

            info.a0 = 0;
            info.a1 = 1.05d;
            info.a2 = 0.05d;
            info.b0 = 0;
            info.b1 = 0.05d;
            info.b2 = 1.05d;

            AffineTransformation at = new AffineTransformation(orgImg.getRGBBitmap());

            at.transform(info.a0, info.a1, info.a2, info.b0, info.b1, info.b2, true);

            OriganalImage origanalImage2 = new OriganalImage(at.getTransformImage(), progressBar1);

            AccuracyAlgorithms newForm = new AccuracyAlgorithms(orgImg, origanalImage2, info);

            newForm.Show();
        }
Ejemplo n.º 5
0
        private void button2_Click(object sender, EventArgs e)
        {
            Info info = new Info();

            info.a0 = Convert.ToDouble(textBox1.Text);
            info.a1 = Convert.ToDouble(textBox3.Text);
            info.a2 = Convert.ToDouble(textBox5.Text);
            info.b0 = Convert.ToDouble(textBox2.Text);
            info.b1 = Convert.ToDouble(textBox4.Text);
            info.b2 = Convert.ToDouble(textBox6.Text);

            OriganalImage origanalImage = new OriganalImage(image, new ProgressBar());

            at.transform(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox3.Text),
                         Convert.ToDouble(textBox5.Text), Convert.ToDouble(textBox2.Text),
                         Convert.ToDouble(textBox4.Text), Convert.ToDouble(textBox6.Text),
                         radioButton1.Checked);
            OriganalImage origanalImage2 = new OriganalImage(at.getTransformImage(), new ProgressBar());

            AccuracyAlgorithms newForm = new AccuracyAlgorithms(origanalImage, origanalImage2, info);

            newForm.Show();
        }