Macros | Functions
vil_histogram.h File Reference

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

#include <vector>
#include <algorithm>
#include <vil/vil_image_view.h>
#include <vxl_config.h>

Go to the source code of this file.

Macros

#define VIL_HISTOGRAM_INSTANTIATE(T)
 Instantiation macro for other types. More...
 

Functions

template<class T >
void vil_histogram (const vil_image_view< T > &image, std::vector< double > &histo, double min, double max, unsigned n_bins)
 Construct histogram from pixels in given image. More...
 
void vil_histogram_byte (const vil_image_view< vxl_byte > &image, std::vector< double > &histo)
 Construct histogram from pixels in given image of bytes. More...
 

Detailed Description

Construct histogram from pixels in given image.

Author
Tim Cootes

Definition in file vil_histogram.h.

Macro Definition Documentation

◆ VIL_HISTOGRAM_INSTANTIATE

#define VIL_HISTOGRAM_INSTANTIATE (   T)
Value:
template void vil_histogram(const vil_image_view<T>& image, \
std::vector<double>& histo, \
double min, double max, unsigned n_bins)
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
void vil_histogram(const vil_image_view< T > &image, std::vector< double > &histo, double min, double max, unsigned n_bins)
Construct histogram from pixels in given image.
Definition: vil_histogram.h:20

Instantiation macro for other types.

Definition at line 54 of file vil_histogram.h.

Function Documentation

◆ vil_histogram()

template<class T >
void vil_histogram ( const vil_image_view< T > &  image,
std::vector< double > &  histo,
double  min,
double  max,
unsigned  n_bins 
)
inline

Construct histogram from pixels in given image.

Definition at line 20 of file vil_histogram.h.

◆ vil_histogram_byte()

void vil_histogram_byte ( const vil_image_view< vxl_byte > &  image,
std::vector< double > &  histo 
)

Construct histogram from pixels in given image of bytes.

Resulting histogram has 256 bins

Definition at line 10 of file vil_histogram.cxx.