A 2-d histogram with bins defined on a unit sphere. More...
#include <vcl_map.h>
#include <vcl_vector.h>
#include <vcl_iostream.h>
#include <vnl/vnl_math.h>
#include <vnl/vnl_matrix_fixed.h>
Go to the source code of this file.
Classes | |
class | bsta_spherical_histogram< T > |
A histogram on the unit sphere. More... | |
Functions | |
template<class T > | |
vcl_ostream & | operator<< (vcl_ostream &s, bsta_spherical_histogram< T > const &h) |
Write histogram to stream. | |
template<class T > | |
vcl_istream & | operator>> (vcl_istream &is, bsta_spherical_histogram< T > &h) |
Read histogram from stream. |
A 2-d histogram with bins defined on a unit sphere.
A histogram on the sphere. There are a number of popular choices for spherical coordinates and units that are handled. The units for angle can be either degrees or radians. Also there are many choices for coordinate systems on the sphere. For example in geographic coordinates the North and South poles are at +-90 degrees. Also the azimuthal angle can exhibit the range 0 -> 360 or -180 -> 180, with discontinuities in the angle coordinate (a branch cut). The latter choice of branch cut is used for geographic coordinates where positive azimuths are East of Greenwich, England. More typically for physics applications the elevation is 0 at the North pole of the sphere and increases to 180 degrees at the South pole, with// the azimuthal range 0 -> 360. Note that azimuth is undefined at the North and South poles and a special elevation bin centered at the poles is needed. The current implementation does not include such a pole bin.
The histogram is implemented as a map on the linear coordinate derived from azimuth and elevation indices. Bins with zero count are not present in the map.
Methods are provided for the mean and covariance matrix of the histogram distribution. The mean is derived from the mean Cartesian vector of points on the unit sphere corresponding to the populated bin centers. Covariance is computed on angle differences and so is valid only in the tangent plane to the unit sphere at the mean.
Modifications (none yet)
Definition in file bsta_spherical_histogram.h.
vcl_ostream & operator<< | ( | vcl_ostream & | s, |
bsta_spherical_histogram< T > const & | h | ||
) |
Write histogram to stream.
Definition at line 601 of file bsta_spherical_histogram.txx.
vcl_istream & operator>> | ( | vcl_istream & | is, |
bsta_spherical_histogram< T > & | h | ||
) |
Read histogram from stream.
Definition at line 646 of file bsta_spherical_histogram.txx.