Description
Create and initialize a kernel.
-
Return Type
-
None
-
Syntax
-
object.Create SizeX, SizeY, [Type], [vParam]
The Create Method syntax has these parts: |
| object | An expression evaluating to an object of type McKernel. | | SizeX | Required. A Long value. X Size of the kernel.
| | SizeY | Required. A Long value. Y Size of the kernel. Type - mcKernelType : type of kernel to create. Param - Optional parameter, coefficient's value for ktConstant.
| | Type | Optional. A mcKernelType enumeration, as described in settings. | | vParam | Optional. A Variant value. | Settings The settings for Type are:
 | mcktConstant | 0 |
Create a kernel with all the coefficients set to the same value.
|
 | mcktGauss | 1 |
Create a Gauss kernel.
|
 | mcktHexagonal | 256 |
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.
|