Defines | Functions
contrib/brl/bseg/brip/brip_histogram.txx File Reference

Construct histogram from pixels in given image. More...

#include "brip_histogram.h"
#include <vcl_cassert.h>
#include <vcl_algorithm.h>

Go to the source code of this file.

Defines

#define brip_histogram_txx_
#define BRIP_HISTOGRAM_INSTANTIATE(T)

Functions

template<class T >
double brip_histogram (const vil_image_view< T > &image, vcl_vector< double > &histo, double min, double max, unsigned n_bins)
 Construct histogram from pixels in the given image.
template<class T >
double brip_weighted_histogram (const vil_image_view< T > &image, const vil_image_view< double > &weights, vcl_vector< double > &histo, double min, double max, unsigned n_bins)
 Construct weighted histogram from pixels in the given image using values in an image of weights.
template<class T >
double brip_joint_histogram (const vil_image_view< T > &image1, const vil_image_view< T > &image2, vcl_vector< vcl_vector< double > > &histo, double min, double max, unsigned n_bins)
 Construct the joint histogram between image1 and image2.

Detailed Description

Construct histogram from pixels in given image.

Author:
Matt Leotta

Definition in file brip_histogram.txx.


Define Documentation

#define BRIP_HISTOGRAM_INSTANTIATE (   T)
Value:
template \
  double brip_histogram(const vil_image_view<T >& image, \
                        vcl_vector<double>& histo, \
                        double min, double max, unsigned n_bins); \
  template \
  double brip_weighted_histogram(const vil_image_view<T >& image, \
                                 const vil_image_view<double>& weights, \
                                 vcl_vector<double>& histo, \
                                 double min, double max, unsigned n_bins); \
  template \
  double brip_joint_histogram(const vil_image_view<T >& image1, \
                              const vil_image_view<T >& image2, \
                              vcl_vector<vcl_vector<double> >& histo, \
                              double min, double max, unsigned n_bins)

Definition at line 146 of file brip_histogram.txx.

#define brip_histogram_txx_

Definition at line 3 of file brip_histogram.txx.


Function Documentation

template<class T >
double brip_histogram ( const vil_image_view< T > &  image,
vcl_vector< double > &  histo,
double  min,
double  max,
unsigned  n_bins 
)

Construct histogram from pixels in the given image.

same as vil_histogram except that it returns the sum of all values in the histogram.

Definition at line 16 of file brip_histogram.txx.

template<class T >
double brip_joint_histogram ( const vil_image_view< T > &  image1,
const vil_image_view< T > &  image2,
vcl_vector< vcl_vector< double > > &  histo,
double  min,
double  max,
unsigned  n_bins 
)

Construct the joint histogram between image1 and image2.

The the values of min, max, and n_bins are used on both images the result is a 2D (n_bins x n_bins) vcl_vector. The sum of all values in the histogram is returned.

Definition at line 97 of file brip_histogram.txx.

template<class T >
double brip_weighted_histogram ( const vil_image_view< T > &  image,
const vil_image_view< double > &  weights,
vcl_vector< double > &  histo,
double  min,
double  max,
unsigned  n_bins 
)

Construct weighted histogram from pixels in the given image using values in an image of weights.

Construct weighted histogram from pixels in the given image using.

Definition at line 52 of file brip_histogram.txx.