Example #1
0
        public void describe_points()
        {
            if (!detected)
            {
                return;
            }
            SurfDescriptor.DecribeInterestPoints(ipts, false, false, iimg);
            descriptor_length = 64;
            described         = true;
            int length = ipts.Count;

            connection_id = new int[length];
            for (int i = 0; i < length; i++)
            {
                connection_id[i] = -1;
            }
        }
Example #2
0
        private void btnRunSurf_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.ShowDialog();
            string pathToFile = openFileDialog.FileName;

            Stopwatch watch = new Stopwatch();

            watch.Start();

            try
            {
                // Load an Image
                Bitmap img = new Bitmap(pathToFile);
                pbMainPicture.Image = img;

                // Create Integral Image
                IntegralImage iimg = IntegralImage.FromImage(img);

                // Extract the interest points
                ipts = FastHessian.getIpoints(0.0002f, 5, 2, iimg);

                // Describe the interest points
                SurfDescriptor.DecribeInterestPoints(ipts, false, false, iimg);

                // Draw points on the image
                PaintSURF(img, ipts);
            }
            catch
            {
            }

            watch.Stop();
            this.Text = "DemoSURF - Elapsed time: " + watch.Elapsed +
                        " for " + ipts.Count + "points";
        }