Auxilliary Tool:
A linear feature that uses Haar Wavelets, which are a certain kind of box filter.
More...
#include <HaarFeature2.h>
Public Member Functions | |
HaarFeature2 (cv::Size expectedPatchSize) | |
Constructor. Unlike BoxFeature, HaarFeature doesn't need to know the number of boxes in the constructor, because it is specified in the parameters. | |
HaarFeature2 () | |
Default Constructor. | |
HaarFeature2 (const HaarFeature2 ©) | |
Copy Constructor. | |
HaarFeature2 & | operator= (const HaarFeature2 &rhs) |
Assignment operator. | |
virtual | ~HaarFeature2 () |
Destructor. | |
virtual void | setFeatureParameters (const cv::Mat ¶mVec) |
Set the parameters that describe the Haar Wavelet used for filtering. See detailed description of the parameters below. |
Auxilliary Tool:
A linear feature that uses Haar Wavelets, which are a certain kind of box filter.
HaarFeature2::HaarFeature2 | ( | cv::Size | expectedPatchSize ) |
Constructor. Unlike BoxFeature, HaarFeature doesn't need to know the number of boxes in the constructor, because it is specified in the parameters.
expectedPatchSize | Specifies the size of the filter, which specifies the possible ranges for the box positions. |
void HaarFeature2::setFeatureParameters | ( | const cv::Mat & | paramVec ) | [virtual] |
Set the parameters that describe the Haar Wavelet used for filtering. See detailed description of the parameters below.
A haar wavelet is localized to a sub rectangle of the total filter area. There are 6 supported kinds of Haar wavelets: left-right, up-down, center-surround, left-center-right, diagonal, up-center-down
The HaarFeature parameter vector has 10 elements, which are: sub-region width, sub-region height, subregion x,y position of the center, kind (numbered 1-6 respective of the above), sign (describes which boxes are added and which are subtracted), horizontal symmetry, vertical symmetry, mean subtraction, and brightness normalization.
The center of an even-sized wavelet is to the right/bottom of the center. The center of an odd-sized wavelet is on the center.
The last 4 parameters describe global behavior of the filtering process. They are: horizontal symmetry, vertical symmetry, mean subtraction, brightness normalization respectively.
The first two each effectively double the number of boxes, by reflecting them around the horizontal and vertical axes respectively. Values for these can be -1,0,+1. 0 means no symmetry, -1 means the symmetric box has the opposite sign, and +1 means the symmetric box has the same sign.
Mean Subtraction means the mean pixel value of the image patch is subtracted before filtering. This normalizes for contrast but not brightness. Brightness Normalization divides the image patch by its L1 norm before filtering. If both options are set, brightness is normalized and then the mean is subtracted. Both of these operations incur a time penalty, which is relatively small.
Parameter value ranges:
Reimplemented from BoxFeature2.