Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

bmvv_cal_manager Class Reference

#include <bmvv_cal_manager.h>

Inheritance diagram for bmvv_cal_manager:

Inheritance graph
[legend]
List of all members.

Detailed Description

A manager for displaying segmentation results.

Definition at line 43 of file bmvv_cal_manager.h.

Public Member Functions

 bmvv_cal_manager ()
 constructors/destructor.
 ~bmvv_cal_manager ()
void quit ()
 methods for menu callbacks.
void load_image ()
 load an image an put it in the currently selected grid cell.
void save_image ()
void load_world ()
 3-d points and polygons representing a world model.
void adjust_contrast ()
 viewing functions.
void set_range_params ()
void clear_display ()
 Clear the display.
void clear_selected ()
 clear all selections in both panes.
void load_image_and_camera ()
void load_corrs ()
 pairs of corresponding 2-d image and 3-d world points.
void save_corrs ()
void pick_correspondence ()
void remove_correspondence ()
void pick_vertical ()
 world-to-image correspondences and vertical lines for constrained cameras.
void save_constraints ()
void set_identity_camera ()
 camera modeling.
void solve_camera ()
void compute_ransac_homography ()
void save_camera ()
void map_image_to_world ()
 backproject an image onto the world plane.
void set_height ()
 set the create XY plane height (Z).
void pick_polygon ()
 define a polygon on the create plane.
void clear_world ()
 clear all current world information.
void confirm_polygon ()
 insert a created polygon into the world data structures.
void save_world ()
 save the world information in cal format.
void save_world_ply2 ()
 save the world information in ply2 format (a single indexed face set).
void read_world_ply2 ()
 read the world information in ply2 format (a single indexed face set).
void ply2_to_vrml ()
 Convert boxes in a merged indexed face set to individual boxes in VRML.
void create_box ()
 Create a box in the world from three top face corner points on the create plane. The bottom plane is at Z=0.
vgui_windowget_window ()
 access to the window.
void set_window (vgui_window *win)
void init ()
 set up the tableaux at each grid cell.
virtual bool handle (const vgui_event &)
 the virtual handle function.
void load_image_file (vcl_string image_filename, bool greyscale)
 load an image an put it in the currently selected grid cell.
bool add_child (vgui_tableau_sptr const &)
bool remove_child (vgui_tableau_sptr const &)
vcl_string file_name () const
vcl_string pretty_name () const
vcl_string type_name () const
bool get_bounding_box (float low[3], float high[3]) const
virtual vcl_string name () const
void get_parents (vcl_vector< vgui_tableau_sptr > *out) const
void get_children (vcl_vector< vgui_tableau_sptr > *out) const
vgui_tableau_sptr get_child (unsigned i) const
virtual bool notify_replaced_child (vgui_tableau_sptr const &old_child, vgui_tableau_sptr const &new_child)
virtual void add_popup (vgui_menu &)
virtual void get_popup (vgui_popup_params const &, vgui_menu &)
virtual void post_message (char const *, void const *)
virtual void post_redraw ()
virtual void post_overlay_redraw ()
virtual void post_idle_request ()
virtual bool draw ()
virtual bool mouse_down (int x, int y, vgui_button, vgui_modifier)
virtual bool mouse_up (int x, int y, vgui_button, vgui_modifier)
virtual bool motion (int x, int y)
virtual bool key_press (int x, int y, vgui_key, vgui_modifier)
virtual bool help ()
virtual bool idle ()
void ref () const
void unref () const

Static Public Member Functions

static bmvv_cal_managerinstance ()
 The singleton pattern - only one instance of the manager can occur.
static void get_all (vcl_vector< vgui_tableau_sptr > *out)
static bool exists (vgui_tableau_sptr const &)

Public Attributes

vgui_parent_child_link child

Protected Member Functions

void draw_corr_point (const float x, const float y)
 internal utility methods.
