Skip to contents

In Place Comparison Operators for Images

Usage

e1 %i>% e2

e1 %i<% e2

e1 %i>=% e2

e1 %i<=% e2

e1 %i==% e2

e1 %i!=% e2

Arguments

e1, e2

Either 2 Image objects or 1 Image object and 1 numeric value/vector. If a vector and its length is less than the number of channels of the image, then it is recycled to match it.

Value

These operators do not return anything. They modify the image in place (destructive operation). If 2 images are passed to the operators, only the one of the left side of the operator is modified; the other is left untouched.

See also

Author

Simon Garnier, garnier@njit.edu

Examples

balloon1 <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon2 <- image(system.file("sample_img/balloon2.png", package = "Rvision"))
balloon1 %i>% balloon2