C# Class Accord.Imaging.Filters.TransformToPolar

Transform rectangle image into circle (to polar coordinates).

The image processing routine does transformation of the source image into circle (polar transformation). The produced effect is similar to GIMP's "Polar Coordinates" distortion filter (or its equivalent in Photoshop).

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

Sample usage:

// create filter TransformToPolar filter = new TransformToPolar( ); filter.OffsetAngle = 0; filter.CirlceDepth = 1; filter.UseOriginalImageSize = false; filter.NewSize = new Size( 200, 200 ); // apply the filter Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

Inheritance: BaseTransformationFilter
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
TransformToPolar ( ) : System

Initializes a new instance of the TransformToPolar class.

Protected Methods

Method Description
CalculateNewImageSize ( UnmanagedImage sourceData ) : Size

Calculates new image size.

ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void

Process the filter on the specified image.

Method Details

CalculateNewImageSize() protected method

Calculates new image size.
protected CalculateNewImageSize ( UnmanagedImage sourceData ) : Size
sourceData UnmanagedImage Source image data.
return System.Drawing.Size

ProcessFilter() protected method

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
return void

TransformToPolar() public method

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