Sunday, October 11, 2009

C# Image Processing library

This is a nice tool:
http://www.aforgenet.com/

From the documentation:


Hough circle transformation.
Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.0.1.0 (2.0.1.0)

Syntax


C#
public class HoughCircleTransformation

Remarks

The class implements Hough circle transformation, which allows to detect circles of specified radius in an image.
The class accepts binary images for processing, which are represented by 8 bpp grayscale images. All black pixels (0 pixel's value) are treated as background, but pixels with different value are treated as circles' pixels.
Sample usage:

CopyC#
HoughCircleTransformation circleTransform = new HoughCircleTransformation( 35 );
// apply Hough circle transform
circleTransform.ProcessImage( sourceImage );
Bitmap houghCirlceImage = circleTransform.ToBitmap( );
// get circles using relative intensity
HoughCircle[] circles = circleTransform.GetCirclesByRelativeIntensity( 0.5 );

foreach ( HoughCircle circle in circles )
{
    // ...
}

Initial image:

Hough circle transformation image:

No comments:

Post a Comment