C# 클래스 AForge.Imaging.Filters.ImageWarp

Image warp effect filter.

The image processing filter implements a warping filter, which sets pixels in destination image to values from source image taken with specified offset (see WarpMap).

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

Sample usage:

// build warp map int width = image.Width; int height = image.Height; IntPoint[,] warpMap = new IntPoint[height, width]; int size = 8; int maxOffset = -size + 1; for ( int y = 0; y < height; y++ ) { for ( int x = 0; x < width; x++ ) { int dx = ( x / size ) * size - x; int dy = ( y / size ) * size - y; if ( dx + dy <= maxOffset ) { dx = ( x / size + 1 ) * size - 1 - x; } warpMap[y, x] = new IntPoint( dx, dy ); } } // create filter ImageWarp filter = new ImageWarp( warpMap ); // apply the filter Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

상속: BaseFilter
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
ImageWarp ( IntPoint warpMap ) : System

Initializes a new instance of the ImageWarp class.

보호된 메소드들

메소드 설명
ProcessFilter ( UnmanagedImage source, UnmanagedImage destination ) : void

Process the filter on the specified image.

메소드 상세

ImageWarp() 공개 메소드

Initializes a new instance of the ImageWarp class.
public ImageWarp ( IntPoint warpMap ) : System
warpMap IntPoint Map used for warping images (see ).
리턴 System

ProcessFilter() 보호된 메소드

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage source, UnmanagedImage destination ) : void
source UnmanagedImage Source image data.
destination UnmanagedImage Destination image data.
리턴 void