{% extends "base.html" %} {% block title %} inRange {% endblock %} {% block description %}

Checks if array elements lie between the elements of two other arrays.

{% endblock %} {% block signature %}
cv2.inRange(src, lowerb, upperb[, dst]) → dst
{% endblock %} {% block parameters %} {% endblock %} {% block explanation %}

The function checks the range as follows:

...and so on. That is, \(\text{dst}(I)\) is set to 255 (all 1-bits) if \(\text{src}(I)\) is within the specified 1D, 2D, 3D, ... boundaries and 0 otherwise. When the lower and/or upper boundary parameters are scalars, the indices \(I\) at lowerb and upperb in the above formulas should be omitted, but the channel indices remain.

{% endblock %} {% block references %} {% endblock %}