|  | Image Component Library (ICL)
    | 
Class for computing proximity measures. More...
#include <ProximityOp.h>
 
  
| 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 Types inherited from icl::utils::Configurable | |
| typedef Function< void, const Property & > | Callback | 
| Function type for changed properties.  More... | |
| Public Member Functions | |
| ICLFilter_API | ProximityOp (optype ot, applymode am=valid) | 
| Creates a new ProximityOp object with given apply mode and optype.  More... | |
| virtual | ~ProximityOp () | 
| Destructor.  More... | |
| 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  More... | |
| ICLFilter_API void | setOpType (optype ot) | 
| sets the current optype  More... | |
| ICLFilter_API void | setApplyMode (applymode am) | 
| sets the current applymode  More... | |
| ICLFilter_API optype | getOpType () const | 
| returns the current optype  More... | |
| ICLFilter_API applymode | getApplyMode () const | 
| returns the current applymode  More... | |
| virtual void | apply (const core::ImgBase *operand1, const core::ImgBase *operand2, core::ImgBase **result)=0 | 
| import apply symbol from parent class  More... | |
| virtual const core::ImgBase * | apply (const core::ImgBase *operand1, const core::ImgBase *operand2) | 
| import apply symbol from parent class  More... | |
|  Public Member Functions inherited from icl::filter::BinaryOp | |
| BinaryOp () | |
| default constructor  More... | |
| BinaryOp (const BinaryOp &other) | |
| copy constructor  More... | |
| BinaryOp & | operator= (const BinaryOp &other) | 
| assignment operator  More... | |
| virtual | ~BinaryOp () | 
| virtual destructor  More... | |
| virtual const core::ImgBase * | apply (const core::ImgBase *operand1, const core::ImgBase *operand2) | 
| applyfunction without explicit destination image  More... | |
| void | operator() (const core::ImgBase *src1, const core::ImgBase *src2, core::ImgBase **dst) | 
| function operator (alternative for apply(src1,src2,dst)  More... | |
| const core::ImgBase * | operator() (const core::ImgBase *src1, const core::ImgBase *src2) | 
| function operator for the implicit destination apply(a,b) call  More... | |
| const core::ImgBase & | operator() (const core::ImgBase &sr1, const core::ImgBase &src2) | 
| reference based function operator  More... | |
| void | setClipToROI (bool bClipToROI) | 
| sets if the image should be clip to ROI or not  More... | |
| void | setCheckOnly (bool bCheckOnly) | 
| sets if the destination image should be adapted to the source, or if it is only checked if it can be adapted.  More... | |
| bool | getClipToROI () const | 
| returns the ClipToROI status  More... | |
| bool | getCheckOnly () const | 
| returns the CheckOnly status  More... | |
|  Public Member Functions inherited from icl::utils::Configurable | |
| virtual | ~Configurable () | 
| virtual destructor  More... | |
| Configurable (const Configurable &other) | |
| Copy constructor.  More... | |
| Configurable & | operator= (const Configurable &other) | 
| Assignment operator.  More... | |
| void | setConfigurableID (const std::string &ID) | 
| sets the ID of this configurable  More... | |
| const std::string & | getConfigurableID () const | 
| returns the configurables static ID  More... | |
| bool | isOrderedFlagSet () const | 
| returns whether the ordered flag is set  More... | |
| void | deactivateProperty (const std::string &pattern) | 
| adds an additional deativation pattern  More... | |
| void | deleteDeactivationPattern (const std::string &pattern) | 
| removed a formerly added deactivation pattern  More... | |
| std::vector< std::string > | getPropertyListWithoutDeactivated () const | 
| this returns a filtered list of properties (using all filters added by deactivateProperty)  More... | |
| virtual void | adaptProperty (const std::string &name, const std::string &newType, const std::string &newInfo, const std::string &newToolTip) | 
| this function can be used to adapt a specific property afterwards  More... | |
| void | registerCallback (const Callback &cb) | 
| add a callback for changed properties  More... | |
| void | removedCallback (const Callback &cb) | 
| removes a callback that was registered before  More... | |
| void | syncChangesTo (Configurable *others, int num=1) | 
| this can be used to let this instance also apply property changes to others  More... | |
| virtual void | setPropertyValue (const std::string &propertyName, const Any &value) | 
| sets a property value  More... | |
| virtual std::vector< std::string > | getPropertyList () const | 
| returns a list of All properties, that can be set using setProperty  More... | |
| virtual bool | supportsProperty (const std::string &propertyName) const | 
| base implementation for property check (seaches in the property list)  More... | |
| virtual void | saveProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) const | 
| writes all available properties into a file  More... | |
| virtual void | loadProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) | 
| reads a camera config file from disc  More... | |
| virtual std::string | getPropertyType (const std::string &propertyName) const | 
| get type of property  More... | |
| virtual std::string | getPropertyInfo (const std::string &propertyName) const | 
| get information of a properties valid values  More... | |
| virtual Any | getPropertyValue (const std::string &propertyName) const | 
| returns the current value of a property or a parameter  More... | |
| virtual std::string | getPropertyToolTip (const std::string &propertyName) const | 
| returns the tooltip description for a given property  More... | |
| virtual int | getPropertyVolatileness (const std::string &propertyName) const | 
| Returns whether this property may be changed internally.  More... | |
| Private Attributes | |
| core::Img32f * | m_poImageBuffer | 
| internal used buffer for handling unsupported formats  More... | |
| core::Img32f * | m_poTemplateBuffer | 
| internal used buffer for handling unsupported formats  More... | |
| Additional Inherited Members | |
|  Static Public Member Functions inherited from icl::utils::Configurable | |
| static std::string | create_default_ID (const std::string &prefix) | 
| this function can be used in subclasses to create a default ID  More... | |
| static Configurable * | get (const std::string &id) | 
| returns configurable by given ID  More... | |
| static void | register_configurable_type (const std::string &classname, Function< Configurable * > creator) | 
| registers a configurable type  More... | |
| static std::vector< std::string > | get_registered_configurables () | 
| returns a list of all registered configurable classnames  More... | |
| static Configurable * | create_configurable (const std::string &classname) | 
| creates a configurable by given name  More... | |
|  Static Public Attributes inherited from icl::utils::Configurable | |
| static const std::vector< std::string > | EMPTY_VEC | 
| used as shortcut – just an empty vector of std::strings  More... | |
|  Protected Member Functions inherited from icl::filter::BinaryOp | |
| bool | prepare (core::ImgBase **ppoDst, core::depth eDepth, const utils::Size &imgSize, core::format eFormat, int nChannels, const utils::Rect &roi, utils::Time timestamp=utils::Time::null) | 
| virtual bool | prepare (core::ImgBase **ppoDst, const core::ImgBase *poSrc) | 
| check+adapt destination image to properties of given source image  More... | |
| virtual bool | prepare (core::ImgBase **ppoDst, const core::ImgBase *poSrc, core::depth eDepth) | 
|  Protected Member Functions inherited from icl::utils::Uncopyable | |
| Uncopyable () | |
| Empty base constructor.  More... | |
|  Protected Member Functions inherited from icl::utils::Configurable | |
| void | addProperty (const std::string &name, const std::string &type, const std::string &info, const Any &value=Any(), const int volatileness=0, const std::string &tooltip=std::string()) | 
| This can be used by derived classes to store supported properties in the internal list.  More... | |
| void | addChildConfigurable (Configurable *configurable, const std::string &childPrefix="") | 
| This adds another configurable as child.  More... | |
| void | removeChildConfigurable (Configurable *configurable) | 
| removes the given child configurable  More... | |
| Property & | prop (const std::string &propertyName) | 
| this CAN be used e.g. to store a property value in internal property-list  More... | |
| const Property & | prop (const std::string &propertyName) const | 
| this CAN be used e.g. to store a property value in internal property-list  More... | |
| Configurable (const std::string &ID="", bool ordered=true) | |
| create this configurable with given ID  More... | |
| void | call_callbacks (const std::string &propertyName, const Configurable *caller) const | 
| calls all registered callbacks  More... | |
|  Static Protected Member Functions inherited from icl::filter::BinaryOp | |
| static bool | check (const core::ImgBase *operand1, const core::ImgBase *operand2, bool checkDepths=true) | 
|  Protected Attributes inherited from icl::utils::Configurable | |
| std::vector< Callback > | callbacks | 
| internally managed list of callbacks  More... | |
Class for computing proximity measures.
(Only available for Img8u and Img32f, IPP only!)
"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.
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          +------------+
                     mmmmmvalid:                                     valid result:
          mmmmmiiiiiiiii                     +------------+
   first: mmxmmiiiiiiiii                     | rrrrrrrrrr |
          mmmmmiiiimmmmm                     | rrrrrrrrrr |
          iiiiiiiiimmxmm  <-- last           | rrrrrrrrrr |
          iiiiiiiiimmmmm                     +------------+This time three different metrics for the similarity measurements are implemented (IPP Only)
