Susan corners detector.

The class implements Susan corners detector, which is described by S.M. Smith in: S.M. Smith, "SUSAN - a new approach to low level image processing", Internal Technical Report TR95SMS1, Defense Research Agency, Chobham Lane, Chertsey, Surrey, UK, 1995.

Some implementation notes: Analyzing each pixel and searching for its USAN area, the 7x7 mask is used, which is comprised of 37 pixels. The mask has circle shape: xxx xxxxx xxxxxxx xxxxxxx xxxxxxx xxxxx xxx In the case if USAN's center of mass has the same coordinates as nucleus (central point), the pixel is not a corner. For noise suppression the 5x5 square window is used.

The class processes only grayscale 8 bpp and color 24/32 bpp images. In the case of color image, it is converted to grayscale internally using GrayscaleBT709 filter.

Sample usage:

// create corners detector's instance SusanCornersDetector scd = new SusanCornersDetector( ); // process image searching for corners List<IntPoint> corners = scd.ProcessImage( image ); // process points foreach ( IntPoint corner in corners ) { // ... }
Inheritance: ICornersDetector
        public void RansacLineConstructorTest2()
        {
            Accord.Math.Random.Generator.Seed = 0;

            Bitmap image = Accord.Imaging.Image.Clone(Resources.noise_line);

            //Accord.Controls.ImageBox.Show(image); 

            var detector = new SusanCornersDetector();

            List<IntPoint> cloud = detector.ProcessImage(image);
            Assert.AreEqual(211, cloud.Count);

            Bitmap marks = new PointsMarker(cloud, Color.Pink).Apply(image);
            //Accord.Controls.ImageBox.Show(marks);

            RansacLine ransac = new RansacLine(5, 1e-10);
            Line line = ransac.Estimate(cloud);

            Assert.AreEqual(0.501134932f, line.Intercept, 1e-5);
            Assert.AreEqual(-0.865369201f, line.Slope, 1e-5);

            //var result = new LineMarker(line).Apply(image);
            //Accord.Controls.ImageBox.Show(result);
        }
Example #2
0
        public List <Rg.Point3d> GetSusanCorners()
        {
            Ai.SusanCornersDetector corners = new Ai.SusanCornersDetector();
            if (Threshold >= 0)
            {
                corners.DifferenceThreshold = Threshold;
            }
            if (Value >= 0)
            {
                corners.GeometricalThreshold = (int)Value;
            }

            return(corners.ProcessImage(bitmap).ToRhinoPoints(bitmap.Height));
        }
Example #3
0
        /// <summary>
        ///   Creates a new object that is a copy of the current instance.
        /// </summary>
        ///
        /// <returns>
        ///   A new object that is a copy of this instance.
        /// </returns>
        ///
        public object Clone()
        {
            var clone = new SusanCornersDetector(differenceThreshold, geometricalThreshold);

            return(clone);
        }
 /// <summary>
 ///   Creates a new object that is a copy of the current instance.
 /// </summary>
 /// 
 /// <returns>
 ///   A new object that is a copy of this instance.
 /// </returns>
 /// 
 public object Clone()
 {
     var clone = new SusanCornersDetector(differenceThreshold, geometricalThreshold);
     return clone;
 }