Description

Create and initialize a kernel.

Return Type

None  

Syntax

object.Create SizeX, SizeY, [Type], [vParam]

The Create Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McKernel.
SizeXRequired. A Long value.

X Size of the kernel.

SizeYRequired. A Long value.

Y Size of the kernel. Type - mcKernelType : type of kernel to create. Param - Optional parameter, coefficient's value for ktConstant.

TypeOptional. A mcKernelType enumeration, as described in settings.
vParamOptional. A Variant value.

Settings

The settings for Type are:

ConstantValueDescription
 mcktConstant0

Create a kernel with all the coefficients set to the same value.

 mcktGauss1

Create a Gauss kernel.

 mcktHexagonal256

This is an hexagonal kernel, where Coefficients[2] and Coefficients[8] are ignored.

Remarks

If Type is ktConstant and kernel contains several definitions (Count > 1), this method applies to the definition identified by Index. If Type is ktGauss, Count is set to 2 and two Gauss kernels are created, one horizontal and the other vertical.

Exceptions

E_OUTOFMEMORY, E_INVALIDARG.