Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Namespaces | Classes | Typedefs | Enumerations | Functions
icl::cv Namespace Reference

Namespaces

namespace  clsurf
namespace  opensurf
namespace  region_detector_tools

Classes

class  CornerDetectorCSS
 Curvature Corner Detector. More...
class  Extrapolator
 class for linear and quadatic extrapolation More...
class  FloodFiller
 Utility class for image flood filling. More...
struct  HoughLine
 Line Equation structure. More...
class  HoughLineDetector
class  HungarianAlgorithm
 Implementation of the Hungarian Algorithm to solve Linear Assignment problems. More...
struct  ImageRegion
 ImageRegion Structure providing region feature information. More...
struct  ImageRegionData
 Utility class for shallow copied data of image region class. More...
struct  ImageRegionPart
 The ImageRegionPart represents a intermediate region part for the connected component analysis. More...
struct  LineSegment
 line segment class (e.g. used for run-length coding) More...
class  MeanShiftTracker
class  PositionTracker
 Class for tracking 2D positions. More...
class  RegionDetector
 Complex utility class for detection of connected image components. More...
class  RegionPCAInfo
 data-struct to represent local PCA information More...
class  RunLengthEncoder
 Simple class for creation of a run-length encoding of an image. More...
class  SimpleBlobSearcher
 Utility class for region-based colored blob detection. More...
struct  SurfFeature
 Generic SURF Feature type. More...
class  SurfFeatureDetector
 ICL's *New* Generic Surf Feature detection class. More...
class  TemplateTracker
 Utility class vor viewbased template tracking. More...
class  VectorTracker
 Extension of the position tracker class for N-dimensional positions. More...
class  ViewBasedTemplateMatcher
 TemplateMatching class (wrapping UsefulFunctions::matchTemplate) More...
struct  WorkingLineSegment
 The working line segment class extends the LineSegment class by some working parameters. More...

Typedefs

typedef std::pair< SurfFeature,
SurfFeature
SurfMatch
 typedef for two matching features

Enumerations

enum  IDAllocationMode { allocateFirstFreeIDs, allocateBrandNewIDs }
 How should new ID's be allocated. More...

Functions

std::vector< utils::RectmatchTemplate (const core::Img8u &src, const core::Img8u &templ, float significance, core::Img8u *buffer=0, bool clipBuffersToROI=true, RegionDetector *rd=0, bool useCrossCorrCoeffInsteadOfSqrDistance=false)
 template matching using proximity measurement
std::vector< utils::RectmatchTemplate (const core::Img8u &src, const core::Img8u *srcMask, const core::Img8u &templ, const core::Img8u *templMask, float significance, core::Img8u *srcBuffer=0, core::Img8u *templBuffer=0, core::Img8u *buffer=0, bool clipBuffersToROI=true, RegionDetector *rd=0, bool useCrossCorrCoeffInsteadOfSqrDistance=false)
 more general matchTemplate implementation
std::ostream & operator<< (std::ostream &s, const LineSegment &l)
 ostream operator for the line-segment type
std::ostream & operator<< (std::ostream &str, const WorkingLineSegment &ls)
 Overloaded ostream-operator for WorkingLineSegment-instances.

Typedef Documentation

typedef for two matching features


Enumeration Type Documentation

How should new ID's be allocated.

Enumerator:
allocateFirstFreeIDs 
allocateBrandNewIDs 

Function Documentation

std::vector<utils::Rect> icl::cv::matchTemplate ( const core::Img8u &  src,
const core::Img8u &  templ,
float  significance,
core::Img8u *  buffer = 0,
bool  clipBuffersToROI = true,
RegionDetector rd = 0,
bool  useCrossCorrCoeffInsteadOfSqrDistance = false 
)

template matching using proximity measurement

Overview

This function matches the given template and returns all rects where the template is found with at least the given significance. The significance value must be specified in range [0,1] whereby significance levels lower then 0.5 involve as a rule too many results.

Algorithms

Template matching is performed by the following steps

  1. create a proximity-map of all channels of the src image with the according channels in the template image (result is buffered in the optionally given image buffer) Range of this map is [0,255]
  2. create a single channel binary image from the proximity-map using the following rule

    \[ BinaryMap(x,y) = \bigvee\limits_{channels\;\; c} ProximityMap(x,y,c) > significance*255 \]

  3. detect connected region in the binary map
  4. for each detected region with value 1, put a utils::Rect centered at the region center with size of the template (and cropped to the image rect) into the result list
  5. return the result list

Benchmarks

I applied some exemplary Benchmarks on a 2GHz Core2Duo with the following results:

  • source image size 640x480, template size 100x100, 3-channel RGB image
    about: 37ms
  • source image size 640x480, template size 100x100, 1-channel gray image
    about: 13ms
  • source image size 640x480, template size 10x10, 3-channel RGB image
    about: 25ms (not much faster)
  • source image size 640x480, template size 200x200, 3-channel RGB image
    about: 35ms (faster than 100x100 because of more omitted border pixels)

The internally used Ipp-Function uses several Threads to apply the proximity measurement call, which means that the function might become much slower on a single core machine.

Parameters:
srcsource image where the template should be found in
templtemplate to search int the src image
significancesignificance level in range [0,1] (common values are 0.8 to 0.95)
buffertemporary image buffer (this buffer can be given to the function optionally) if given this buffer is exploited internally. The buffers size and channel count
clipBuffersToROIare adapted automatically
rdOptionally exploited ImgRegionDetector object pointer. If given, this region detector is used, which can speed up Performance in successive calls to matchTemplate
useCrossCorrCoeffInsteadOfSqrDistance
std::vector<utils::Rect> icl::cv::matchTemplate ( const core::Img8u &  src,
const core::Img8u *  srcMask,
const core::Img8u &  templ,
const core::Img8u *  templMask,
float  significance,
core::Img8u *  srcBuffer = 0,
core::Img8u *  templBuffer = 0,
core::Img8u *  buffer = 0,
bool  clipBuffersToROI = true,
RegionDetector rd = 0,
bool  useCrossCorrCoeffInsteadOfSqrDistance = false 
)

more general matchTemplate implementation

std::ostream& icl::cv::operator<< ( std::ostream &  s,
const LineSegment &  l 
) [inline]

ostream operator for the line-segment type

std::ostream& icl::cv::operator<< ( std::ostream &  str,
const WorkingLineSegment &  ls 
) [inline]

Overloaded ostream-operator for WorkingLineSegment-instances.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines