A manager for displaying segmentation results. More...
#include <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_window * | get_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_manager * | instance () |
| 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_window * | win_ |
| 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_sptr > | polys_ |
| all the polygons in the world model. | |
| vcl_vector< vsol_polygon_2d_sptr > | proj_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_manager * | instance_ = 0 |
A manager for displaying segmentation results.
Definition at line 45 of file bmvv_cal_manager.h.
| bmvv_cal_manager::bmvv_cal_manager | ( | ) |
constructors/destructor.
Definition at line 63 of file bmvv_cal_manager.cxx.
| bmvv_cal_manager::~bmvv_cal_manager | ( | ) |
Definition at line 72 of file bmvv_cal_manager.cxx.
| 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 139 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 930 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::adjust_contrast | ( | ) |
viewing functions.
Definition at line 208 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::clear_correspondences | ( | ) | [protected] |
Definition at line 498 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::clear_display | ( | ) |
Clear the display.
Definition at line 226 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::clear_selected | ( | ) |
clear all selections in both panes.
Definition at line 236 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::clear_world | ( | ) |
clear all current world information.
Definition at line 1070 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::compute_ransac_homography | ( | ) |
Definition at line 806 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::confirm_polygon | ( | ) |
insert a created polygon into the world data structures.
Definition at line 945 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 995 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 242 of file bmvv_cal_manager.cxx.
| bool bmvv_cal_manager::draw_correspondences | ( | ) | [protected] |
Definition at line 468 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 982 of file bmvv_cal_manager.cxx.
| bool bmvv_cal_manager::draw_projected_world_points | ( | ) | [protected] |
Definition at line 511 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 790 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 772 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 963 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 531 of file bmvv_cal_manager.cxx.
| vgui_window* bmvv_cal_manager::get_window | ( | ) | [inline] |
access to the window.
Definition at line 108 of file bmvv_cal_manager.h.
| bool bmvv_cal_manager::handle | ( | const vgui_event & | e | ) | [virtual] |
the virtual handle function.
make an event handler.
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 96 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 80 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 50 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 343 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 165 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::load_image_and_camera | ( | ) |
Definition at line 321 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 120 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::load_world | ( | ) |
3-d points and polygons representing a world model.
Definition at line 416 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::map_image_to_world | ( | ) |
backproject an image onto the world plane.
Definition at line 893 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::pick_correspondence | ( | ) |
Definition at line 553 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::pick_polygon | ( | ) |
define a polygon on the create plane.
Definition at line 954 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 615 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 1038 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::project_world | ( | ) | [protected] |
Definition at line 633 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::quit | ( | ) |
| 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 255 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 485 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::remove_correspondence | ( | ) |
Definition at line 592 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::save_camera | ( | ) |
Definition at line 383 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::save_constraints | ( | ) |
Definition at line 907 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::save_corrs | ( | ) |
Definition at line 367 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::save_image | ( | ) |
Definition at line 180 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::save_world | ( | ) |
save the world information in cal format.
Definition at line 444 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 456 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::set_height | ( | ) |
set the create XY plane height (Z).
Definition at line 1060 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::set_identity_camera | ( | ) |
camera modeling.
Definition at line 407 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::set_range_params | ( | ) |
Definition at line 288 of file bmvv_cal_manager.cxx.
| void bmvv_cal_manager::set_window | ( | vgui_window * | win | ) | [inline] |
Definition at line 109 of file bmvv_cal_manager.h.
| void bmvv_cal_manager::solve_camera | ( | ) |
Definition at line 674 of file bmvv_cal_manager.cxx.
Definition at line 158 of file bmvv_cal_manager.h.
vgl_p_matrix<double> bmvv_cal_manager::cam_ [private] |
the current camera.
Definition at line 167 of file bmvv_cal_manager.h.
vcl_vector<vgui_soview2D_point* > bmvv_cal_manager::corr_sovs_ [private] |
Definition at line 164 of file bmvv_cal_manager.h.
vcl_vector<vgl_point_2d<double> > bmvv_cal_manager::corrs_ [private] |
Definition at line 161 of file bmvv_cal_manager.h.
vcl_vector<bool> bmvv_cal_manager::corrs_valid_ [private] |
Definition at line 162 of file bmvv_cal_manager.h.
double bmvv_cal_manager::height_ [private] |
the Z height of the create plane.
Definition at line 173 of file bmvv_cal_manager.h.
Definition at line 154 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 181 of file bmvv_cal_manager.h.
bmvv_cal_manager * bmvv_cal_manager::instance_ = 0 [static, private] |
Definition at line 160 of file bmvv_cal_manager.h.
Definition at line 156 of file bmvv_cal_manager.h.
the polygon just created.
Definition at line 175 of file bmvv_cal_manager.h.
vcl_map<int, int> bmvv_cal_manager::point_3d_map_ [private] |
Definition at line 159 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 177 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 169 of file bmvv_cal_manager.h.
vcl_vector<vgl_point_2d<double> > bmvv_cal_manager::proj_image_pts_ [private] |
Definition at line 163 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 179 of file bmvv_cal_manager.h.
Definition at line 157 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 171 of file bmvv_cal_manager.h.
vgui_window* bmvv_cal_manager::win_ [private] |
Definition at line 155 of file bmvv_cal_manager.h.
vcl_vector<vgl_point_3d<double> > bmvv_cal_manager::world_ [private] |
Definition at line 165 of file bmvv_cal_manager.h.
1.7.5.1