Classes | Functions
contrib/brl/bseg/sdet/sdet_texture_classifier.h File Reference

A class for classifying texture regions. More...

#include <sdet/sdet_texture_classifier_params.h>
#include <brip/brip_filter_bank.h>
#include <vil/vil_image_resource.h>
#include <vil/vil_image_view.h>
#include <vgl/vgl_polygon.h>
#include <vnl/vnl_vector.h>
#include <vnl/vnl_vector_fixed.h>
#include <vbl/vbl_ref_count.h>
#include <vcl_vector.h>
#include <vcl_map.h>
#include <vcl_iosfwd.h>
#include <sdet/sdet_texture_classifier_sptr.h>

Go to the source code of this file.

Classes

struct  sdet_neighbor
class  sdet_neighbor_less
class  sdet_texture_classifier

Functions

void vsl_b_write (vsl_b_ostream &os, sdet_texture_classifier const &tc)
 Binary save parameters to stream.
void vsl_b_read (vsl_b_istream &is, sdet_texture_classifier &tc)
 Binary load parameters from stream.
void vsl_print_summary (vcl_ostream &os, const sdet_texture_classifier &tc)
void vsl_b_read (vsl_b_istream &is, sdet_texture_classifier *tc)
void vsl_b_write (vsl_b_ostream &os, const sdet_texture_classifier *&tc)
void vsl_print_summary (vcl_ostream &os, const sdet_texture_classifier *&tc)
void vsl_b_read (vsl_b_istream &is, sdet_texture_classifier_sptr &tc)
void vsl_b_write (vsl_b_ostream &os, const sdet_texture_classifier_sptr &tc)
void vsl_print_summary (vcl_ostream &os, const sdet_texture_classifier_sptr &tc)

Detailed Description

A class for classifying texture regions.

Author:
J.L. Mundy
Date:
December 10, 2011

Texture is classified using a texton dictionary. A texton is a k-means cluster center in a n-dimensional space of filter responses. The filters here are patterned after those proposed in the paper M. Varma and A. Zisserman, "A Statistical Approach to Texture Classification from Single Images," International Journal of Computer Vision, Volume 62, Number 1--2, page 61--81, 2005 In this class only 2nd order Gaussian derivatives are used for the anisotropic filters. The isotropic Laplace and Gaussian spot filters are the same as in the Varma and Zisserman work. Thus the filter space dimension is n_scales + 2, where n_scales is the number of scales for the anisotropic filters. The processing is carried out in two stages: 1) training - a set of texture classes is defined along with associated training images. It is possible to specify a polygon or multiple polygons to denote image regions corresponding to the texture samples. The training images are processed to produce a filter response vector at each training pixel. The filter responses are randomly selected to form a training set for each texture category. The training set is clustered by the k-means algorithm and the resulting cluster centers define the textons for the given category The full set of textons define the texton dictionary. Histograms of frequency of texton occurrence in each training set for each category are formed. A texton histogram bin is incremented if the training sample is nearest to that texton. The ultimate outcome of training is the set of texton histograms for each category. The bin frequencies are decreased if the associated textons appear in more than one category. This weighting is defined by the member texton_weights_.

2) classification - A test image is decomposed into blocks and each block is used to compute a texton histogram. The histogram is compared with each category histogram and the probability is defined by the sum of joint probabilities between the test and training histograms. In this implementation the joint probability is taken as the minimum of the probability of corresponding bins. This approach is more invariant to the large disparity in sample populations used to compute the histograms, e.g. 400,000 in training vs. 4096 for a test image block.

Definition in file sdet_texture_classifier.h.


Function Documentation

void vsl_b_read ( vsl_b_istream is,
sdet_texture_classifier tc 
)

Binary load parameters from stream.

Definition at line 947 of file sdet_texture_classifier.cxx.

void vsl_b_read ( vsl_b_istream is,
sdet_texture_classifier tc 
)

Definition at line 951 of file sdet_texture_classifier.cxx.

void vsl_b_read ( vsl_b_istream is,
sdet_texture_classifier_sptr tc 
)

Definition at line 957 of file sdet_texture_classifier.cxx.

void vsl_b_write ( vsl_b_ostream os,
sdet_texture_classifier const &  tc 
)

Binary save parameters to stream.

Definition at line 945 of file sdet_texture_classifier.cxx.

void vsl_b_write ( vsl_b_ostream os,
const sdet_texture_classifier *&  tc 
)

Definition at line 953 of file sdet_texture_classifier.cxx.

void vsl_b_write ( vsl_b_ostream os,
const sdet_texture_classifier_sptr tc 
)

Definition at line 959 of file sdet_texture_classifier.cxx.

void vsl_print_summary ( vcl_ostream &  os,
const sdet_texture_classifier tc 
)

Definition at line 949 of file sdet_texture_classifier.cxx.

void vsl_print_summary ( vcl_ostream &  os,
const sdet_texture_classifier *&  tc 
)

Definition at line 955 of file sdet_texture_classifier.cxx.

void vsl_print_summary ( vcl_ostream &  os,
const sdet_texture_classifier_sptr tc 
)

Definition at line 961 of file sdet_texture_classifier.cxx.