KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations | Functions
kjb::opencv Namespace Reference

Classes

class  CV_features_to_track_detector
 
struct  CV_term_criteria
 

Enumerations

enum  HIST_COMP_METHOD { CORRELATION, CHI_SQUARE, INTERSECTION, BHATTACHARYYA }
 

Functions

Matrix calculate_histogram (const Matrix &src, int num_bins, float lower_bound=0.0f, float upper_bound=256.0f)
 Calculates a histogram of values in src. More...
 
Matrix calculate_rg_histogram (const Image &img, const Axis_aligned_rectangle_2d &box, int red_bins, int green_bins)
 Calculates a histogram of values in src. More...
 
Matrix calculate_hs_histogram (const Image &img, const Axis_aligned_rectangle_2d &box, int hue_bins, int saturation_bins)
 Calculates a histogram of values in src. More...
 
std::vector< Matrixcalculate_rg_histograms (const Image &img, const std::vector< Axis_aligned_rectangle_2d > &boxes, int red_bins, int green_bins)
 Calculates a histogram of values in src. More...
 
std::vector< Matrixcalculate_hs_histograms (const Image &img, const std::vector< Axis_aligned_rectangle_2d > &boxes, int hue_bins, int saturation_bins)
 Calculates a histogram of values in src. More...
 
double compare_histograms (const Matrix &h1, const Matrix &h2, int method)
 

Enumeration Type Documentation

Enumerator
CORRELATION 
CHI_SQUARE 
INTERSECTION 
BHATTACHARYYA 

Function Documentation

Matrix kjb::opencv::calculate_histogram ( const Matrix &  src,
int  num_bins,
float  lower_bound = 0.0f,
float  upper_bound = 256.0f 
)

Calculates a histogram of values in src.

Parameters
srcSource Image.
num_binsSize of histograms of each R, G, B component (number of bins)
lower_boundLower bound of the range of histogram
upper_boundUpper bound of the range of histogram (exclusive)
Matrix kjb::opencv::calculate_hs_histogram ( const Image img,
const Axis_aligned_rectangle_2d box,
int  hue_bins,
int  saturation_bins 
)

Calculates a histogram of values in src.

Parameters
imgSource Image.
boxesRegions of interest
hue_binsSize of histograms of each hue component
saturation_binsSize of histograms of each saturation component
std::vector< Matrix > kjb::opencv::calculate_hs_histograms ( const Image img,
const std::vector< Axis_aligned_rectangle_2d > &  boxes,
int  hue_bins,
int  saturation_bins 
)

Calculates a histogram of values in src.

Parameters
imgSource Image.
boxesA vector of regions of interest
hue_binsSize of histograms of each hue component
saturation_binsSize of histograms of each saturation component
Matrix kjb::opencv::calculate_rg_histogram ( const Image img,
const Axis_aligned_rectangle_2d box,
int  red_bins,
int  green_bins 
)

Calculates a histogram of values in src.

Parameters
imgSource Image.
boxThe region of interest
red_binsSize of histograms of each r component
green_binsSize of histograms of each g component
std::vector< Matrix > kjb::opencv::calculate_rg_histograms ( const Image img,
const std::vector< Axis_aligned_rectangle_2d > &  boxes,
int  red_bins,
int  green_bins 
)

Calculates a histogram of values in src.

Parameters
imgSource Image.
red_binsSize of histograms of each r component
green_binsSize of histograms of each g component
double kjb::opencv::compare_histograms ( const Matrix h1,
const Matrix h2,
int  method 
)