C# Class Accord.Imaging.Filters.EuclideanColorFiltering

Euclidean color filtering.

The filter filters pixels, which color is inside/outside of RGB sphere with specified center and radius - it keeps pixels with colors inside/outside of the specified sphere and fills the rest with specified color.

The filter accepts 24 and 32 bpp color images for processing.

Sample usage:

// create filter EuclideanColorFiltering filter = new EuclideanColorFiltering( ); // set center colol and radius filter.CenterColor = new RGB( 215, 30, 30 ); filter.Radius = 100; // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: BaseInPlacePartialFilter
Show file Open project: accord-net/framework

Public Methods

Method Description
EuclideanColorFiltering ( ) : System

Initializes a new instance of the EuclideanColorFiltering class.

EuclideanColorFiltering ( RGB center, short radius ) : System

Initializes a new instance of the EuclideanColorFiltering class.

Protected Methods

Method Description
ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

Method Details

EuclideanColorFiltering() public method

Initializes a new instance of the EuclideanColorFiltering class.
public EuclideanColorFiltering ( ) : System
return System

EuclideanColorFiltering() public method

Initializes a new instance of the EuclideanColorFiltering class.
public EuclideanColorFiltering ( RGB center, short radius ) : System
center RGB RGB sphere's center.
radius short RGB sphere's radius.
return System

ProcessFilter() protected method

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void
image UnmanagedImage Source image data.
rect System.Drawing.Rectangle Image rectangle for processing by the filter.
return void