void draw_vsol_points (const int cam, vcl_vector< vsol_point_2d_sptr > const &points, bool clear=true, const float r=0, const float g=1, const float b=0)
void draw_vsol_point (const int cam, vsol_point_2d_sptr const &point, bool clear=false, const float r=0, const float g=1, const float b=0)
void draw_vsol_polygon_3d (vsol_polygon_3d_sptr const &poly, bool clear, const float r=0, const float g=1, const float b=0)
void draw_polygons_3d (bool clear, const float r, const float g, const float b)
void add_image (vil_image_resource_sptr const &image, vgui_range_map_params_sptr rmps=0, bool greyscale=false)
vil1_image get_image_at (unsigned col, unsigned row)
bool read_corrs (vcl_ifstream &str)
bool draw_correspondences ()
bool draw_projected_world_points ()
void add_poly_vertices_to_world_pts (vsol_polygon_3d_sptr const &poly)
void clear_correspondences ()
void project_world ()
int get_selected_proj_world_pt (vgl_point_2d< double > &pt)
vgui_range_map_params_sptr range_params (vil_image_resource_sptr const &image)
 Calculate the range parameters for the input image.

Private Attributes

vil_image_resource_sptr img_
vgui_windowwin_
bgui_image_tableau_sptr itab_
bgui_picker_tableau_sptr ptab_
bgui_vtol2D_tableau_sptr btab_
vcl_map< int, int > point_3d_map_
vcl_vector< vgl_point_2d<
double > > 
corrs_
vcl_vector< bool > corrs_valid_
vcl_vector< vgl_point_2d<
double > > 
proj_image_pts_
vcl_vector< vgui_soview2D_point * > corr_sovs_
vcl_vector< vgl_point_3d<
double > > 
world_
vgl_p_matrix< double > cam_
 the current camera.
vgl_p_matrix< double > prev_cam_
 the previous camera before the current solution.
vcl_vector< vgl_line_segment_2d<
double > > 
verticals_
 lines in the image corresponding to the vertical direction.
double height_
 the Z height of the create plane.
vsol_polygon_3d_sptr new_poly_
 the polygon just created.
vcl_vector< vsol_polygon_3d_sptrpolys_
 all the polygons in the world model.
vcl_vector< vsol_polygon_2d_sptrproj_polys_
 the 2-d projected form of the polygons.
vcl_vector< vcl_vector< unsigned > > indexed_face_set_
 an indexed face set for all the polygons in the world.

Static Private Attributes

static bmvv_cal_managerinstance_ = 0


Constructor & Destructor Documentation

bmvv_cal_manager::bmvv_cal_manager  ) 
 

constructors/destructor.

Definition at line 58 of file bmvv_cal_manager.cxx.

bmvv_cal_manager::~bmvv_cal_manager  ) 
 

Definition at line 67 of file bmvv_cal_manager.cxx.


Member Function Documentation

void bmvv_cal_manager::add_image vil_image_resource_sptr const &  image,
vgui_range_map_params_sptr  rmps = 0,
bool  greyscale = false
[protected]
 

Definition at line 134 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::add_poly_vertices_to_world_pts vsol_polygon_3d_sptr const &  poly  )  [protected]
 

Definition at line 923 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::adjust_contrast  ) 
 

viewing functions.

Definition at line 203 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::clear_correspondences  )  [protected]
 

Definition at line 493 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::clear_display  ) 
 

Clear the display.

Definition at line 221 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::clear_selected  ) 
 

clear all selections in both panes.

Definition at line 231 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::clear_world  ) 
 

clear all current world information.

Definition at line 1061 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::compute_ransac_homography  ) 
 

Definition at line 801 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::confirm_polygon  ) 
 

insert a created polygon into the world data structures.

Definition at line 938 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::create_box  ) 
 

Create a box in the world from three top face corner points on the create plane. The bottom plane is at Z=0.

Definition at line 986 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::draw_corr_point const float  x,
const float  y
[protected]
 

internal utility methods.

Definition at line 237 of file bmvv_cal_manager.cxx.

bool bmvv_cal_manager::draw_correspondences  )  [protected]
 

Definition at line 463 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::draw_polygons_3d bool  clear,
const float  r,
const float  g,
const float  b
[protected]
 

