Function opencv::cudaarithm::in_range
source · pub fn in_range(
src: &impl ToInputArray,
lowerb: Scalar,
upperb: Scalar,
dst: &mut impl ToOutputArray,
stream: &mut Stream
) -> Result<()>Expand description
Checks if array elements lie between two scalars.
The function checks the range as follows:
- For every element of a single-channel input array:
- For two-channel arrays:
- and so forth.
That is, dst (I) is set to 255 (all 1 -bits) if src (I) is within the specified 1D, 2D, 3D, … box and 0 otherwise.
Note that unlike the CPU inRange, this does NOT accept an array for lowerb or upperb, only a cv::Scalar.
Parameters
- src: first input array.
- lowerb: inclusive lower boundary cv::Scalar.
- upperb: inclusive upper boundary cv::Scalar.
- dst: output array of the same size as src and CV_8U type.
- stream: Stream for the asynchronous version.
See also
cv::inRange
C++ default parameters
- stream: Stream::Null()