OmniFastLookupTable Class Reference

#include <OmniFastLookupTable.hh>

Collaboration diagram for OmniFastLookupTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

Perhaps the most useful class of the library, it gives us a panoramic image given an omnidirectional one. The conversion is at most independent from the mirror used.

Definition at line 44 of file OmniFastLookupTable.hh.

Public Member Functions

 OmniFastLookupTable (int min_radius, int max_radius, int omni_center_x_pixel, int omni_center_y_pixel, double theta_step=0, bool flipped_mode=false)
 Constructor.
virtual ~OmniFastLookupTable ()
void angle_type_conversion (const OmniAngle< double > &in_double_interval, OmniAngle< int > &out_int_interval)
 Convert an OmniAngle object from its <double> version ot its <int>.
IplImage * omni2pano (IplImage *omni_frame, const OmniAngle< int > &IN_interval)
 Conversion between omni frame and panoramic one.
void pano2omni_xy (CvPoint *pano_point, int theta_start, CvPoint *omni_point)
 Converts a panoimage xy coord to a omniimage xy coord.
int get_min_radius ()
int get_max_radius ()
int get_omni_center_x ()
int get_omni_center_y ()
bool is_initialized ()
 Specify whether the class is initialized or not.

Private Types

typedef OmniFastLookupTable::_image_coord_xy pano_coord_xy
typedef OmniFastLookupTable::_image_coord_xypano_coord_xy_ptr
typedef OmniFastLookupTable::_image_coord_xy omni_coord_xy
typedef OmniFastLookupTable::_image_coord_xyomni_coord_xy_ptr

Private Member Functions

bool omnipano_lookup_table_make ()
 Build the pre-computed values.

Private Attributes

OmniFastLookupTable::_omni_bounds omni_bounds
OmniFastLookupTable::_pano_bounds pano_bounds
 Lookup table for panoramic image.
double _theta_step
int _theta_max
int _min_radius
int _max_radius
int _min_to_max_radius_range
bool _flipped_mode
 Should be the final panoramic image be flipped?
int _omni_center_x_rgb
 center pixel coord in omnidirectional image.
int _omni_center_y_rgb
 center pixel coord in omnidirectional image.
int _omni_center_x
int _omni_center_y
bool _is_valid
 Specify whether the class is initialized or not.

Classes

struct  _image_coord_xy
struct  _omni_bounds
struct  _pano_bounds
 Lookup table for panoramic image. More...


Member Typedef Documentation

typedef struct OmniFastLookupTable::_image_coord_xy OmniFastLookupTable::omni_coord_xy [private]

typedef struct OmniFastLookupTable::_image_coord_xy * OmniFastLookupTable::omni_coord_xy_ptr [private]

typedef struct OmniFastLookupTable::_image_coord_xy OmniFastLookupTable::pano_coord_xy [private]

typedef struct OmniFastLookupTable::_image_coord_xy * OmniFastLookupTable::pano_coord_xy_ptr [private]


Constructor & Destructor Documentation

OmniFastLookupTable::OmniFastLookupTable ( int  min_radius,
int  max_radius,
int  omni_center_x_pixel,
int  omni_center_y_pixel,
double  theta_step = 0,
bool  flipped_mode = false 
)

Parameters:
min_radius Minimum radius to consider in an omnidirectional Image. This is done to avoid the super-definition of the pixels near the center.
max_radius The same as min_radius but for the external side.
omni_center_x_pixel The x-coordinate that represent the center of the omnidirectional image. It may differ from the normal image center.
omni_center_y_pixel The y-coordinate that represent the center of the omnidirectional image. It may differ from the normal image center.
theta_step If 0 it's autocomputed. Usually 1/max_radius. Used to known the theta step in double precision.
flipped_mode Should the result panoramic image be flipped? This option is useful for special omnidirectional images and flipped mirrors.

Definition at line 27 of file OmniFastLookupTable.cpp.

References _is_valid, _max_radius, _min_radius, _min_to_max_radius_range, _theta_max, _theta_step, and omnipano_lookup_table_make().

Here is the call graph for this function:

OmniFastLookupTable::~OmniFastLookupTable (  )  [virtual]

Definition at line 68 of file OmniFastLookupTable.cpp.

References pano_bounds, OmniFastLookupTable::_pano_bounds::pano_data, and OmniFastLookupTable::_pano_bounds::width.


Member Function Documentation

void OmniFastLookupTable::angle_type_conversion ( const OmniAngle< double > &  in_double_interval,
OmniAngle< int > &  out_int_interval 
)

Parameters:
in_double_interval Input angle.
out_int_interval Output converted angle.

Definition at line 99 of file OmniFastLookupTable.cpp.

References _max_radius, _theta_max, OmniAngle< TypeT >::angle_end, OmniAngle< TypeT >::angle_start, is_initialized(), and OmniAngle< TypeT >::range.

Here is the call graph for this function:

int OmniFastLookupTable::get_max_radius (  ) 

Definition at line 324 of file OmniFastLookupTable.cpp.

References _max_radius.

int OmniFastLookupTable::get_min_radius (  ) 

Definition at line 317 of file OmniFastLookupTable.cpp.

References _min_radius.

int OmniFastLookupTable::get_omni_center_x (  ) 

Definition at line 331 of file OmniFastLookupTable.cpp.

References _omni_center_x.

