[][src]Function opencv::core::check_range

pub fn check_range(
    a: &dyn ToInputArray,
    quiet: bool,
    pos: &mut Point,
    min_val: f64,
    max_val: f64
) -> Result<bool>

Checks every element of an input array for invalid values.

The function cv::checkRange checks that every array element is neither NaN nor infinite. When minVal > -DBL_MAX and maxVal < DBL_MAX, the function also checks that each value is between minVal and maxVal. In case of multi-channel arrays, each channel is processed independently. If some values are out of range, position of the first outlier is stored in pos (when pos != NULL). Then, the function either returns false (when quiet=true) or throws an exception.

Parameters

  • a: input array.
  • quiet: a flag, indicating whether the functions quietly return false when the array elements are out of range or they throw an exception.
  • pos: optional output parameter, when not NULL, must be a pointer to array of src.dims elements.
  • minVal: inclusive lower boundary of valid values range.
  • maxVal: exclusive upper boundary of valid values range.

C++ default parameters

  • quiet: true
  • pos: 0
  • min_val: -DBL_MAX
  • max_val: DBL_MAX