Image Component Library (ICL)
|
Class for comparing two images pixel-wise. More...
#include <BinaryCompareOp.h>
Public Types | |
enum | optype { lt = ippCmpLess, lteq = ippCmpLessEq, eq = ippCmpEq, gteq = ippCmpGreaterEq, gt = ippCmpGreater, eqt } |
this enum specifiy all possible compare operations More... | |
Public Member Functions | |
BinaryCompareOp (optype ot, icl64f tolerance=0) | |
creates a new BinaryCompareOp object with given optype and tolerance level | |
virtual | ~BinaryCompareOp () |
Destructor. | |
virtual void | apply (const core::ImgBase *poSrc1, const core::ImgBase *poSrc2, core::ImgBase **ppoDst) |
applies this compare operation to two source images into the given destination image | |
optype | getOpType () const |
returns the current optype | |
icl64f | getTolerance () const |
returns the current tolerance level | |
void | setOpType (optype ot) |
sets the current opttype | |
void | setTolerance (icl64f tolerance) |
sets the current tolerance level | |
Private Attributes | |
optype | m_eOpType |
internal storage for the current optype | |
icl64f | m_dTolerance |
Class for comparing two images pixel-wise.
Compares pixel values of two images using a specified compare operation. The result is written to a binarized image of type Img8u. If the result of the comparison is true, the corresponding output pixel is set to 255; otherwise, it is set to 0.
icl::filter::BinaryCompareOp::BinaryCompareOp | ( | optype | ot, |
icl64f | tolerance = 0 |
||
) | [inline] |
creates a new BinaryCompareOp object with given optype and tolerance level
ot | optype to use |
tolerance | tolerance level to use |
virtual icl::filter::BinaryCompareOp::~BinaryCompareOp | ( | ) | [inline, virtual] |
Destructor.
virtual void icl::filter::BinaryCompareOp::apply | ( | const core::ImgBase * | poSrc1, |
const core::ImgBase * | poSrc2, | ||
core::ImgBase ** | ppoDst | ||
) | [virtual] |
applies this compare operation to two source images into the given destination image
poSrc1 | first source image |
poSrc2 | second source image |
ppoDst | destination image |
Implements icl::filter::BinaryOp.
optype icl::filter::BinaryCompareOp::getOpType | ( | ) | const [inline] |
returns the current optype
icl64f icl::filter::BinaryCompareOp::getTolerance | ( | ) | const [inline] |
returns the current tolerance level
void icl::filter::BinaryCompareOp::setOpType | ( | optype | ot | ) | [inline] |
sets the current opttype
ot | new optype |
void icl::filter::BinaryCompareOp::setTolerance | ( | icl64f | tolerance | ) | [inline] |
sets the current tolerance level
tolerance | new tolerance level |
internal storage for the current optype