Definition at line 973 of file bmvv_cal_manager.cxx.

bool bmvv_cal_manager::draw_projected_world_points  )  [protected]
 

Definition at line 506 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::draw_vsol_point const int  cam,
vsol_point_2d_sptr const &  point,
bool  clear = false,
const float  r = 0,
const float  g = 1,
const float  b = 0
[protected]
 

Definition at line 785 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::draw_vsol_points const int  cam,
vcl_vector< vsol_point_2d_sptr > const &  points,
bool  clear = true,
const float  r = 0,
const float  g = 1,
const float  b = 0
[protected]
 

Definition at line 767 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::draw_vsol_polygon_3d vsol_polygon_3d_sptr const &  poly,
bool  clear,
const float  r = 0,
const float  g = 1,
const float  b = 0
[protected]
 

Definition at line 956 of file bmvv_cal_manager.cxx.

vil1_image bmvv_cal_manager::get_image_at unsigned  col,
unsigned  row
[protected]
 

int bmvv_cal_manager::get_selected_proj_world_pt vgl_point_2d< double > &  pt  )  [protected]
 

Definition at line 526 of file bmvv_cal_manager.cxx.

vgui_window* bmvv_cal_manager::get_window  )  [inline]
 

access to the window.

Definition at line 106 of file bmvv_cal_manager.h.

bool bmvv_cal_manager::handle const vgui_event e  )  [virtual]
 

the virtual handle function.

Note that we have to get an adaptor and set the tableau to receive events this handler does nothing but is a place holder for future event processing For now, just pass the events down to the child tableaux

Reimplemented from vgui_wrapper_tableau.

Definition at line 91 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::init  ) 
 

set up the tableaux at each grid cell.

The vtol2D_tableaux have been initialized in the constructor

Definition at line 75 of file bmvv_cal_manager.cxx.

bmvv_cal_manager * bmvv_cal_manager::instance  )  [static]
 

The singleton pattern - only one instance of the manager can occur.

Definition at line 45 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::load_corrs  ) 
 

pairs of corresponding 2-d image and 3-d world points.

Definition at line 338 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::load_image  ) 
 

load an image an put it in the currently selected grid cell.

Definition at line 160 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::load_image_and_camera  ) 
 

Definition at line 316 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::load_image_file vcl_string  image_filename,
bool  greyscale
 

load an image an put it in the currently selected grid cell.

Definition at line 115 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::load_world  ) 
 

3-d points and polygons representing a world model.

Definition at line 411 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::map_image_to_world  ) 
 

backproject an image onto the world plane.

Definition at line 886 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::pick_correspondence  ) 
 

Definition at line 548 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::pick_polygon  ) 
 

define a polygon on the create plane.

Definition at line 947 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::pick_vertical  ) 
 

world-to-image correspondences and vertical lines for constrained cameras.

Definition at line 610 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::ply2_to_vrml  ) 
 

Convert boxes in a merged indexed face set to individual boxes in VRML.

(A temporary tool to unmerge files consisting of all boxes)

Definition at line 1029 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::project_world  )  [protected]
 

Definition at line 628 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::quit  ) 
 

methods for menu callbacks.

Definition at line 108 of file bmvv_cal_manager.cxx.

vgui_range_map_params_sptr bmvv_cal_manager::range_params vil_image_resource_sptr const &  image  )  [protected]
 

Calculate the range parameters for the input image.

Definition at line 250 of file bmvv_cal_manager.cxx.

bool bmvv_cal_manager::read_corrs vcl_ifstream &  str  )  [protected]
 

void bmvv_cal_manager::read_world_ply2  ) 
 

read the world information in ply2 format (a single indexed face set).

Definition at line 480 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::remove_correspondence  ) 
 

Definition at line 587 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::save_camera  ) 
 

Definition at line 378 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::save_constraints  ) 
 

Definition at line 900 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::save_corrs  ) 
 

Definition at line 362 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::save_image  ) 
 

Definition at line 175 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::save_world  ) 
 

save the world information in cal format.

Definition at line 439 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::save_world_ply2  ) 
 

