DIPlib Documentation - ©1995-2008 Quantitative Imaging Group, Delft University of Technology.

Compare

Compare grey values in two images

SYNOPSIS

#include "dip_math.h"

dip_Error dip_Compare ( in1, in2, out, selector )

DATA TYPES

binary, integer, float

FUNCTION

This function can perform various pixel-by-pixel comparisons (smaller, smaller- equal, equal, not equal, greater-equal, greater) between in1 ans in2. out contains the binary result. This is implemented with a call to Select whose in3 and in4 are set to binary true and false, respectively.

in2 can be a 0D image for comparison of pixel values with a single scalar value. This leads to the functionality of Threshold, but with more options.

ARGUMENTS

Data typeNameDescription
dip_Imagein1First input
dip_Imagein2Second input
dip_ImageoutOutput
dipf_SelectselectorSelect flag
NameDescription
DIP_SELECT_LESSER<, Lesser than
DIP_SELECT_LESSER_EQUAL<=, Lesser or equal
DIP_SELECT_NOT_EQUAL!=, Unequal
DIP_SELECT_EQUAL==, Equal
DIP_SELECT_GREATER_EQUAL>=, Greater or equal
DIP_SELECT_GREATER>, Greater

SEE ALSO

Select, Threshold, Equal, Greater, Lesser, NotEqual, NotGreater, NotLesser, SelectValue, NotZero

DIPlib on-line documentation | Function reference | Global function index