Flood filling with specified color starting from specified point.
Namespace:
AForge.Imaging.FiltersAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.4.0 (2.2.4.0)
Syntax
| C# |
|---|
public class PointedColorFloodFill : BaseInPlacePartialFilter |
Remarks
The filter performs image's area filling (4 directional) starting from the specified point. It fills the area of the pointed color, but also fills other colors, which are similar to the pointed within specified tolerance. The area is filled using specified fill color.
The filter accepts 8 bpp grayscale images and 24 bpp color images for processing.
Sample usage:
// create filter PointedColorFloodFill filter = new PointedColorFloodFill( ); // configure the filter filter.Tolerance = Color.FromArgb( 150, 92, 92 ); filter.FillColor = Color.FromArgb( 255, 255, 255 ); filter.StartingPoint = new IntPoint( 150, 100 ); // apply the filter filter.ApplyInPlace( image );
Initial image:
Result image:
Inheritance Hierarchy
System..::.Object
AForge.Imaging.Filters..::.BaseInPlacePartialFilter
AForge.Imaging.Filters..::.PointedColorFloodFill
AForge.Imaging.Filters..::.BaseInPlacePartialFilter
AForge.Imaging.Filters..::.PointedColorFloodFill