Equal
Include <mln/core/algorithm/equal.hpp>
- Image{A} Image{B} bool equal(A lhs, B rhs)
Compare the pixels of lhs and rhs. The result is true if and only if rhs’s values equal lhs’s values.
- Parameters:
lhs – First image to compare
rhs – Second image to compare
- Template Parameters:
LhsImage – A model of
InputImage
RhsImage – A model of
InputImage
- Returns:
True of false
Examples
Compare two images:
mln::image2d<mln::rgb8> lhs = ...; mln::image2d<mln::rgb8> rhs = ...; bool is_equal = mln::equal(lhs, rhs);
Complexity
Linear in the number of pixels.