Click or drag to resize

IMcOperationsDiv2 Method

Division of an image by another using 2 correction factors.

Namespace:  MediaCy.IQL.Operations
Assembly:  MediaCy.IQL.Operations (in MediaCy.IQL.Operations.dll) Version: 10.0.6912.0
Syntax
VB
Function Div2 ( 
	vOperand2 As Object,
	<OptionalAttribute> vOperand1 As Object
) As McImage

Parameters

vOperand2
Type: SystemObject
Second operand of the operation, a McImage (a number is not allowed for Div2).
vOperand1 (Optional)
Type: SystemObject
Optional first image operand (vOperand1 is the parent image when parameter is omitted). A number is not allowed for Div2.

Return Value

Type: McImage
The resulting McImage.
Remarks
For new applications it is recommended that you use Div2Ex where the scaling offset, additive offset and mcConversionMode can be passed as arguments. The Div2 operation does a division of the vOperand1 image (which is the Parent image by default) bythe vOperand2 image, applying two correction factors or "offsets". One "offset" (offset0) is multiplicative and the other (offset1) is additive. These correction factors are taken from the Offset property, which must have two values for each channel. The values of offset0 for each channel of vOperand1 are followed by the values vor offset1 (e.g., 3 values of offset0 followed by 3 values of offset1 for an RGB image). Div2 is typically used to compute the luminance ratio between two images, corrected for a background luminance common to both images. Offset being an array of at least 2 values (6 for color images), the result is: offset0 * (vOperand1 - offset1) / (vOperand2 - offset1) + offset1 Any offset0 value of zero is ignored (it is treated as 1). If (vOperand1 - offset1) is zero or negative, then the result is set to zero. If (vOperand2 - offset1) is zero or negative, then the result is set to the destination McImage.RangeMax. A conversion is performed on vOperand2 so that it has the same type as vOperand1. The conversion rules are defined by the value of the Conversion property. The result is stored in the parent image or vOperand1 if there is no parent. Unlike most other McOperations methods, neither operand can be a number; both operands must be images. For floating point image types, the stored results may exceed the bounds of the current destination McImage.RangeMin to McImage.RangeMax. These range properties are not changed automatically.
See Also