Direct Graphical Models
v.1.7.0
|
Interface class for global feature extraction algorithms. More...
#include <GlobalFeatureExtractor.h>
Public Member Functions | |
CGlobalFeatureExtractor (const Mat &img) | |
Constructor. More... | |
virtual | ~CGlobalFeatureExtractor (void) |
size_t | getNumLines (int threshold1=100, int threshold2=50) const |
Returns the number of staight lines in the image. More... | |
size_t | getNumCircles (int threshold1=100, int threshold2=30) const |
Returns the number of circles in the source image. More... | |
float | getOpacity (void) const |
Returns the weighted-mean transparancy of the source image. More... | |
float | getVariance (void) |
Retunrs the variance of the source image. More... | |
int | getArea (void) |
Returns the number of non-zero pixels in the source image. More... | |
int | getPerimeter (void) |
Returns the perimeter of an object in the source image. More... | |
float | getCompactness (void) |
Returns the compactness of the object in the source image. More... | |
Public Member Functions inherited from DirectGraphicalModels::fex::IFeatureExtractor | |
IFeatureExtractor (const Mat &img) | |
Constructor. More... | |
virtual | ~IFeatureExtractor (void) |
Additional Inherited Members | |
Protected Attributes inherited from DirectGraphicalModels::fex::IFeatureExtractor | |
const Mat | m_img |
Container for the image, from which the features are to be extracted. More... | |
Interface class for global feature extraction algorithms.
The derived algorithms are supposed to extract one feature per image
Definition at line 17 of file GlobalFeatureExtractor.h.
|
inline |
|
inlinevirtual |
Definition at line 25 of file GlobalFeatureExtractor.h.
|
inline |
Returns the number of non-zero pixels in the source image.
Definition at line 58 of file GlobalFeatureExtractor.h.
|
inline |
Returns the compactness of the object in the source image.
The compactness is calculates as follows: \(\frac{P^2}{4\Pi S}\), where P and S are perimeter and area of the object, respectively.
Definition at line 70 of file GlobalFeatureExtractor.h.
|
inline |
Returns the number of circles in the source image.
threshold1 | The higher threshold of the two, passed to the Canny edge detector (the lower one is twice smaller). |
threshold2 | The accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. |
Definition at line 40 of file GlobalFeatureExtractor.h.
|
inline |
Returns the number of staight lines in the image.
threshold1 | The higher threshold of the two, passed to the Canny edge detector(the lower one is twice smaller). |
threshold2 | The accumulator threshold parameter.Only those lines are detected that get enough votes(> threshold2). |
Definition at line 33 of file GlobalFeatureExtractor.h.
|
inline |
Returns the weighted-mean transparancy of the source image.
The weighted-mean transparancy is evaluated as follows:
\[ \frac{1}{width \times hight} \sum^{width}_{x = 1}\sum^{height}_{y = 1} (1 - d_{x,y}) \cdot (img_{x,y} - \mu), \]
where \(d_{x,y}\) is the normalized distance between a position \((x,y)\) and the image center.
Definition at line 48 of file GlobalFeatureExtractor.h.
|
inline |
Returns the perimeter of an object in the source image.
This function retunrs the number of edge pixels, assuming a pixel to belong to an edge if any of its neighboring pixels have different value.
Definition at line 64 of file GlobalFeatureExtractor.h.
|
inline |
Retunrs the variance of the source image.
Definition at line 53 of file GlobalFeatureExtractor.h.