Jafar
|
A wrapper for the calife DTM data struct. More...
#include <Dtm.hpp>
Public Types | |
enum | file_method { DTM_ASCII, DTM_ARCGIS, DTM_BIN } |
List of different method used to load / save a dtm Used by to_file and from_file. More... | |
enum | fill_method { DTM_FILL_BASIC, DTM_FILL_QUAD, DTM_FILL_DYNAMIC } |
List of algorithm used to compute the dtm Used by fuse. | |
enum | gdhe_method { DTM_GDHE_FULL, DTM_GDHE_UPDATE } |
List of method used to fill a gdhe dtm file Use by to_gdhe. | |
enum | image_method { DTM_NB_POINTS, DTM_Z_MOYEN, DTM_SIGMA_Z, DTM_CONFIDENCE, DTM_HSTATE, DTM_VISIBILITY, DTM_HSTATE_VISIBILITY } |
List of way to fill a dtm image Use by to_image. More... | |
Public Member Functions | |
Dtm (const std::string conf_file=default_conf_file, dtm_type type=DTM_FIXED, dtm_stockage stockage=X_LIGNES, const fill_method fill_way=DTM_FILL_BASIC) | |
Dtm (const Dtm &) | |
void | dup (const Dtm &a) |
Make a true copy of dtm a. | |
void | dup_empty (const Dtm &a) |
Make a copy of the structure of dtm a (It means that we don't copy the value stored in the dtm, only its caracteristics) | |
void | to_file (const std::string &path, const file_method way) const |
Write the current dtm in a file. | |
void | from_file (const std::string &path, const file_method way) |
Read a dtm from a file. | |
void | set_gdhe_display_params (double scale, double offset, int luminance) |
Modify the display parameters for gdhe (aka _zscale, _zoffset, and _luminance) | |
int | to_gdhe (const std::string &path, const gdhe_method way) const |
Dump the current DTM in a gdhe file (to future gdhe display) | |
void | from_gdhe (const std::string &path) |
Read a DTM from a gdhe file (mainly for debug) | |
int | fuse (jafar::calife::Image3d &im3d, jafar::geom::T3D &t3d, jafar::geom::T3D &s2o) |
Integrage one image to the dtm. | |
int | prepare_dynamic_fuse (jafar::calife::Image3d &im3d, jafar::geom::T3D &left, jafar::geom::T3D &right, double *intrinsec_rectified_param, int reduction, double max_depth) |
Prepare local dtm to be used for further step of DTM_FILL_DYNAMIC It must be called only one time, before the first call to fuse. | |
bool | is_ready_for_dynamic_fuse () |
A quick test to check that the object is ready to dynamicly fuse image. | |
int | get_imax () const |
Get the max line number in the DTM. | |
int | get_jmax () const |
Get the max column number in the DTM. | |
bool | get_z (int i, int j, float *z) const |
Get the current z for a cell of the DTM. | |
void | set_z (int i, int j, float) |
Set the z for a cell of the DTM. | |
double | get_scale () const |
Get the scale factor for DTM. | |
double | get_x_orig () const |
Get the the x origin of the DTM. | |
double | get_y_orig () const |
Get the the y origin of the DTM. | |
void | min_max () |
Compute the min_max of the DTM (aka the differents bounds. | |
void | print_info () const |
Print different informations for the DTM (things like size, scales, min/max z, ...) | |
void | print_cell_info (int i, int j) const |
Print different informations for a cell of the DTM (actual height, its positions ...) | |
DTM * | get_data () const |
Return the internal DTM data struct. | |
void | write_image (jafar::image::Image &img, const image_method &method, bool global=true) const |
This function generate a rgb image representing some interesting values stored in the dtm. | |
jafar::image::Image * | to_image (const image_method &method, bool global=true) const |
This function generate a rgb image representating some interesting value stored in the dtm. | |
Static Public Member Functions | |
static void | scaleZ (const std::string &orig, double scale, const std::string &res) |
This function generate a new dtm changing the scale_z setting (so it will expand or reduce the relief). | |
Static Public Attributes | |
static std::string | default_conf_file |
Private Member Functions | |
void | to_image_nb_points (jafar::image::Image &, DTM *) const |
void | to_image_z_moyen (jafar::image::Image &, DTM *) const |
void | to_image_sigma_z (jafar::image::Image &, DTM *) const |
void | to_image_hstate (jafar::image::Image &, DTM *) const |
void | to_image_visibility (jafar::image::Image &, DTM *) const |
void | to_image_hstate_visibility (jafar::image::Image &, DTM *) const |
void | _write_image (jafar::image::Image &, const image_method &, DTM *) const |
Private Attributes | |
DTM * | pdtm |
internal ptr on the calife data struct | |
DTM * | local_pdtm |
double | _zscale |
temp dtm used by the DTM_FILL_DYNAMIC, NULL in other case | |
double | _zoffset |
int | _luminance |
fill_method | _way |
Method used to fill image. |
List of way to fill a dtm image Use by to_image.
void jafar::dtm::Dtm::dup | ( | const Dtm & | a | ) |
Make a true copy of dtm a.
a | is the origin dtm |
void jafar::dtm::Dtm::dup_empty | ( | const Dtm & | a | ) |
Make a copy of the structure of dtm a (It means that we don't copy the value stored in the dtm, only its caracteristics)
a | is the origin dtm |
void jafar::dtm::Dtm::from_file | ( | const std::string & | path, |
const file_method | way | ||
) |
Read a dtm from a file.
path | is a constant string representing the file to read |
way | is a constant file_method which describes how to read the file |
void jafar::dtm::Dtm::from_gdhe | ( | const std::string & | path | ) |
Read a DTM from a gdhe file (mainly for debug)
path | is a constant string representanting the file to read. |
int jafar::dtm::Dtm::fuse | ( | jafar::calife::Image3d & | im3d, |
jafar::geom::T3D & | t3d, | ||
jafar::geom::T3D & | s2o | ||
) |
Integrage one image to the dtm.
im3d | is the image to integrate |
t3d | is the transformation between the global frame and the robot frame (not so important) |
s2o | is the transformation between the global frame and the sensor frame (only useful if way = DTM_FILL_DYNAMIC |
DTM* jafar::dtm::Dtm::get_data | ( | ) | const |
Return the internal DTM data struct.
It is useful when we need to call directly some calife function.
int jafar::dtm::Dtm::get_imax | ( | ) | const |
Get the max line number in the DTM.
int jafar::dtm::Dtm::get_jmax | ( | ) | const |
Get the max column number in the DTM.
double jafar::dtm::Dtm::get_scale | ( | ) | const |
Get the scale factor for DTM.
double jafar::dtm::Dtm::get_x_orig | ( | ) | const |
Get the the x origin of the DTM.
double jafar::dtm::Dtm::get_y_orig | ( | ) | const |
Get the the y origin of the DTM.
bool jafar::dtm::Dtm::get_z | ( | int | i, |
int | j, | ||
float * | z | ||
) | const |
Get the current z for a cell of the DTM.
i | is the line index in the DTM |
j | is the column index in the DTM |
z | is the resulting z |
bool jafar::dtm::Dtm::is_ready_for_dynamic_fuse | ( | ) | [inline] |
void jafar::dtm::Dtm::min_max | ( | ) |
Compute the min_max of the DTM (aka the differents bounds.
int jafar::dtm::Dtm::prepare_dynamic_fuse | ( | jafar::calife::Image3d & | im3d, |
jafar::geom::T3D & | left, | ||
jafar::geom::T3D & | right, | ||
double * | intrinsec_rectified_param, | ||
int | reduction, | ||
double | max_depth | ||
) |
Prepare local dtm to be used for further step of DTM_FILL_DYNAMIC It must be called only one time, before the first call to fuse.
(you may need to recall it if you change roll / pitch of the camera)
im3d | is a reference image (mainly used for its size ...) |
left | is the transformation between left camera and robot (yaw must be 0) |
right | is the transformation between right camera and robot (yaw must be 0) |
intrinsec_rectified_param | is the intrinsec rectified matrix for stereo |
reduction | is the reduction between the full size image and the image currenlty threated |
max_depth | is the maximum depth of the computed view field |
void jafar::dtm::Dtm::print_cell_info | ( | int | i, |
int | j | ||
) | const |
Print different informations for a cell of the DTM (actual height, its positions ...)
i | is the line index of the DTM |
j | is the column index of the DTM |
void jafar::dtm::Dtm::print_info | ( | ) | const |
Print different informations for the DTM (things like size, scales, min/max z, ...)
static void jafar::dtm::Dtm::scaleZ | ( | const std::string & | orig, |
double | scale, | ||
const std::string & | res | ||
) | [static] |
This function generate a new dtm changing the scale_z setting (so it will expand or reduce the relief).
orig | is a const string representing the path of the dtm file origin |
scale | is the new scale |
res | is a const string representing the path of the dtm result file |
void jafar::dtm::Dtm::set_z | ( | int | i, |
int | j, | ||
float | |||
) |
Set the z for a cell of the DTM.
i | is the line index in the DTM |
j | is the column index in the DTM |
z | is the value we want to set for this cell |
void jafar::dtm::Dtm::to_file | ( | const std::string & | path, |
const file_method | way | ||
) | const |
Write the current dtm in a file.
path | is a constant string representing the file we need to write |
way | is a constant file_method which describes how to write the file |
int jafar::dtm::Dtm::to_gdhe | ( | const std::string & | path, |
const gdhe_method | way | ||
) | const |
Dump the current DTM in a gdhe file (to future gdhe display)
path | is a constant string representing the file to write |
way | is a const gdhe_method which describes how to write the file |
jafar::image::Image* jafar::dtm::Dtm::to_image | ( | const image_method & | method, |
bool | global = true |
||
) | const |
This function generate a rgb image representating some interesting value stored in the dtm.
method | precise which information will be represented |
global | : if true, gave an image from the full dtm, if false the local dtm (only make sense in DTM_FILL_DYNAMIC |
void jafar::dtm::Dtm::write_image | ( | jafar::image::Image & | img, |
const image_method & | method, | ||
bool | global = true |
||
) | const |
This function generate a rgb image representing some interesting values stored in the dtm.
img | represents the image that will be written. It must be as large as the dtm |
method | precise which information will be represented |
global | : if true, gave an image from the full dtm, if false the local dtm (only make sense in DTM_FILL_DYNAMIC |
Generated on Wed Oct 15 2014 00:37:35 for Jafar by doxygen 1.7.6.1 |