Basic Image AlgorithmS Library
2.8.0
|
Basic functions for CornerMatcher. More...
#include <Matcher2D/RegionMatcher.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
template<class StorageType > | |
void | CNCC (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
ColorNCC for interleaved hsL images. More... | |
template<class StorageType > | |
void | ColorCCV (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
computes the Cross-CoVariance ,which is equal to NCC but does no variance(contrast) normailzation More... | |
template<class StorageType > | |
void | ColorNCC (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
ColorNCC for interleaved HSV images. More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
template<class StorageType > | |
void | HammingDistance (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, const unsigned int censussize, double &result) const |
fast hamming distance between p1 and p2 without boundary checking. More... | |
template<> | |
BIASMatcher2D_EXPORT void | HammingDistance (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned int halfwinsize, const unsigned int censussize, double &result) const |
template<class StorageType > | |
int | LineMatcherNCC (const unsigned int p1[2], const unsigned int start2[2], const unsigned int end2[2], const StorageType **ida1, const StorageType **ida2, const StorageType **grad1, const StorageType **grad2, const unsigned int halfwinsize, const unsigned int epsilon, const double gradientscale, unsigned int result[2], double &correlation) const |
template<class StorageType > | |
int | LineMatcherNCC (const unsigned int p1[2], const unsigned int start2[2], const unsigned int end2[2], const StorageType **ida1, const StorageType **ida2, const StorageType **grad1, const StorageType **grad2, const unsigned int halfwinsize, const unsigned int epsilon, const double gradientscale, unsigned int result[2], double &correlation) const |
find correspondence to p1 from ida1 in ida2 at aproximate starting position p2 using KLT algorithm: More... | |
template<class StorageType > | |
int | LineMatcherSAD (const unsigned int p1[2], const unsigned int start2[2], const unsigned int end2[2], const StorageType **ida1, const StorageType **ida2, const StorageType **grad1, const StorageType **grad2, const unsigned int halfwinsize, const unsigned int epsilon, const double gradientscale, unsigned int result[2], double &sad) const |
template<class StorageType > | |
int | LineMatcherSAD (const unsigned int p1[2], const unsigned int start2[2], const unsigned int end2[2], const StorageType **ida1, const StorageType **ida2, const StorageType **grad1, const StorageType **grad2, const unsigned int halfwinsize, const unsigned int epsilon, const double gradientscale, unsigned int result[2], double &sad) const |
as above but uses SAD More... | |
template<class StorageType > | |
int | LineMatcherSSD (const unsigned int p1[2], const unsigned int start2[2], const unsigned int end2[2], const StorageType **ida1, const StorageType **ida2, const StorageType **grad1, const StorageType **grad2, const unsigned int halfwinsize, const unsigned int epsilon, const double gradientscale, unsigned int result[2], double &ssd) const |
template<class StorageType > | |
int | LineMatcherSSD (const unsigned int p1[2], const unsigned int start2[2], const unsigned int end2[2], const StorageType **ida1, const StorageType **ida2, const StorageType **grad1, const StorageType **grad2, const unsigned int halfwinsize, const unsigned int epsilon, const double gradientscale, unsigned int result[2], double &ssd) const |
as above but uses SSD More... | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
template<> | |
BIASMatcher2D_EXPORT void | NCC (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned int halfwinsize, double &result) const |
template<class StorageType > | |
void | NCC (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
fast ncc between p1 and p2 without boundary checking Faster specialisation for unsigned char exists because of integer arithmetic Specialisation for unsigned char does work without overflow with halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4 More... | |
template<class StorageType > | |
void | NCC (const double p1[2], const double p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned halfwinsize, double &result) |
fast interpolated ncc More... | |
template<class StorageType > | |
void | NCC (const unsigned p1[2], const unsigned p2[2], const StorageType **ida1, const StorageType **roi1, const StorageType **ida2, const StorageType **roi2, const unsigned hww, const unsigned hwh, double &result) const |
fast ncc between p1 in ida1 and p2 in ida2 the correlation is calculated in a window of width=2*hww+1 and height = 2*hwh+1 only those pixels within the window are used, where the according roi is not zero More... | |
template<class StorageType > | |
int | NCCSearchEven (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfnccwinsize, const unsigned int halfsearchwinsize, unsigned int resultpoint[2], const double mincorrelation, double &result) const |
As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5 Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize) More... | |
template<class StorageType > | |
int | NCCSearchOdd (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfnccwinsize, const unsigned int halfsearchwinsize, unsigned int resultpoint[2], const double mincorrelation, double &result) const |
Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a point with correlation > mincorrelation. More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
template<class StorageType > | |
int | ParabolaNCC (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, KLT_TYPE result[2]) const |
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 exact parabola approximation with 3 values is used no boundary checks, p1 and p2 must be further than halfwinsize+1 from array border correlation between p1 and p2 must be a local discrete maximum i.e. More... | |
template<class StorageType > | |
int | ParabolaNCC5 (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, KLT_TYPE result[2]) const |
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 over-determined parabola approximation with 5 values is used no boundary checks, p1 and p2 must be further than halfwinsize+2 from array border correlation between p1 and p2 must be a local discrete maximum i.e. More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
RegionMatcher () | |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
template<> | |
BIASMatcher2D_EXPORT void | SAD (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned int halfwinsize, double &result) const |
template<class StorageType > | |
void | SAD (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned halfwinsize, const unsigned channel_count, double &result) const |
template<> | |
BIASMatcher2D_EXPORT void | SAD (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned halfwinsize, const unsigned channel_count, double &result) const |
template<class StorageType > | |
void | SAD (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
fast sum of absolut differences (SAD) sim. More... | |
template<class StorageType > | |
void | SAD (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, const unsigned channel_count, double &result) const |
fast sum of absolut differences (SAD) sim. More... | |
template<> | |
BIASMatcher2D_EXPORT void | SADN (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned int halfwinsize, double &result) const |
template<class StorageType > | |
void | SADN (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
'normalized' version of SAD, returns 1.0 incase of no differences 0.0 in case of max difference specialized version for unsigned char exist only for halfwindowsizes < 2050 More... | |
template<class StorageType > | |
void | SADSamplingInsensitive (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
template<> | |
BIASMatcher2D_EXPORT void | SADSamplingInsensitive (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned int halfwinsize, double &result) const |
template<class StorageType > | |
void | SamplingInsensitiveDissimilarity (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, double &result) const |
calculates sampling insensitive dissimilarity measure (birchfield, tomasi) More... | |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
template<> | |
BIASMatcher2D_EXPORT void | SSD (const unsigned int p1[2], const unsigned int p2[2], const unsigned char **ida1, const unsigned char **ida2, const unsigned int halfwinsize, double &result) const |
template<class StorageType > | |
void | SSD (const unsigned int p1[2], const unsigned int p2[2], const StorageType **ida1, const StorageType **ida2, const unsigned int halfwinsize, double &result) const |
fast sum of square differences (SSD) sim. More... | |
~RegionMatcher () | |
Static Public Member Functions | |
template<class StorageType > | |
static float | AD (const unsigned int x1, const unsigned int y1, BIAS::Image< StorageType > &img1, const unsigned int x2, const unsigned int y2, BIAS::Image< StorageType > &img2) |
calculates absolute difference between pixel (x1,y1) in image img1 and (x2,y2) in img2 More... | |
template<class StorageType > | |
static bool | BilinearRegion (const Image< StorageType > &im, const double &x, const double &y, const unsigned hws, Matrix< double > &res) |
Fast bilinear interpolation of a region in grey image. More... | |
template<class StorageType > | |
static bool | BilinearRegionColor (const Image< StorageType > &im, const double &x, const double &y, const unsigned hws, Matrix< double > &res) |
Fast bilinear interpolation of a region in interleaved color image. More... | |
template<class StorageType > | |
static bool | BilinearRegionColor3 (const Image< StorageType > &im, const double &x, const double &y, const unsigned hws, Matrix< double > &res) |
Fast bilinear interpolation of a region in interleaved color image. More... | |
static long int | GetGlobalDebugLevel () |
template<class StorageType > | |
static bool | LinearRegionX (const Image< StorageType > &im, const double &x, const unsigned &y, const unsigned hws, Matrix< double > &res) |
Fast linear interpolation of a region in the image, untested. More... | |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
template<class StorageType > | |
KLT_TYPE | _Bilinear (const StorageType **ida, const KLT_TYPE x, const KLT_TYPE y) const |
KLT_TYPE | _Bilinear (const unsigned char **ida, const KLT_TYPE x, const KLT_TYPE y) const |
template<class StorageType > | |
void | _BilinearRegion (const StorageType **ida, const KLT_TYPE x, const KLT_TYPE y, const unsigned hws, Matrix< KLT_TYPE > &res) const |
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] before interpolating More... | |
void | _BilinearRegion (const unsigned char **ida, const KLT_TYPE x, const KLT_TYPE y, const unsigned hws, Matrix< KLT_TYPE > &res) const |
KLT_TYPE | _ParabolaApprox (const KLT_TYPE x1, const KLT_TYPE x2, const KLT_TYPE x3) const |
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] before interpolating More... | |
KLT_TYPE | _ParabolaApprox (const KLT_TYPE x1, const KLT_TYPE x2, const KLT_TYPE x3, const KLT_TYPE x4, const KLT_TYPE x5) const |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
Protected Attributes | |
Matrix< KLT_TYPE > | _bl1 |
Matrix< KLT_TYPE > | _bl1_5 |
Matrix< KLT_TYPE > | _bl2 |
Matrix< KLT_TYPE > | _bl2_5 |
Vector2< KLT_TYPE > | _d |
Vector2< KLT_TYPE > | _disp |
Vector2< KLT_TYPE > | _e |
Matrix2x2< KLT_TYPE > | _G |
Matrix2x2< KLT_TYPE > | _Ginv |
Matrix< KLT_TYPE > | _gsx |
Matrix< KLT_TYPE > | _gsx_5 |
Matrix< KLT_TYPE > | _gsy |
Matrix< KLT_TYPE > | _gsy_5 |
Matrix< KLT_TYPE > | _gx |
Matrix< KLT_TYPE > | _gx1 |
Matrix< KLT_TYPE > | _gx1_5 |
Matrix< KLT_TYPE > | _gx2 |
Matrix< KLT_TYPE > | _gx2_5 |
Matrix< KLT_TYPE > | _gy |
Matrix< KLT_TYPE > | _gy1 |
Matrix< KLT_TYPE > | _gy1_5 |
Matrix< KLT_TYPE > | _gy2 |
Matrix< KLT_TYPE > | _gy2_5 |
Matrix< KLT_TYPE > | _iim1 |
Matrix< KLT_TYPE > | _iim2 |
unsigned | _klthws |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
unsigned | _ncchws |
unsigned | _nccwinsize |
std::map< std::string, long int > | _String2Debuglevel |
unsigned | _winsize |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
Basic functions for CornerMatcher.
class that holds sum of square diffeences (ssd), normalized cross correlation (ncc) and KLT and parabola interpolation for a convenient interface working with HomgPoint2D doing boundary checks use CornerMatcher
Definition at line 151 of file RegionMatcher.hh.
RegionMatcher::RegionMatcher | ( | ) |
Definition at line 33 of file RegionMatcher.cpp.
References _bl1_5, _bl2_5, _gsx_5, _gsy_5, _gx1_5, _gx2_5, _gy1_5, _gy2_5, _klthws, _ncchws, _nccwinsize, _winsize, and TNT::Matrix< T >::newsize().
RegionMatcher::~RegionMatcher | ( | ) |
Definition at line 46 of file RegionMatcher.cpp.
|
protected |
Definition at line 451 of file RegionMatcher.cpp.
|
protected |
Definition at line 467 of file RegionMatcher.cpp.
|
protected |
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] before interpolating
Definition at line 497 of file RegionMatcher.cpp.
|
protected |
Definition at line 520 of file RegionMatcher.cpp.
|
inlineprotected |
bilinear interpolation, also moved gradient image data from [0:255] to [-127, 128] before interpolating
Definition at line 587 of file RegionMatcher.hh.
Referenced by ParabolaNCC(), and ParabolaNCC5().
|
inlineprotected |
Definition at line 597 of file RegionMatcher.hh.
References Lapack_LLS_QR_linear_solve().
|
static |
calculates absolute difference between pixel (x1,y1) in image img1 and (x2,y2) in img2
Definition at line 717 of file RegionMatcher.cpp.
References BIAS::Image< StorageType >::PixelValue().
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
|
static |
Fast bilinear interpolation of a region in grey image.
Definition at line 146 of file RegionMatcher.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), and TNT::Matrix< T >::newsize().
Referenced by BilinearRegionColor().
|
static |
Fast bilinear interpolation of a region in interleaved color image.
Definition at line 50 of file RegionMatcher.cpp.
References BilinearRegion(), BilinearRegionColor3(), and BIAS::ImageBase::GetChannelCount().
|
static |
Fast bilinear interpolation of a region in interleaved color image.
Definition at line 107 of file RegionMatcher.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsInterleaved(), and TNT::Matrix< T >::newsize().
Referenced by BilinearRegionColor().
void BIAS::RegionMatcher::CNCC | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
ColorNCC for interleaved hsL images.
Definition at line 439 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::ColorCCV | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
computes the Cross-CoVariance ,which is equal to NCC but does no variance(contrast) normailzation
Definition at line 310 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::ColorNCC | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
ColorNCC for interleaved HSV images.
Definition at line 364 of file SimilarityMeasure.cpp.
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
void BIAS::RegionMatcher::HammingDistance | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | censussize, | ||
double & | result | ||
) | const |
fast hamming distance between p1 and p2 without boundary checking.
parameter censussize is number of channels in which census information is stored.
Definition at line 511 of file SimilarityMeasure.cpp.
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::HammingDistance | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | censussize, | ||
double & | result | ||
) | const |
Definition at line 519 of file SimilarityMeasure.cpp.
|
static |
Fast linear interpolation of a region in the image, untested.
Definition at line 179 of file RegionMatcher.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and TNT::Matrix< T >::newsize().
int BIAS::RegionMatcher::LineMatcherNCC | ( | const unsigned int | p1[2], |
const unsigned int | start2[2], | ||
const unsigned int | end2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | grad1, | ||
const StorageType ** | grad2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | epsilon, | ||
const double | gradientscale, | ||
unsigned int | result[2], | ||
double & | correlation | ||
) | const |
Definition at line 27 of file LineMatcher.cpp.
References BIAS::Scanline::GetNext().
int BIAS::RegionMatcher::LineMatcherNCC | ( | const unsigned int | p1[2], |
const unsigned int | start2[2], | ||
const unsigned int | end2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | grad1, | ||
const StorageType ** | grad2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | epsilon, | ||
const double | gradientscale, | ||
unsigned int | result[2], | ||
double & | correlation | ||
) | const |
find correspondence to p1 from ida1 in ida2
at aproximate starting position p2 using KLT algorithm:
Solve G * d = e with
G = | sum(gx*gx) sum(gx*gy) | , and | sum(gx*gy) sum(gy*gy) |
e = | sum(gx*(I2-I1)) sum(gy*(I2-I1)) |^T
sums are over the window, gx is x-gradient and gy the y-gradient in first image, I1 and I2 are the grey values in the first resp. the second image iterate numiterations times !!! no initial boundary checks is performed in this algorithm !!! returns 0 on success returns -1 if point slids out of [0, with][0, height] modulo halfwinsize output: result - image coo of p1 in im2 error - norm(e) input : p1 - location of feature point in image1 p2 - aproximate location of same feature point in new image 2 could be set to p1 featurepoint is not moving a lot ida1 - pointer to the image data (row major) of first image ida2 - pointer to the image data (row major) of new image gradx - pointer to the x-gradient data of image1 grady - pointer to the y-gradient data of image1 halfwinsize - the window to use numiterations - number of iterations to do width - width of StorageType Arrays height - height of StorageType Array ida1[height-1][with-1] is the maximal allowed acces to the arrays
output: result - image coo of point with greatest corelation correlation - the correlation betwen p1 and result returns: 0 on success -1 no matching point found <-1 error
int BIAS::RegionMatcher::LineMatcherSAD | ( | const unsigned int | p1[2], |
const unsigned int | start2[2], | ||
const unsigned int | end2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | grad1, | ||
const StorageType ** | grad2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | epsilon, | ||
const double | gradientscale, | ||
unsigned int | result[2], | ||
double & | sad | ||
) | const |
Definition at line 73 of file LineMatcher.cpp.
References BIAS::Scanline::GetNext().
int BIAS::RegionMatcher::LineMatcherSAD | ( | const unsigned int | p1[2], |
const unsigned int | start2[2], | ||
const unsigned int | end2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | grad1, | ||
const StorageType ** | grad2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | epsilon, | ||
const double | gradientscale, | ||
unsigned int | result[2], | ||
double & | sad | ||
) | const |
as above but uses SAD
int BIAS::RegionMatcher::LineMatcherSSD | ( | const unsigned int | p1[2], |
const unsigned int | start2[2], | ||
const unsigned int | end2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | grad1, | ||
const StorageType ** | grad2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | epsilon, | ||
const double | gradientscale, | ||
unsigned int | result[2], | ||
double & | ssd | ||
) | const |
Definition at line 117 of file LineMatcher.cpp.
References BIAS::Scanline::GetNext().
int BIAS::RegionMatcher::LineMatcherSSD | ( | const unsigned int | p1[2], |
const unsigned int | start2[2], | ||
const unsigned int | end2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | grad1, | ||
const StorageType ** | grad2, | ||
const unsigned int | halfwinsize, | ||
const unsigned int | epsilon, | ||
const double | gradientscale, | ||
unsigned int | result[2], | ||
double & | ssd | ||
) | const |
as above but uses SSD
|
inlineinherited |
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::NCC | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
Definition at line 215 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::NCC | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
fast ncc between p1 and p2 without boundary checking Faster specialisation for unsigned char exists because of integer arithmetic Specialisation for unsigned char does work without overflow with halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4
Definition at line 187 of file SimilarityMeasure.cpp.
Referenced by BIAS::CornerMatcher::NCC(), NCCSearchEven(), NCCSearchOdd(), ParabolaNCC(), and ParabolaNCC5().
void BIAS::RegionMatcher::NCC | ( | const double | p1[2], |
const double | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned | halfwinsize, | ||
double & | result | ||
) |
fast interpolated ncc
Definition at line 249 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::NCC | ( | const unsigned | p1[2], |
const unsigned | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | roi1, | ||
const StorageType ** | ida2, | ||
const StorageType ** | roi2, | ||
const unsigned | hww, | ||
const unsigned | hwh, | ||
double & | result | ||
) | const |
fast ncc between p1 in ida1 and p2 in ida2 the correlation is calculated in a window of width=2*hww+1 and height = 2*hwh+1 only those pixels within the window are used, where the according roi is not zero
Definition at line 280 of file SimilarityMeasure.cpp.
int RegionMatcher::NCCSearchEven | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfnccwinsize, | ||
const unsigned int | halfsearchwinsize, | ||
unsigned int | resultpoint[2], | ||
const double | mincorrelation, | ||
double & | result | ||
) | const |
As above but middle point of searchwindow is p1[0]+0.5, p1[1]+0.5 Searchwindow is always even-sized floor(p2[i]+0.5+-halfsearchwinsize)
Definition at line 342 of file RegionMatcher.cpp.
References NCC().
Referenced by BIAS::CornerMatcher::NCCSearch(), and BIAS::CornerMatcher::RefinePyramideNCC().
int RegionMatcher::NCCSearchOdd | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfnccwinsize, | ||
const unsigned int | halfsearchwinsize, | ||
unsigned int | resultpoint[2], | ||
const double | mincorrelation, | ||
double & | result | ||
) | const |
Searches in a window around p2 [p2[i]+-halfsearchwinsize] for a point with correlation > mincorrelation.
If point with correlation > mincorrelation is found, the search is aborted and resultpoint is set. If no point with correlation > mincorrelation is found, a negative value is returned. resultpoint is set to the point with biggest correlation within search window, result is set tot this correlation. Searching follows an outbound spiral around p2, either until searchwinsize is completly searched or until a point with correlation greater than mincorrelation is found If whole search area should be used, use mincorrelation>=1.0 Searchwindow is always odd-sized (p2+/-halfsearchwinsize) returns 0 on success, negative value if no point found with correlation > mincorrelation !!! warning, no boundary checking is performed, i.e. p1[i]/p2[i] +-(halfnccwinsize+halfsearchwinsize) must lie within StorageType-array input: p1, p2, ida1, ida2, halfnccwinsize, halfsearchwinsize, mincorrelation output: resultpoint, result
Definition at line 237 of file RegionMatcher.cpp.
References NCC().
Referenced by BIAS::CornerMatcher::NCCSearch().
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
int RegionMatcher::ParabolaNCC | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
KLT_TYPE | result[2] | ||
) | const |
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 exact parabola approximation with 3 values is used no boundary checks, p1 and p2 must be further than halfwinsize+1 from array border correlation between p1 and p2 must be a local discrete maximum i.e.
NCC(p1, {p2[0]+/-1, p2[1]+/-1})<NCC(p1, p2)
Definition at line 610 of file RegionMatcher.cpp.
References _ParabolaApprox(), and NCC().
Referenced by BIAS::CornerMatcher::ParabolaNCC().
int RegionMatcher::ParabolaNCC5 | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
KLT_TYPE | result[2] | ||
) | const |
function to achieve sub-pixel accuracy if p1 and p2 are corresponding image points from ida1 resp ida2 over-determined parabola approximation with 5 values is used no boundary checks, p1 and p2 must be further than halfwinsize+2 from array border correlation between p1 and p2 must be a local discrete maximum i.e.
NCC(p1, {p2[0]+/-2, p2[1]+/-2})<NCC(p1, p2)
Definition at line 659 of file RegionMatcher.cpp.
References _ParabolaApprox(), and NCC().
Referenced by BIAS::CornerMatcher::ParabolaNCC5().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::SAD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
Definition at line 45 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SAD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned | halfwinsize, | ||
const unsigned | channel_count, | ||
double & | result | ||
) | const |
Definition at line 63 of file SimilarityMeasure.cpp.
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::SAD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned | halfwinsize, | ||
const unsigned | channel_count, | ||
double & | result | ||
) | const |
Definition at line 83 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SAD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
fast sum of absolut differences (SAD) sim.
measurement between p1 and p2 without boundary checking specialized version for unsigned char exist only for halfwindowsizes < 2050
Definition at line 29 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SAD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
const unsigned | channel_count, | ||
double & | result | ||
) | const |
fast sum of absolut differences (SAD) sim.
measurement between p1 and p2 without boundary checking Only for interleavd color images
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::SADN | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
Definition at line 126 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SADN | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
'normalized' version of SAD, returns 1.0 incase of no differences 0.0 in case of max difference specialized version for unsigned char exist only for halfwindowsizes < 2050
Definition at line 103 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SADSamplingInsensitive | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::SADSamplingInsensitive | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
Definition at line 537 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SamplingInsensitiveDissimilarity | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
double & | result | ||
) | const |
calculates sampling insensitive dissimilarity measure (birchfield, tomasi)
Definition at line 559 of file SimilarityMeasure.cpp.
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
BIASMatcher2D_EXPORT void BIAS::RegionMatcher::SSD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const unsigned char ** | ida1, | ||
const unsigned char ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
Definition at line 169 of file SimilarityMeasure.cpp.
void BIAS::RegionMatcher::SSD | ( | const unsigned int | p1[2], |
const unsigned int | p2[2], | ||
const StorageType ** | ida1, | ||
const StorageType ** | ida2, | ||
const unsigned int | halfwinsize, | ||
double & | result | ||
) | const |
fast sum of square differences (SSD) sim.
measurment between p1 and p2 without boundary checking specialized version for unsigned char exist for halfwindowsizes <= 127 if sizeof(unsigned char)=1 and sizeof(unsigned long int)=4
Definition at line 148 of file SimilarityMeasure.cpp.
Referenced by BIAS::CornerMatcher::SSD().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 614 of file RegionMatcher.hh.
|
protected |
Definition at line 614 of file RegionMatcher.hh.
|
protected |
Definition at line 614 of file RegionMatcher.hh.
|
protected |
Definition at line 613 of file RegionMatcher.hh.
|
protected |
Definition at line 613 of file RegionMatcher.hh.
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 615 of file RegionMatcher.hh.
|
protected |
Definition at line 616 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 620 of file RegionMatcher.hh.
|
protected |
Definition at line 620 of file RegionMatcher.hh.
|
protected |
Definition at line 618 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
Definition at line 621 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protected |
Definition at line 621 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
Definition at line 618 of file RegionMatcher.hh.
Referenced by RegionMatcher().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |