Accord.Imaging.CorrelationMatching.Match C# (CSharp) Method

Match() private method

private Match ( Bitmap image1, Bitmap image2, IEnumerable points1, IEnumerable points2 ) : AForge.IntPoint[][]
image1 System.Drawing.Bitmap
image2 System.Drawing.Bitmap
points1 IEnumerable
points2 IEnumerable
return AForge.IntPoint[][]
        public IntPoint[][] Match(Bitmap image1, Bitmap image2,
            IEnumerable<IntPoint> points1, IEnumerable<IntPoint> points2)
        {
            this.image1 = image1;
            this.image2 = image2;
            return Match(points1, points2);
        }

Same methods

CorrelationMatching::Match ( Bitmap image1, Bitmap image2, IntPoint points1, IntPoint points2 ) : AForge.IntPoint[][]
CorrelationMatching::Match ( IEnumerable points1, IEnumerable points2 ) : AForge.IntPoint[][]
CorrelationMatching::Match ( IntPoint points1, IntPoint points2 ) : AForge.IntPoint[][]

Usage Example

Esempio n. 1
0
        private void btnCorrelation_Click(object sender, EventArgs e)
        {
            if (harrisPoints1 == null)
            {
                MessageBox.Show("Please, click Harris button first! :-)");
                return;
            }

            // Step 2: Match feature points using a correlation measure
            CorrelationMatching matcher = new CorrelationMatching(9);
            IntPoint[][] matches = matcher.Match(img1, img2, harrisPoints1, harrisPoints2);

            // Get the two sets of points
            correlationPoints1 = matches[0];
            correlationPoints2 = matches[1];

            // Concatenate the two images in a single image (just to show on screen)
            Concatenate concat = new Concatenate(img1);
            Bitmap img3 = concat.Apply(img2);

            // Show the marked correlations in the concatenated image
            PairsMarker pairs = new PairsMarker(
                correlationPoints1, // Add image1's width to the X points to show the markings correctly
                correlationPoints2.Apply(p => new IntPoint(p.X + img1.Width, p.Y)));

            pictureBox.Image = pairs.Apply(img3);
        }
All Usage Examples Of Accord.Imaging.CorrelationMatching::Match