|
|
| GaussianEvaluator (int x=0, const std::shared_ptr< const ConvolvedGaussians > gaussians=nullptr) |
| |
| | GaussianEvaluator (const std::shared_ptr< const ConvolvedGaussians > gaussians, const std::shared_ptr< const Image< T, Data > > data=nullptr, const std::shared_ptr< const Image< T, Data > > sigma_inv=nullptr, const std::shared_ptr< Image< T, Data > > output=nullptr, const std::shared_ptr< Image< T, Data > > residual=nullptr, const std::shared_ptr< ImageArrayT > grads=nullptr, const std::shared_ptr< const Image< idx_type, Indices > > grad_param_map=nullptr, const std::shared_ptr< const Image< T, Data > > grad_param_factor=nullptr, const std::shared_ptr< const Image< idx_type, Indices > > extra_param_map=nullptr, const std::shared_ptr< const Image< T, Data > > extra_param_factor=nullptr, const std::shared_ptr< const Image< T, Data > > background=nullptr) |
| | Construct a GaussianEvaluator, inferring outputs from inputs.
|
| |
|
Data const & | IMAGE_NULL_CONST () const |
| |
|
Indices const & | INDICES_NULL_CONST () const |
| |
|
ImageArray< T, Data > const & | IMAGEARRAY_NULL_CONST () const |
| |
|
const CoordinateSystem & | get_coordsys () const |
| |
|
size_t | get_n_cols () const |
| |
|
size_t | get_n_rows () const |
| |
|
size_t | get_size () const |
| |
| double | loglike_pixel (bool to_add=false) |
| |
| std::string | repr (bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override |
| |
| std::string | str () const override |
| | Return a brief, human-readable string representation of this.
|
| |
template<typename T, class Data, class Indices>
class lsst::gauss2d::GaussianEvaluator< T, Data, Indices >
A class that evaluates 2D Gaussians and renders them in images.
This class is designed for repeated re-evaluation of Gaussian mixture models by caching references to the inputs and outputs.
- Template Parameters
-
| T | The data type (e.g. float, int) |
| Data | The data array class |
| Indices | The index array class (usually a size_t array) |
template<typename T, class Data, class Indices>
Compute the model and/or log-likelihood and/or gradient (d(log-likelihood)/dx) and/or Jacobian (dmodel/dx) for a Gaussian mixture model.
This function calls a series of templated functions with explicit instantiations. This is solely for the purpose of avoiding having to manually write a series of nested conditionals. My hope is that the templating will insert no-op functions wherever there's nothing to do instead of a needless branch inside each pixel's loop, and that the compiler will actually inline everything for maximum performance. Whether that actually happens or not is anyone's guess.
TODO: Consider override to compute LL and Jacobian, even if it's only useful for debug purposes.
- Returns
- The log likelihood.