Basic Image AlgorithmS Library
2.8.0
|
basic class for structure tensor calculation More...
#include <Filter/StructureTensor.hh>
Public Types | |
enum | TBorderHandling { TBH_full, TBH_same, TBH_valid } |
enum for border calculation, same meanings as in matlab: More... | |
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
int | CalcStructureTensor (const Image< InputStorageType > &src, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) |
Calculates the gradients uses internal gradient class and calls CalcStructureTensor with these gradients. More... | |
int | CalcStructureTensor (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) |
For any _HalfWinSize. More... | |
int | CalcStructureTensor3x3 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) |
Uses _HalfWinSize=1 Destination images must be initialized. More... | |
int | CalcStructureTensor5x5 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) |
Uses _HalfWinSize=2 Destination images must be initialized. More... | |
int | CalcStructureTensor7x7 (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) |
Uses _HalfWinSize=3 Destination images must be initialized. More... | |
int | CalcStructureTensorValid (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy, Image< OutputStorageType > &sgxx, Image< OutputStorageType > &sgxy, Image< OutputStorageType > &sgyy) |
For any _HalfWinSize. More... | |
virtual FilterNTo3N < InputStorageType, OutputStorageType > * | Clone () const |
void | CopyNonROIFromSource (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) const |
run over all pixel which do not belong to the roi and set them to the value in the source image regardless of the roi of the source. More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
calls the apropriate non virtual member function returns an 3 channel image where More... | |
virtual int | Filter (const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy) |
dstX.GetChannelCount()==src.GetCHannelCount() More... | |
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
virtual int | FilterFloat (const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy) |
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &dst) |
virtual int | FilterInt (const Image< InputStorageType > &src, Image< OutputStorageType > &gxx, Image< OutputStorageType > &gxy, Image< OutputStorageType > &gyy) |
int | GetBorderHandling () const |
void | GetBorders (int &border_x, int &border_y) const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
const Image< OutputStorageType > & | GetGradientX () const |
const Image< OutputStorageType > & | GetGradientY () const |
int | GetHalfWinSize () const |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetBorderHandling (const int bh) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetGradientFilter (const FilterNTo2N< InputStorageType, OutputStorageType > &grad) |
void | SetHalfWinSize (const int hws) |
void | SetNonROIToValue (Image< OutputStorageType > &dst, const std::vector< OutputStorageType > &t) const |
run over all pixel which do not belong to the roi and set them to some value (typically black) More... | |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
StructureTensor () | |
StructureTensor (const StructureTensor< InputStorageType, OutputStorageType > &other) | |
~StructureTensor () | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
void | _AllocInternalMem (const int width, const int height) |
allocates _gxx, _gyy, _gxy, _tsgxx, _tsgxy, _tsgyy and sets InternalMemWidth and _InternalMemHeight More... | |
void | _GradientProducts (const Image< OutputStorageType > &gx, const Image< OutputStorageType > &gy) |
fills up _gxx, _gxy, _gyy from gx and gy More... | |
void | _WriteDebugImage (Image< OutputStorageType > &im, std::string name) |
for debugging only More... | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
virtual void | GetBordersValid_ (int &border_x, int &border_y) const |
Protected Attributes | |
int | _FilterBorderHandling |
FilterNTo2N< InputStorageType, OutputStorageType > * | _grad |
pointer to gradient filter actually used: More... | |
Image< OutputStorageType > | _gx |
Image< OutputStorageType > | _gxx |
Image< OutputStorageType > | _gxy |
Image< OutputStorageType > | _gy |
Image< OutputStorageType > | _gyy |
int | _HalfWinSize |
int | _InternalMemHeight |
int | _InternalMemWidth |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
Image< OutputStorageType > | _tsgxx |
Image< OutputStorageType > | _tsgxy |
Image< OutputStorageType > | _tsgyy |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
basic class for structure tensor calculation
Definition at line 46 of file StructureTensor.hh.
|
inherited |
enum for border calculation, same meanings as in matlab:
Enumerator | |
---|---|
TBH_full | |
TBH_same | |
TBH_valid |
Definition at line 98 of file FilterBase.hh.
StructureTensor::StructureTensor | ( | ) |
Definition at line 49 of file StructureTensor.cpp.
References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_HalfWinSize, BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemHeight, and BIAS::StructureTensor< InputStorageType, OutputStorageType >::_InternalMemWidth.
StructureTensor::StructureTensor | ( | const StructureTensor< InputStorageType, OutputStorageType > & | other | ) |
Definition at line 59 of file StructureTensor.cpp.
References BIAS::StructureTensor< InputStorageType, OutputStorageType >::_grad.
StructureTensor::~StructureTensor | ( | ) |
Definition at line 71 of file StructureTensor.cpp.
|
protected |
allocates _gxx, _gyy, _gxy, _tsgxx, _tsgxy, _tsgyy and sets InternalMemWidth and _InternalMemHeight
Definition at line 851 of file StructureTensor.cpp.
|
protected |
fills up _gxx, _gxy, _gyy from gx and gy
Definition at line 885 of file StructureTensor.cpp.
References BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::NotBiggerPixelAndSameChannelCount(), and BIAS::ImageBase::SamePixelAndChannelCount().
|
protected |
for debugging only
Definition at line 872 of file StructureTensor.cpp.
References BIAS::ImageIO::Save().
|
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 |
int StructureTensor::CalcStructureTensor | ( | const Image< InputStorageType > & | src, |
Image< OutputStorageType > & | sgxx, | ||
Image< OutputStorageType > & | sgxy, | ||
Image< OutputStorageType > & | sgyy | ||
) |
Calculates the gradients uses internal gradient class and calls CalcStructureTensor with these gradients.
Definition at line 169 of file StructureTensor.cpp.
References BIAS::ImageIO::Save().
int StructureTensor::CalcStructureTensor | ( | const Image< OutputStorageType > & | gx, |
const Image< OutputStorageType > & | gy, | ||
Image< OutputStorageType > & | sgxx, | ||
Image< OutputStorageType > & | sgxy, | ||
Image< OutputStorageType > & | sgyy | ||
) |
For any _HalfWinSize.
For any border handling.
Definition at line 202 of file StructureTensor.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SamePixelAndChannelCount().
int StructureTensor::CalcStructureTensor3x3 | ( | const Image< OutputStorageType > & | gx, |
const Image< OutputStorageType > & | gy, | ||
Image< OutputStorageType > & | sgxx, | ||
Image< OutputStorageType > & | sgxy, | ||
Image< OutputStorageType > & | sgyy | ||
) |
Uses _HalfWinSize=1 Destination images must be initialized.
Definition at line 315 of file StructureTensor.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ROI::SetCorners().
int StructureTensor::CalcStructureTensor5x5 | ( | const Image< OutputStorageType > & | gx, |
const Image< OutputStorageType > & | gy, | ||
Image< OutputStorageType > & | sgxx, | ||
Image< OutputStorageType > & | sgxy, | ||
Image< OutputStorageType > & | sgyy | ||
) |
Uses _HalfWinSize=2 Destination images must be initialized.
Definition at line 392 of file StructureTensor.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::TimeMeasure::GetRealTime(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::TimeMeasure::Reset(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().
int StructureTensor::CalcStructureTensor7x7 | ( | const Image< OutputStorageType > & | gx, |
const Image< OutputStorageType > & | gy, | ||
Image< OutputStorageType > & | sgxx, | ||
Image< OutputStorageType > & | sgxy, | ||
Image< OutputStorageType > & | sgyy | ||
) |
Uses _HalfWinSize=3 Destination images must be initialized.
Definition at line 516 of file StructureTensor.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::TimeMeasure::GetRealTime(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::TimeMeasure::Reset(), BIAS::ImageBase::SamePixelAndChannelCount(), BIAS::ROI::SetCorners(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().
int StructureTensor::CalcStructureTensorValid | ( | const Image< OutputStorageType > & | gx, |
const Image< OutputStorageType > & | gy, | ||
Image< OutputStorageType > & | sgxx, | ||
Image< OutputStorageType > & | sgxy, | ||
Image< OutputStorageType > & | sgyy | ||
) |
For any _HalfWinSize.
Uses valid border handling. Destination images must be initialized.
Definition at line 245 of file StructureTensor.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::ROI::SetCorners().
|
inlinevirtual |
Implements BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 86 of file StructureTensor.hh.
|
inlineprotectedinherited |
|
inherited |
run over all pixel which do not belong to the roi and set them to the value in the source image regardless of the roi of the source.
Both images must have same size.
Definition at line 135 of file FilterBase.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI_Corners.
|
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 |
|
virtual |
calls the apropriate non virtual member function returns an 3 channel image where
Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 78 of file StructureTensor.cpp.
|
virtual |
dstX.GetChannelCount()==src.GetCHannelCount()
Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 108 of file StructureTensor.cpp.
|
virtual |
Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 98 of file StructureTensor.cpp.
|
virtual |
Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 134 of file StructureTensor.cpp.
|
virtual |
Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 88 of file StructureTensor.cpp.
|
virtual |
Reimplemented from BIAS::FilterNTo3N< InputStorageType, OutputStorageType >.
Definition at line 121 of file StructureTensor.cpp.
|
inlineinherited |
Definition at line 129 of file FilterBase.hh.
|
inherited |
Definition at line 61 of file FilterBase.cpp.
Referenced by BIAS::Rescale< InputStorageType, OutputStorageType >::GetBordersValid_().
|
protectedvirtual |
Implements BIAS::FilterBase< InputStorageType, OutputStorageType >.
Definition at line 965 of file StructureTensor.cpp.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inline |
Definition at line 155 of file StructureTensor.hh.
|
inline |
Definition at line 159 of file StructureTensor.hh.
|
inline |
Definition at line 150 of file StructureTensor.hh.
|
inlineinherited |
|
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().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 127 of file FilterBase.hh.
Referenced by BIAS::PMDImageProc::DenoiseDepthImage(), BIAS::CalibratedPyramid< StorageType >::Downsample_(), BIAS::PMDImageProc::FitDepthTo2DImage(), and BIAS::PMDImageProc::FitDepthTo2DImageFree_().
|
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 |
|
inline |
Definition at line 152 of file StructureTensor.hh.
|
inline |
Definition at line 148 of file StructureTensor.hh.
|
inherited |
run over all pixel which do not belong to the roi and set them to some value (typically black)
Definition at line 84 of file FilterBase.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCorners(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI_Corners.
|
inlineinherited |
|
protectedinherited |
Definition at line 132 of file FilterBase.hh.
Referenced by BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase().
|
protected |
pointer to gradient filter actually used:
Definition at line 165 of file StructureTensor.hh.
Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().
|
protected |
Definition at line 172 of file StructureTensor.hh.
|
protected |
Definition at line 174 of file StructureTensor.hh.
|
protected |
Definition at line 174 of file StructureTensor.hh.
|
protected |
Definition at line 172 of file StructureTensor.hh.
|
protected |
Definition at line 174 of file StructureTensor.hh.
|
protected |
Definition at line 168 of file StructureTensor.hh.
Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().
|
protected |
Definition at line 178 of file StructureTensor.hh.
Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().
|
protected |
Definition at line 178 of file StructureTensor.hh.
Referenced by BIAS::StructureTensor< InputStorageType, OutputStorageType >::StructureTensor().
|
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=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
Definition at line 176 of file StructureTensor.hh.
|
protected |
Definition at line 176 of file StructureTensor.hh.
|
protected |
Definition at line 176 of file StructureTensor.hh.
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |