Synopsis
Select digitization reference level.
Format
void MdigReference(DigId, ReferenceType, ReferenceLevel)
MIL_ID DigId; | Digitizer identifier |
long ReferenceType; | Reference type |
long ReferenceLevel; | Reference level |
Description
This function sets (if available) the reference levels used to digitize the analog signal received from an input device (generally a camera). This function is specific to analog input devices. Depending on the type of digitizer and input signal, some reference types are not applicable.
The DigId parameter specifies the identifier of the digitizer on which to set the reference level. An error is generated if the specified digitizer does not support the type of programmable digitization reference levels specified.
The ReferenceType parameter specifies the reference level type to adjust for the specified digitizer. This parameter can be set to one of the following:
M_BLACK_REF | Set the input signal’s digitization black reference level (0). |
M_WHITE_REF | Set the input signal’s digitization white reference level (eg: 0xff for 8-bit digitization). |
M_BRIGHTNESS_REF | Set the brightness level for composite input signals. |
M_CONTRAST_REF | Set the contrast level for composite input signals. |
M_HUE_REF | Set the hue level for composite input signals.) |
M_SATURATION_REF | Set the saturation level for composite input signals. |
On many digitizers, when using RGB input and setting ReferenceType to M_BLACK_REF or M_WHITE_REF, you can control the reference level of a specific input channel by combining it with one of the following:
M_CH0_REF | Set the reference level on input channel 0. |
M_CH1_REF | Set the reference level on input channel 1. |
M_CH2_REF | Set the reference level on input channel 2. |
M_CH3_REF | Set the reference level on input channel 3. |
M_ALL_REF | Set the reference level on all input channels. (This is the default setting). |
The ReferenceLevel parameter specifies the level of reference. This parameter can be set to a value between M_MIN_LEVEL and M_MAX_LEVEL, inclusive. The value may be expressed as an integer within this range, or as M_MIN_LEVEL + n or M_MAX_LEVEL – n. If you set this parameter to M_DEFAULT, the reference levels are set to the default levels for the specified digitizer data format.
Note, some digitizers might take a few milliseconds before the reference level stabilizes.
See also
MdigAlloc