int OmniFastLookupTable::get_omni_center_y (  ) 

Definition at line 338 of file OmniFastLookupTable.cpp.

References _omni_center_y.

bool OmniFastLookupTable::is_initialized (  ) 

Definition at line 91 of file OmniFastLookupTable.cpp.

References _is_valid.

Referenced by angle_type_conversion(), StreamerCtrlThread::initializeOmniStuff(), ReceiverCtrlThread::initializeOmniStuff(), and omni2pano().

Here is the caller graph for this function:

IplImage * OmniFastLookupTable::omni2pano ( IplImage *  omni_frame,
const OmniAngle< int > &  IN_interval 
)

The great thing about this template is that you can overload as many time as you want this function, without change the main template.

Parameters:
omni_frame Frame of an omnidirectional image you want to convert to panoramic one.
IN_interval part of angle you want to convert to panoramic. It can also be specified as a 360 degree angle.

Definition at line 148 of file OmniFastLookupTable.cpp.

References _flipped_mode, _max_radius, _min_radius, _min_to_max_radius_range, _theta_max, OmniAngle< TypeT >::angle_start, DEBUG_PRINT, is_initialized(), NULL, OMNI_COORD, PANO_COORD, and OmniAngle< TypeT >::range.

Here is the call graph for this function:

bool OmniFastLookupTable::omnipano_lookup_table_make (  )  [private]

Definition at line 232 of file OmniFastLookupTable.cpp.

References _max_radius, _min_radius, _omni_center_x_rgb, _omni_center_y_rgb, _theta_step, DEBUG_PRINT, OmniFastLookupTable::_pano_bounds::height, pano_bounds, OmniFastLookupTable::_pano_bounds::pano_data, OmniFastLookupTable::_pano_bounds::width, OmniFastLookupTable::_image_coord_xy::x_rgb, and OmniFastLookupTable::_image_coord_xy::y_rgb.

Referenced by OmniFastLookupTable().

Here is the caller graph for this function:

void OmniFastLookupTable::pano2omni_xy ( CvPoint *  pano_point,
int  theta_start,
CvPoint *  omni_point 
)

This function is useful if you want to pass from a omni2pano's image point with a start_angle theta back to the point of the original omni image.

Parameters:
pano_point The point in the panoramic image we want to convert.
theta_start The angle of the point.
omni_point The resulting point.
Note:
Often this function does not return the *exact* point.
Bug:
Should be revised and tested more.

Definition at line 299 of file OmniFastLookupTable.cpp.

References _max_radius, _min_radius, _omni_center_x, and _omni_center_y.


Member Data Documentation

bool OmniFastLookupTable::_flipped_mode [private]

Definition at line 162 of file OmniFastLookupTable.hh.

Referenced by omni2pano().

bool OmniFastLookupTable::_is_valid [private]

Definition at line 180 of file OmniFastLookupTable.hh.

Referenced by is_initialized(), and OmniFastLookupTable().

int OmniFastLookupTable::_max_radius [private]

Definition at line 158 of file OmniFastLookupTable.hh.

Referenced by angle_type_conversion(), get_max_radius(), omni2pano(), OmniFastLookupTable(), omnipano_lookup_table_make(), and pano2omni_xy().

int OmniFastLookupTable::_min_radius [private]

Definition at line 157 of file OmniFastLookupTable.hh.

Referenced by get_min_radius(), omni2pano(), OmniFastLookupTable(), omnipano_lookup_table_make(), and pano2omni_xy().

int OmniFastLookupTable::_min_to_max_radius_range [private]

Definition at line 159 of file OmniFastLookupTable.hh.

Referenced by omni2pano(), and OmniFastLookupTable().

int OmniFastLookupTable::_omni_center_x [private]

Definition at line 176 of file OmniFastLookupTable.hh.

Referenced by get_omni_center_x(), and pano2omni_xy().

int OmniFastLookupTable::_omni_center_x_rgb [private]

These are used to fix the omniimage center's position, that can be not exact the same as the real omniimage

Definition at line 168 of file OmniFastLookupTable.hh.

Referenced by omnipano_lookup_table_make().

int OmniFastLookupTable::_omni_center_y [private]

Definition at line 177 of file OmniFastLookupTable.hh.

Referenced by get_omni_center_y(), and pano2omni_xy().

int OmniFastLookupTable::_omni_center_y_rgb [private]

These are used to fix the omniimage center's position, that can be not exact the same as the real omniimage

Definition at line 174 of file OmniFastLookupTable.hh.

Referenced by omnipano_lookup_table_make().

int OmniFastLookupTable::_theta_max [private]

Definition at line 156 of file OmniFastLookupTable.hh.

Referenced by angle_type_conversion(), omni2pano(), and OmniFastLookupTable().

double OmniFastLookupTable::_theta_step [private]

Definition at line 155 of file OmniFastLookupTable.hh.

Referenced by OmniFastLookupTable(), and omnipano_lookup_table_make().

struct OmniFastLookupTable::_omni_bounds OmniFastLookupTable::omni_bounds [private]

struct OmniFastLookupTable::_pano_bounds OmniFastLookupTable::pano_bounds [private]

Referenced by omnipano_lookup_table_make(), and ~OmniFastLookupTable().


The documentation for this class was generated from the following files:
Generated on Tue Dec 26 10:37:44 2006 for Omnimeeting by  doxygen 1.4.7