IDXTConvolution interface

This interface performs image convolutions for DXSurface objects.

Members

The IDXTConvolution interface inherits from the IUnknown interface. IDXTConvolution also has these types of members:

  • Methods

Methods

The IDXTConvolution interface has these methods.

Method Description
GetBias

Retrieves the bias value used for the convolution.

GetConvertToGray

Retrieves a value that indicates whether the filter output color is converted to grayscale.

GetExcludeAlpha

Retrieves a value that indicates whether the alpha channel should be filtered along with the color data.

GetFilterType

Retrieves the selected filter type for the convolution.

SetBias

Sets the bias value used for the convolution.

SetConvertToGray

Sets a value that indicates whether the filter output color is converted to grayscale.

SetCustomFilter

Sets the convolution to use a custom filter.

SetExcludeAlpha

Sets a value that indicates whether the alpha channel should be filtered with the color data.

SetFilterType

Sets the selected filter type for the convolution.

 

Remarks

Image convolution is more commonly known as filtering. Convolution works by combining the colors of surrounding samples to determine the color of a sample on the destination surface. The way in which surrounding pixels are combined is determined by a filter, which is a rectangular matrix of numbers. Each number in the matrix is a weighting for the pixel at that position. The contributions from each weighting are added to produce the output color on the destination surface. Negative weighting values are subtracted from the total. Each filter matrix has a center pixel that is scanned over each sample of the input image to produce the output image.

The filter matrix has a width and height that determine how many pixels of the source image will contribute to the color of the destination's center pixel. Most matrices are square and have an odd number of rows and columns, though you can define custom filters of arbitrary size. There are also predefined filters described in the DXCONVFILTERTYPE enumeration.

Sometimes convolution can reduce or increase the brightness of an image. To compensate, you can define a bias that is added to the filtered result.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Dxtmsft.h

IDL

Dxtmsft.idl

DLL

Dxtrans.dll