Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
icl::filter::ProximityOp Class Reference

Class for computing proximity measures. More...

#include <ProximityOp.h>

Inheritance diagram for icl::filter::ProximityOp:
icl::filter::BinaryOp icl::utils::Uncopyable icl::utils::Configurable

List of all members.

Public Types

enum  applymode { full, same, valid }
 enum to specify the current apply mode of a ProximityOp More...
enum  optype { sqrDistance, crossCorr, crossCorrCoeff }
 enum to specify the current operation type of a ProximityOp More...

Public Member Functions

ICLFilter_API ProximityOp (optype ot, applymode am=valid)
 Creates a new ProximityOp object with given apply mode and optype.
virtual ~ProximityOp ()
 Destructor.
virtual ICLFilter_API void apply (const core::ImgBase *poSrc1, const core::ImgBase *poSrc2, core::ImgBase **ppoDst)
 applies the current op given source image, template and destination image
ICLFilter_API void setOpType (optype ot)
 sets the current optype
ICLFilter_API void setApplyMode (applymode am)
 sets the current applymode
ICLFilter_API optype getOpType () const
 returns the current optype
ICLFilter_API applymode getApplyMode () const
 returns the current applymode

Private Attributes

core::Img32fm_poImageBuffer
 internal used buffer for handling unsupported formats
core::Img32fm_poTemplateBuffer
 internal used buffer for handling unsupported formats

Detailed Description

Class for computing proximity measures.

(Only available for Img8u and Img32f, IPP only!)

Overview

"The functions described in this section compute the proximity (similarity) measure between an image and a template (another image). These functions may be used as feature detection functions, as well as the components of more sophisticated techniques. There are several ways to compute the measure of similarity between two images. One way is to compute the Euclidean distance, or sum of the squared distances (SSD), of an image and a template. The smaller is the value of SSD at a particular pixel, the more similarity exists between the template and the image in the neighborhood of that pixel."

The ProximityOp class summarizes these image similarity measurement techniques and provides their functionality by implementing the ICLFilter packages BinaryOp interface.
There are two different variables, that influencing the internal functionality of the ProximityOps apply function.

ApplyMode

The first variable - the so called "applymode" - determines in which region of the source image a specific proximity measure is applied. The following ASCII image describes the differences between the values "full", "valid" and "same"

        Image: iiiiiiiiiiiiii   Mask: mmmmm       resulting images:
               iiiiiiiiiiiiii         mmxmm
               iiiiiiiiiiiiii         mmmmm       +---+    
               iiiiiiiiiiiiii        (5x3)        |   | := original image area
               iiiiiiiiiiiiii                     +---+
                (14 x 5)
        full: mmmmm                               full result:   
              mmx<--- fist pos.                      rrrrrrrrrrrrrrrr  
              mmmmmiiiiiiiiiiiii                     r+------------+r
                  iiiiiiiiiiiiii                     r|rrrrrrrrrrrr|r  
                  iiiiiiiiiiiiii                     r|rrrrrrrrrrrr|r
                  iiiiiiiiiiiiii                     r|rrrrrrrrrrrr|r
                  iiiiiiiiiiiiimmmmm                 r+------------+r
                               mmx<-- last pos.      rrrrrrrrrrrrrrrr
                               mmmmm
        same:                                      same result:
                mmmmm              
         first: mmxmmiiiiiiiiiii                     +------------+ 
                mmmmmiiiiiiiiiii                     |rrrrrrrrrrrr|
                  iiiiiiiiiiiiii                     |rrrrrrrrrrrr|
                  iiiiiiiiiiimmmmm                   |rrrrrrrrrrrr|
                  iiiiiiiiiiimmxmm <-- last          +------------+
                             mmmmm
        valid:                                     valid result:
                  mmmmmiiiiiiiii                     +------------+ 
           first: mmxmmiiiiiiiii                     | rrrrrrrrrr |
                  mmmmmiiiimmmmm                     | rrrrrrrrrr |
                  iiiiiiiiimmxmm  <-- last           | rrrrrrrrrr |
                  iiiiiiiiimmmmm                     +------------+
        

Operations

This time three different metrics for the similarity measurements are implemented (IPP Only)

The formulas can be found in the ippi-manual!

optypes:


Member Enumeration Documentation

enum to specify the current apply mode of a ProximityOp

See also:
ProximityOp
Enumerator:
full 

destination image has size (w1+w2-1)x(h1+h2-1)

same 

destination image has size (w1)x(h1)

valid 

destination image has size (w1-w2+1)x(h1-h2+1)

enum to specify the current operation type of a ProximityOp

See also:
ProximityOp
Enumerator:
sqrDistance 

square distance metric

crossCorr 

cross correlation metric

crossCorrCoeff 

cross correlation coefficient metric


Constructor & Destructor Documentation

Creates a new ProximityOp object with given apply mode and optype.

Parameters:
otoptype for the ProximityOp
amapply mode for the ProximityOp (default = "valid")
virtual icl::filter::ProximityOp::~ProximityOp ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual ICLFilter_API void icl::filter::ProximityOp::apply ( const core::ImgBase poSrc1,
const core::ImgBase poSrc2,
core::ImgBase **  ppoDst 
) [virtual]

applies the current op given source image, template and destination image

allowed input image types are icl8u and icl32f other types are converted internally to float images. The destination image is adapted automatically; it depth becomes depth32f.

Parameters:
poSrc1source image
poSrc2template
ppoDstdestination image (apated automatically)

Implements icl::filter::BinaryOp.

returns the current applymode

Returns:
current applymode

returns the current optype

Returns:
current optype

sets the current applymode

Parameters:
amnew applymode value

sets the current optype

Parameters:
otnew optype

Member Data Documentation

internal used buffer for handling unsupported formats

internal used buffer for handling unsupported formats


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines