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:
Returns:

True of false

Examples

  1. 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.