The formulas can be found in the ippi-manual!
optypes:
enum to specify the current apply mode of a 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
| Enumerator | |
|---|---|
| sqrDistance | square distance metric | 
| crossCorr | cross correlation metric | 
| crossCorrCoeff | cross correlation coefficient metric | 
| ICLFilter_API icl::filter::ProximityOp::ProximityOp | ( | optype | ot, | 
| applymode | am = valid | ||
| ) | 
Creates a new ProximityOp object with given apply mode and optype.
| ot | optype for the ProximityOp | 
| am | apply mode for the ProximityOp (default = "valid") | 
| 
 | inlinevirtual | 
Destructor.
| 
 | 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.
| poSrc1 | source image | 
| poSrc2 | template | 
| ppoDst | destination image (apated automatically) | 
Implements icl::filter::BinaryOp.
| virtual const core::ImgBase* icl::filter::BinaryOp::apply | 
import apply symbol from parent class
| virtual void icl::filter::BinaryOp::apply | 
import apply symbol from parent class
| ICLFilter_API applymode icl::filter::ProximityOp::getApplyMode | ( | ) | const | 
returns the current applymode
| ICLFilter_API optype icl::filter::ProximityOp::getOpType | ( | ) | const | 
returns the current optype
| ICLFilter_API void icl::filter::ProximityOp::setApplyMode | ( | applymode | am | ) | 
sets the current applymode
| am | new applymode value | 
| ICLFilter_API void icl::filter::ProximityOp::setOpType | ( | optype | ot | ) | 
sets the current optype
| ot | new optype | 
| 
 | private | 
internal used buffer for handling unsupported formats
| 
 | private | 
internal used buffer for handling unsupported formats
 1.8.15
 1.8.15