inRange performs range thresholding on an
Image object. Pixels which values are within the desired
range are turned white while pixels which values are outside are turned
black. This operation is performed separately on each channel for
multi-channel images.
A vector indicating the lower end of the thresholding range. The
can have as many elements as the number of channels in the image. If it has
less elements than the number of channels, it is recycled to match the
number of channels. If it has more elements than the number of channels, the
extra elements are ignored without warning (default: rep(0, 4)).
up
A vector indicating the upper end of the thresholding range. The
can have as many elements as the number of channels in the image. If it has
less elements than the number of channels, it is recycled to match the
number of channels. If it has more elements than the number of channels, the
extra elements are ignored without warning (default: rep(255, 4)).