Assembly: Cognex.VisionPro.LineMax (in Cognex.VisionPro.LineMax.dll) Version: 83.0.0.0
Property Value
Type: DoubleThe relative contrast in the range 0.0 to 1.0, inclusive. The default value is 0.
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed | Fires when this property changes. The following state flag may be affected: |
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if set to a value less than 0.0 or greater than 1.0. |
Unlike contrast, which is a measure of absolute intensity difference, normalized contrast is a measure of relative intensity difference. It measures the contrast relative to the local pixel intensity. This is useful for suppressing noisy gradients found in bright areas. When noisy gradients in bright areas meet the ContrastThreshold constraint, their normalized contrasts may still be below the NormalizedContrastThreshold constraint. If so, edge points will not be created for these noisy gradients.
For example, the normalized contrast for a gradient with contrast of 50 and intensity of 100 would be 50/100=0.5; whereas the normalized contrast for a gradient with contrast of 50 and intensity of 200 would be 50/200=0.25. In this scenario, a NormalizedContrastThreshold of 0.3 will create an edge point in the darker area (normalized contrast = 0.5) and not in the noisy brighter area (normalized contrast = 0.25).
The normalized contrast measurement is computed using:
Where g is the gradient magnitude; and Iavg is the average pixel intensity at the gradient.