MRPT  1.9.9
mrpt::maps::CLogOddsGridMapLUT< TCELL > Struct Template Reference

Detailed Description

template<typename TCELL>
struct mrpt::maps::CLogOddsGridMapLUT< TCELL >

One static instance of this struct should exist in any class implementing CLogOddsGridMap2D to hold the Look-up-tables (LUTs) for log-odss Bayesian update.

Map cells must be type TCELL, which can be only:

  • int8_t or
  • int16_t
See also
CLogOddsGridMap2D, see derived classes for usage examples.

Definition at line 26 of file CLogOddsGridMapLUT.h.

#include <mrpt/maps/CLogOddsGridMapLUT.h>

Inheritance diagram for mrpt::maps::CLogOddsGridMapLUT< TCELL >:

Public Types

using cell_t = TCELL
 The type of. More...
 
using traits_t = detail::logoddscell_traits< TCELL >
 

Public Member Functions

 CLogOddsGridMapLUT ()
 Constructor: computes all the required stuff. More...
 
float l2p (const cell_t l)
 Scales an integer representation of the log-odd into a real valued probability in [0,1], using p=exp(l)/(1+exp(l)) More...
 
uint8_t l2p_255 (const cell_t l)
 Scales an integer representation of the log-odd into a linear scale [0,255], using p=exp(l)/(1+exp(l)) More...
 
cell_t p2l (const float p)
 Scales a real valued probability in [0,1] to an integer representation of: log(p)-log(1-p) in the valid range of cell_t. More...
 

Public Attributes

std::vector< float > logoddsTable
 A lookup table to compute occupancy probabilities in [0,1] from integer log-odds values in the cells, using $ p(m_{xy}) = \frac{1}{1+exp(-log_odd)} $. More...
 
std::vector< uint8_tlogoddsTable_255
 A lookup table to compute occupancy probabilities in the range [0,255] from integer log-odds values in the cells, using $ p(m_{xy}) = \frac{1}{1+exp(-log_odd)} $. More...
 
std::vector< cell_tp2lTable
 A lookup table for passing from float to log-odds as cell_t. More...
 

Member Typedef Documentation

◆ cell_t

template<typename TCELL>
using mrpt::maps::CLogOddsGridMapLUT< TCELL >::cell_t = TCELL

The type of.

Definition at line 29 of file CLogOddsGridMapLUT.h.

◆ traits_t

template<typename TCELL>
using mrpt::maps::CLogOddsGridMapLUT< TCELL >::traits_t = detail::logoddscell_traits<TCELL>

Definition at line 30 of file CLogOddsGridMapLUT.h.

Constructor & Destructor Documentation

◆ CLogOddsGridMapLUT()

template<typename TCELL>
mrpt::maps::CLogOddsGridMapLUT< TCELL >::CLogOddsGridMapLUT ( )
inline

Constructor: computes all the required stuff.

Definition at line 49 of file CLogOddsGridMapLUT.h.

Member Function Documentation

◆ l2p()

template<typename TCELL>
float mrpt::maps::CLogOddsGridMapLUT< TCELL >::l2p ( const cell_t  l)
inline

Scales an integer representation of the log-odd into a real valued probability in [0,1], using p=exp(l)/(1+exp(l))

Definition at line 89 of file CLogOddsGridMapLUT.h.

Referenced by mrpt::maps::CReflectivityGridMap2D::cell2float(), and mrpt::maps::CReflectivityGridMap2D::internal_computeObservationLikelihood().

Here is the caller graph for this function:

◆ l2p_255()

template<typename TCELL>
uint8_t mrpt::maps::CLogOddsGridMapLUT< TCELL >::l2p_255 ( const cell_t  l)
inline

Scales an integer representation of the log-odd into a linear scale [0,255], using p=exp(l)/(1+exp(l))

Definition at line 101 of file CLogOddsGridMapLUT.h.

Referenced by mrpt::maps::CReflectivityGridMap2D::getAs3DObject(), and mrpt::maps::CReflectivityGridMap2D::getAsImage().

Here is the caller graph for this function:

◆ p2l()

template<typename TCELL>
cell_t mrpt::maps::CLogOddsGridMapLUT< TCELL >::p2l ( const float  p)
inline

Scales a real valued probability in [0,1] to an integer representation of: log(p)-log(1-p) in the valid range of cell_t.

Definition at line 113 of file CLogOddsGridMapLUT.h.

Referenced by mrpt::maps::CReflectivityGridMap2D::internal_clear(), and mrpt::maps::CReflectivityGridMap2D::internal_insertObservation().

Here is the caller graph for this function:

Member Data Documentation

◆ logoddsTable

template<typename TCELL>
std::vector<float> mrpt::maps::CLogOddsGridMapLUT< TCELL >::logoddsTable

A lookup table to compute occupancy probabilities in [0,1] from integer log-odds values in the cells, using $ p(m_{xy}) = \frac{1}{1+exp(-log_odd)} $.

Definition at line 36 of file CLogOddsGridMapLUT.h.

Referenced by mrpt::maps::CLogOddsGridMapLUT< cell_t >::CLogOddsGridMapLUT(), and mrpt::maps::CLogOddsGridMapLUT< cell_t >::l2p().

◆ logoddsTable_255

template<typename TCELL>
std::vector<uint8_t> mrpt::maps::CLogOddsGridMapLUT< TCELL >::logoddsTable_255

A lookup table to compute occupancy probabilities in the range [0,255] from integer log-odds values in the cells, using $ p(m_{xy}) = \frac{1}{1+exp(-log_odd)} $.

This is used to speed-up conversions to grayscale images.

Definition at line 43 of file CLogOddsGridMapLUT.h.

Referenced by mrpt::maps::CLogOddsGridMapLUT< cell_t >::CLogOddsGridMapLUT(), and mrpt::maps::CLogOddsGridMapLUT< cell_t >::l2p_255().

◆ p2lTable

template<typename TCELL>
std::vector<cell_t> mrpt::maps::CLogOddsGridMapLUT< TCELL >::p2lTable

A lookup table for passing from float to log-odds as cell_t.

Definition at line 46 of file CLogOddsGridMapLUT.h.

Referenced by mrpt::maps::CLogOddsGridMapLUT< cell_t >::CLogOddsGridMapLUT(), and mrpt::maps::CLogOddsGridMapLUT< cell_t >::p2l().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 363e65e4a Wed Jun 19 01:52:47 2019 +0200 at miƩ jun 19 02:00:17 CEST 2019