public void detect_points() { if (!integral_image) { return; } //List<IPoint> ipts = new List<IPoint>(); // Extract the interest points ipts.Clear(); ipts = FastHessian.getIpoints(0.0002f, 5, 1, iimg); detected = true; }
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"; }