save the world information in ply2 format (a single indexed face set).

Definition at line 451 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::set_height  ) 
 

set the create XY plane height (Z).

Definition at line 1051 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::set_identity_camera  ) 
 

camera modeling.

Definition at line 402 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::set_range_params  ) 
 

Definition at line 283 of file bmvv_cal_manager.cxx.

void bmvv_cal_manager::set_window vgui_window win  )  [inline]
 

Definition at line 107 of file bmvv_cal_manager.h.

void bmvv_cal_manager::solve_camera  ) 
 

Definition at line 669 of file bmvv_cal_manager.cxx.


Member Data Documentation

bgui_vtol2D_tableau_sptr bmvv_cal_manager::btab_ [private]
 

Definition at line 156 of file bmvv_cal_manager.h.

vgl_p_matrix<double> bmvv_cal_manager::cam_ [private]
 

the current camera.

Definition at line 165 of file bmvv_cal_manager.h.

vcl_vector<vgui_soview2D_point* > bmvv_cal_manager::corr_sovs_ [private]
 

Definition at line 162 of file bmvv_cal_manager.h.

vcl_vector<vgl_point_2d<double> > bmvv_cal_manager::corrs_ [private]
 

Definition at line 159 of file bmvv_cal_manager.h.

vcl_vector<bool> bmvv_cal_manager::corrs_valid_ [private]
 

Definition at line 160 of file bmvv_cal_manager.h.

double bmvv_cal_manager::height_ [private]
 

the Z height of the create plane.

Definition at line 171 of file bmvv_cal_manager.h.

vil_image_resource_sptr bmvv_cal_manager::img_ [private]
 

Definition at line 152 of file bmvv_cal_manager.h.

vcl_vector<vcl_vector<unsigned> > bmvv_cal_manager::indexed_face_set_ [private]
 

an indexed face set for all the polygons in the world.

Definition at line 179 of file bmvv_cal_manager.h.

bmvv_cal_manager * bmvv_cal_manager::instance_ = 0 [static, private]
 

Definition at line 158 of file bmvv_cal_manager.h.

bgui_image_tableau_sptr bmvv_cal_manager::itab_ [private]
 

Definition at line 154 of file bmvv_cal_manager.h.

vsol_polygon_3d_sptr bmvv_cal_manager::new_poly_ [private]
 

the polygon just created.

Definition at line 173 of file bmvv_cal_manager.h.

vcl_map<int, int> bmvv_cal_manager::point_3d_map_ [private]
 

Definition at line 157 of file bmvv_cal_manager.h.

vcl_vector<vsol_polygon_3d_sptr> bmvv_cal_manager::polys_ [private]
 

all the polygons in the world model.

Definition at line 175 of file bmvv_cal_manager.h.

vgl_p_matrix<double> bmvv_cal_manager::prev_cam_ [private]
 

the previous camera before the current solution.

Definition at line 167 of file bmvv_cal_manager.h.

vcl_vector<vgl_point_2d<double> > bmvv_cal_manager::proj_image_pts_ [private]
 

Definition at line 161 of file bmvv_cal_manager.h.

vcl_vector<vsol_polygon_2d_sptr> bmvv_cal_manager::proj_polys_ [private]
 

the 2-d projected form of the polygons.

Definition at line 177 of file bmvv_cal_manager.h.

bgui_picker_tableau_sptr bmvv_cal_manager::ptab_ [private]
 

Definition at line 155 of file bmvv_cal_manager.h.

vcl_vector<vgl_line_segment_2d<double> > bmvv_cal_manager::verticals_ [private]
 

lines in the image corresponding to the vertical direction.

Definition at line 169 of file bmvv_cal_manager.h.

vgui_window* bmvv_cal_manager::win_ [private]
 

Definition at line 153 of file bmvv_cal_manager.h.

vcl_vector<vgl_point_3d<double> > bmvv_cal_manager::world_ [private]
 

Definition at line 163 of file bmvv_cal_manager.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:54:21 2008 for contrib/brl/bmvl/bmvv by  doxygen 1.4.4