![]() Simd Library Documentation.Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ShiftDetector< A > Struct Template Reference ShiftDetector structure provides shift detection of given region at the image. More...
Detailed Descriptiontemplate<template< class > class A>
|
typedef Simd::View<A> View |
An image type definition.
typedef Simd::Point<ptrdiff_t> Point |
A point with integer coordinates.
typedef Simd::Point<double> FPoint |
A point with float point coordinates.
void InitBuffers | ( | const Point & | frameSize, |
size_t | levelCount, | ||
TextureType | textureType = TextureGray , |
||
DifferenceType | differenceType = AbsDifference |
||
) |
Initializes internal buffers of ShiftDetector structure. It allows it to work with image of given size.
[in] | frameSize | - a size of background image. |
[in] | levelCount | - number of levels in the internal image pyramids used to find shift. |
[in] | textureType | - type of textures used to detect shift. |
[in] | differenceType | - type of correlation functions used to detect shift. |
void SetBackground | ( | const View & | background | ) |
Sets a background image. Size of background image must be equal to frameSize (see function ShiftDetector::InitBuffers).
[in] | background | - background image. |
bool Estimate | ( | const View & | current, |
const Rect & | region, | ||
const Point & | maxShift, | ||
double | hiddenAreaPenalty = 0 |
||
) |
Estimates shift of current image relative to background image.
[in] | current | - current image. |
[in] | region | - a region at the background where the algorithm start to search current image. Estimated shift is taken relative of the region. |
[in] | maxShift | - a 2D-point which characterizes maximal possible shift of the region (along X and Y axes). |
[in] | hiddenAreaPenalty | - a parameter used to restrict searching of the shift at the border of background image. |
bool Estimate | ( | const View & | current, |
const Rect & | region, | ||
int | maxShift, | ||
double | hiddenAreaPenalty = 0 |
||
) |
Estimates shift of current image relative to background image.
[in] | current | - current image. |
[in] | region | - a region at the background where the algorithm start to search current image. Estimated shift is taken relative of the region. |
[in] | maxShift | - a maximal distance which characterizes maximal possible shift of the region. |
[in] | hiddenAreaPenalty | - a parameter used to restrict searching of the shift at the border of background image. |
Point Shift | ( | ) | const |
Gets estimated integer shift of current image relative to background image.
FPoint ProximateShift | ( | ) | const |
Gets proximate (with sub-pixel accuracy) shift of current image relative to background image.
double Stability | ( | ) | const |
Gets a value which characterizes stability (reliability) of found shift.
double Correlation | ( | ) | const |
Gets the best correlation of background and current image.