Public Member Functions | Protected Member Functions | Protected Attributes
cpl_visual_features::LMFilterBank Class Reference

#include <lm_filter_bank.h>

List of all members.

Public Member Functions

std::vector< TextonFeatureclusterTextons (std::vector< std::vector< TextonFeature > > samples, int k, int attempts=3)
std::vector< int > extractDescriptor (cv::Mat &frame)
std::vector< TextonFeatureextractRawFeature (cv::Mat &frame, bool use_all_pixels=false)
float featureDist (TextonFeature f1, TextonFeature f2)
std::vector< TextonFeaturegetCenters () const
int getNumCenters () const
 LMFilterBank (int orientations=6, int elongated_scales=1, int gaussian_scales=1, int num_extract_scales=2, int support=7)
int quantizeFeature (TextonFeature feat)
bool readTextonCenters (std::string file_name)
void saveTextonCenters (std::vector< TextonFeature > centers, std::string file_name)
cv::Mat textonQuantizeImage (cv::Mat &frame)
void visualizeKernels (void)

Protected Member Functions

cv::Mat createElongatedFilter (float scale, int phase_x, int phase_y, cv::Mat pts_1, cv::Mat pts_2, int sup)
void generateFilters (void)
cv::Mat getDOGFilter (int ksize, float sigma, float alpha=3.0)
cv::Mat getGaussianDeriv (float sigma, float mu, cv::Mat x, int ord)
cv::Mat normalize (cv::Mat &f)
cv::Mat upSampleResponse (cv::Mat &down_convolved, int s, cv::Size size0)

Protected Attributes

std::vector< cv::Mat > bars_
std::vector< TextonFeaturecenters_
std::vector< cv::Mat > dogs_
std::vector< cv::Mat > edges_
std::vector< cv::Mat > gaussians_
int n_e_scales_
int n_extract_scales_
int n_filters_
int n_g_scales_
int n_orientations_
int support_

Detailed Description

Definition at line 51 of file lm_filter_bank.h.


Constructor & Destructor Documentation

cpl_visual_features::LMFilterBank::LMFilterBank ( int  orientations = 6,
int  elongated_scales = 1,
int  gaussian_scales = 1,
int  num_extract_scales = 2,
int  support = 7 
)

Cunstroctor for LMFilterBank class. Implementing the one used in: Leung and Malik. "Representing and recognizing the visual appearance of materials using three-dimensional textons." IJCV, 2001.

Definition at line 50 of file lm_filter_bank.cpp.


Member Function Documentation

Method to cluster raw extracted feauters into textons

Parameters:
samples
kThe number of texton centers to find
Returns:
The texton centers.

Definition at line 306 of file lm_filter_bank.cpp.

Mat cpl_visual_features::LMFilterBank::createElongatedFilter ( float  scale,
int  phase_x,
int  phase_y,
cv::Mat  pts_1,
cv::Mat  pts_2,
int  sup 
) [protected]

Definition at line 360 of file lm_filter_bank.cpp.

Extracts a histogram of the texture descriptors over the given image patch

Parameters:
frameThe image patch over which to extract the quantized descriptor
Returns:
The quantized texture descriptor

Definition at line 255 of file lm_filter_bank.cpp.

vector< TextonFeature > cpl_visual_features::LMFilterBank::extractRawFeature ( cv::Mat &  frame,
bool  use_all_pixels = false 
)

Extract a texture feature from the given image using the filter bank.

Parameters:
frameThe image to extract the texture feature
Returns:
A vector of length frame.rows*frame.cols of TextonFeatures for each pixel

Definition at line 134 of file lm_filter_bank.cpp.

Determine the distance between two feature vectors.

Parameters:
f1The first feature vector
f2The second feature vector
Returns:
The distance between the two vectors in feature space

Definition at line 452 of file lm_filter_bank.cpp.

Definition at line 60 of file lm_filter_bank.cpp.

Definition at line 153 of file lm_filter_bank.h.

Mat cpl_visual_features::LMFilterBank::getDOGFilter ( int  ksize,
float  sigma,
float  alpha = 3.0 
) [protected]

Definition at line 403 of file lm_filter_bank.cpp.

Mat cpl_visual_features::LMFilterBank::getGaussianDeriv ( float  sigma,
float  mu,
cv::Mat  x,
int  ord 
) [protected]

Definition at line 371 of file lm_filter_bank.cpp.

Definition at line 158 of file lm_filter_bank.h.

Mat cpl_visual_features::LMFilterBank::normalize ( cv::Mat &  f) [protected]

Definition at line 444 of file lm_filter_bank.cpp.

Method to take a raw filter response feature and quantize it to the correct texton value.

Parameters:
featA raw texton feature.
Returns:
The label (index) of the nearest texton center.

Definition at line 288 of file lm_filter_bank.cpp.

Read the cluster centers into memory that have previously been saved to disk using the method saveTextonCenters. These centers will be stored internally in the lm_filter_bank instance

Parameters:
file_nameThe location of the cluster center files

Definition at line 538 of file lm_filter_bank.cpp.

void cpl_visual_features::LMFilterBank::saveTextonCenters ( std::vector< TextonFeature centers,
std::string  file_name 
)

Save the texton centers to a file. Each row of the file corresponds to a different center.

Parameters:
centersThe vector of cluster centers to write to disk.
file_nameThe location to save the centers.

Definition at line 518 of file lm_filter_bank.cpp.

For a given image associate each pixel with a texture label.

Parameters:
frameThe image on which to perform the feature extraction and quantization.
Returns:
An image containing the correct image labels;

Definition at line 267 of file lm_filter_bank.cpp.

Mat cpl_visual_features::LMFilterBank::upSampleResponse ( cv::Mat &  down_convolved,
int  s,
cv::Size  size0 
) [protected]

Definition at line 414 of file lm_filter_bank.cpp.

Display the different kernels.

Definition at line 471 of file lm_filter_bank.cpp.


Member Data Documentation

Definition at line 181 of file lm_filter_bank.h.

Definition at line 185 of file lm_filter_bank.h.

Definition at line 184 of file lm_filter_bank.h.

Definition at line 182 of file lm_filter_bank.h.

Definition at line 183 of file lm_filter_bank.h.

Definition at line 176 of file lm_filter_bank.h.

Definition at line 178 of file lm_filter_bank.h.

Definition at line 180 of file lm_filter_bank.h.

Definition at line 177 of file lm_filter_bank.h.

Definition at line 175 of file lm_filter_bank.h.

Definition at line 179 of file lm_filter_bank.h.


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


cpl_visual_features
Author(s): Tucker Hermans
autogenerated on Wed Nov 27 2013 11:52:36