Hough circle transformation.
Namespace:
AForge.ImagingAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.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:
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: