GOA - System.Drawing.Filters.ConvolutionMatrix

ConvolutionMatrix Class


Represents a convolution matrix.

Definition

public class ConvolutionMatrix: Object

Members Table

MethodDescription
ConvolutionMatrixOverloaded. Initializes a new instance of ConvolutionMatrix.
EqualsOverloaded. Compares two objects to determine if they are equal. (Inherited from Object)
FillFills the current ConvolutionMatrix with a specified value.
GetHashCodeServes as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object)
GetTypeGets the Type of the current instance. (Inherited from Object)
ReferenceEqualsDetermines whether the specified Object instances are the same instance. (Inherited from Object)
ToStringOverriden. Returns a String that represents the current Object.
this[]Overloaded. Gets or sets the element at the specified index.
PropertyDescription
ColumnsGets the number of columns of the ConvolutionMatrix.
RowsGets the number of rows of the ConvolutionMatrix.

Inheritance Hierarchy

Object
ConvolutionMatrix

Remarks

The Convolution is a method used in the treatment of image; it acts on each pixels of the image.

The Convolution method is a treatment of a matrix to  one other; the first one is the image to be treated, the second one is the filter also known under the name of "kernel".

Examples

// This examples shows how to create and initialize a ConvolutionMatrix.

 

using System;

using System.Diagnostics;

using System.Drawing.Filters;

 

public class SampleConvolutionMatrix

{

     static void Main()

     {

          // Creates a new ConvolutionMatrix.

          ConvolutionMatrix convolMat = new ConvolutionMatrix(3,3);

 

          // Sets some elements of the ConvolutionMatrix.

          convolMat[0]=-2;

          convolMat[1]=-1;

          convolMat[2]=0;

          convolMat[3]=-1;

          convolMat[4]=1;

          convolMat[5]=1;

          convolMat[6]=0;

 

          // Uses the number of the row and column of the ConvolutionMatrix.

          convolMat[2,1]=1;

          convolMat[2,2]=2;

 

          // Displays the content of the ConvolutionMatrix.

          Debug.WriteLine("\nConvolution matrix:" +convolMat.ToString());

     }

}

 

/*

The output of the sample:

 

Convolution matrix:[-2,-1,0,-1,1,1,0,1,2]

 

*/

Class Information

NamespaceSystem.Drawing.Filters
Flash LibrarySystem.Windows.Forms.scl
Flash Library Version2.0.0.2118
Silverlight LibrarySystem.Windows.Forms.dll



© 2003-2007 NETiKA Technologies. All rights reserved.