ReadFramework
rdf::PixelStats Class Reference

This class holds Pixel statistics which are found when computing the local orientation. More...

#include <Pixel.h>

Inheritance diagram for rdf::PixelStats:
Collaboration diagram for rdf::PixelStats:

Public Types

enum  DataIndex {
  all_data = -1, max_val_idx, sparsity_idx, spacing_idx,
  combined_idx, idx_end
}
 

Public Member Functions

 PixelStats (const cv::Mat &orHist=cv::Mat(), const cv::Mat &sparsity=cv::Mat(), double scale=0.0, QSharedPointer< ScaleFactory > scaleFactory=QSharedPointer< ScaleFactory >(new ScaleFactory()), const QString &id=QString())
 
bool isEmpty () const
 
void setScaleFactory (const QSharedPointer< ScaleFactory > &scaleFactory)
 
void setOrientationIndex (int orIdx)
 
void setLineSpacing (int ls)
 
int orientationIndex () const
 
int numOrientations () const
 
double orientation () const
 
Vector2D orVec () const
 Returns the orientation vector scaled to unit length. More...
 
void scale (double factor) override
 
double scaleFactor () const
 
int lineSpacingIndex () const
 
double lineSpacing () const
 
double minVal () const
 
cv::Mat data (const DataIndex &dIdx=all_data)
 
QString toString () const
 
- Public Member Functions inherited from rdf::BaseElement
 BaseElement (const QString &id=QString())
 This class keeps an ID to keep track of transformed elements during a processing chain. You can e.g. generate Pixel elements from MserBlobs. After filtering, processing etc. you can map back to the (pixel accurate) MserBlob using this ID. More...
 
void setId (const QString &id)
 Sets the (preferably unique) ID. If no ID is set, a unqiue ID is generated and assigned. More...
 
QString id () const
 Returns the elment's id. More...
 

Protected Member Functions

void convertData (const cv::Mat &orHist, const cv::Mat &sparsity)
 

Protected Attributes

cv::Mat mData
 
double mScale = 0.0
 
double mMinVal = 0.0
 
QSharedPointer< ScaleFactorymScaleFactory
 
int mHistSize = 0
 
int mOrIdx = -1
 
int mLineSpacing = -1
 
- Protected Attributes inherited from rdf::BaseElement
QString mId
 

Detailed Description

This class holds Pixel statistics which are found when computing the local orientation.

See also
BaseElement

Member Enumeration Documentation

Enumerator
all_data 
max_val_idx 
sparsity_idx 
spacing_idx 
combined_idx 
idx_end 

Constructor & Destructor Documentation

rdf::PixelStats::PixelStats ( const cv::Mat &  orHist = cv::Mat(),
const cv::Mat &  sparsity = cv::Mat(),
double  scale = 0.0,
QSharedPointer< ScaleFactory scaleFactory = QSharedPointer<ScaleFactory>(new ScaleFactory()),
const QString &  id = QString() 
)

Member Function Documentation

void rdf::PixelStats::convertData ( const cv::Mat &  orHist,
const cv::Mat &  sparsity 
)
protected

Here is the caller graph for this function:

cv::Mat rdf::PixelStats::data ( const DataIndex dIdx = all_data)
bool rdf::PixelStats::isEmpty ( ) const
double rdf::PixelStats::lineSpacing ( ) const
int rdf::PixelStats::lineSpacingIndex ( ) const

Here is the caller graph for this function:

double rdf::PixelStats::minVal ( ) const

Here is the caller graph for this function:

int rdf::PixelStats::numOrientations ( ) const

Here is the caller graph for this function:

double rdf::PixelStats::orientation ( ) const

Here is the caller graph for this function:

int rdf::PixelStats::orientationIndex ( ) const
Vector2D rdf::PixelStats::orVec ( ) const

Returns the orientation vector scaled to unit length.

Returns
The orientation vector (0° = postive y-axis).
void rdf::PixelStats::scale ( double  factor)
overridevirtual

Reimplemented from rdf::BaseElement.

Here is the caller graph for this function:

double rdf::PixelStats::scaleFactor ( ) const

Here is the caller graph for this function:

void rdf::PixelStats::setLineSpacing ( int  ls)
void rdf::PixelStats::setOrientationIndex ( int  orIdx)
void rdf::PixelStats::setScaleFactory ( const QSharedPointer< ScaleFactory > &  scaleFactory)
QString rdf::PixelStats::toString ( ) const
virtual

Reimplemented from rdf::BaseElement.

Member Data Documentation

cv::Mat rdf::PixelStats::mData
protected
int rdf::PixelStats::mHistSize = 0
protected
int rdf::PixelStats::mLineSpacing = -1
protected
double rdf::PixelStats::mMinVal = 0.0
protected
int rdf::PixelStats::mOrIdx = -1
protected
double rdf::PixelStats::mScale = 0.0
protected
QSharedPointer<ScaleFactory> rdf::PixelStats::mScaleFactory
protected

The documentation for this class was generated from the following files: