#include <gabor_filter_bank.h>
Public Member Functions | |
std::vector< double > | extractFeature (cv::Mat &frame) |
double | featureDist (std::vector< double > f1, std::vector< double > f2) |
cv::Mat | filterImg (cv::Mat &img, int m, int n, bool use_real=true) |
GaborFilterBank (int M=4, int N=6, double U_l=0.05, double U_h=0.4, int gabor_size=7) | |
Protected Member Functions | |
void | calcSampleVar () |
void | generateGaborFilters () |
Protected Attributes | |
std::vector< std::vector < std::vector< double > > > | alpha_base_mu_ |
std::vector< std::vector < std::vector< double > > > | alpha_base_sigma_ |
std::vector< std::vector < double > > | alpha_mu_ |
std::vector< std::vector < double > > | alpha_sigma_ |
bool | calc_var_ |
std::vector< std::vector < cv::Mat > > | gabor_c_ |
int | gabor_size_ |
int | M_ |
int | N_ |
double | U_h_ |
double | U_l_ |
Definition at line 46 of file gabor_filter_bank.h.
cpl_visual_features::GaborFilterBank::GaborFilterBank | ( | int | M = 4 , |
int | N = 6 , |
||
double | U_l = 0.05 , |
||
double | U_h = 0.4 , |
||
int | gabor_size = 7 |
||
) |
Cunstroctor for FilterBank class. Has default values based on the manjunathi-pami1996 paper.
M | number of scale |
N | number of orientations |
U_l | lower frequency center of interest |
U_h | upper frequency center of interest |
gabor_size | convolution filter size |
Definition at line 47 of file gabor_filter_bank.cpp.
void cpl_visual_features::GaborFilterBank::calcSampleVar | ( | ) | [protected] |
Method to calculate the sample variances for the extracted features.
Definition at line 242 of file gabor_filter_bank.cpp.
vector< double > cpl_visual_features::GaborFilterBank::extractFeature | ( | cv::Mat & | frame | ) |
Extract a texture feature from the given image using the filter bank.
frame | The image to extract the texture feature |
Definition at line 176 of file gabor_filter_bank.cpp.
double cpl_visual_features::GaborFilterBank::featureDist | ( | std::vector< double > | f1, |
std::vector< double > | f2 | ||
) |
Determine the distance between two feature vectors, taking into account the distribution of all feature vectors
f1 | The first feature vector |
f2 | The second feature vector |
Definition at line 218 of file gabor_filter_bank.cpp.
Mat cpl_visual_features::GaborFilterBank::filterImg | ( | cv::Mat & | img, |
int | m, | ||
int | n, | ||
bool | use_real = true |
||
) |
Convolve the given image with the specified real or imaginary gabor filter at scale m and orientation n
img | The image with which to convolve the filter |
m | The scale of the filter to use (0 <= m < M_) |
n | The orientation of the filter to use (0 <= n < N_) |
use_real | true for real component filter, false for the imaginary |
Definition at line 151 of file gabor_filter_bank.cpp.
void cpl_visual_features::GaborFilterBank::generateGaborFilters | ( | ) | [protected] |
Generate the gabor filters to be used in processing, parameterized by class members M_, N_, U_l_, U_h_, and gabor_size_
Definition at line 74 of file gabor_filter_bank.cpp.
std::vector<std::vector<std::vector<double> > > cpl_visual_features::GaborFilterBank::alpha_base_mu_ [protected] |
Definition at line 121 of file gabor_filter_bank.h.
std::vector<std::vector<std::vector<double> > > cpl_visual_features::GaborFilterBank::alpha_base_sigma_ [protected] |
Definition at line 122 of file gabor_filter_bank.h.
std::vector<std::vector <double> > cpl_visual_features::GaborFilterBank::alpha_mu_ [protected] |
Definition at line 124 of file gabor_filter_bank.h.
std::vector<std::vector <double> > cpl_visual_features::GaborFilterBank::alpha_sigma_ [protected] |
Definition at line 125 of file gabor_filter_bank.h.
bool cpl_visual_features::GaborFilterBank::calc_var_ [protected] |
Definition at line 127 of file gabor_filter_bank.h.
std::vector<std::vector<cv::Mat> > cpl_visual_features::GaborFilterBank::gabor_c_ [protected] |
Definition at line 117 of file gabor_filter_bank.h.
int cpl_visual_features::GaborFilterBank::gabor_size_ [protected] |
Definition at line 116 of file gabor_filter_bank.h.
int cpl_visual_features::GaborFilterBank::M_ [protected] |
Definition at line 112 of file gabor_filter_bank.h.
int cpl_visual_features::GaborFilterBank::N_ [protected] |
Definition at line 113 of file gabor_filter_bank.h.
double cpl_visual_features::GaborFilterBank::U_h_ [protected] |
Definition at line 115 of file gabor_filter_bank.h.
double cpl_visual_features::GaborFilterBank::U_l_ [protected] |
Definition at line 114 of file gabor_filter_bank.h.