CogTrevistaCommonImageParams BlackLevel Property Cognex VisionPro 9.21
Gets or sets the floating point pixel value that will be mapped to black in VisionPro output images.

Namespace: Cognex.VisionPro.Trevista
Assembly: Cognex.VisionPro.Trevista (in Cognex.VisionPro.Trevista.dll) Version: 83.0.0.0
Syntax

public double BlackLevel { get; set; }

Property Value

Type: Double
Default value is 0.
Events

Event TypeReason
ICogChangedEvent Changed Fires when this property changes. The following state flag may be affected:
Remarks

When the CogTrevista Execute(ICogVisionData) function runs, the computed pixel values are initially stored as floating point numbers.

These internal floating point values fall into one of two ranges:

  • Positive only: No values are less than zero. The values are usually less than one, but can be greater than one in exceptional cases.
  • Negative and positive: The values are usually in the range between negative one and positive one, but they can be outside of this range in exceptional cases.

The internal floating point values are mapped to integer pixel values in VisionPro output images. The floating point value specified by BlackLevel is mapped to black: an integer output pixel value of zero.

Similarly, the floating point value specified by WhiteLevel is mapped to white: the maximum pixel value for the specified output image depth. The integer value will be 255 for a CogImage8Grey and 65535 for a CogImage16Grey.

Any internal pixel value that falls between these two limits is linearly mapped to an intermediate shade of grey: a value between black and white. Floating point values that fall outside of the limits are mapped to either black or white, as specified by whichever limit is closer.


This property only supports float value type precision. Up to five decimal places (such as 0.00001) will be maintained. Further precision can be assigned but will be lost due truncation.

See Also