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

bmrf_network_builder Class Reference

#include <bmrf_network_builder.h>

Inheritance diagram for bmrf_network_builder:

Inheritance graph
[legend]
List of all members.

Detailed Description

Definition at line 32 of file bmrf_network_builder.h.

Public Member Functions

 bmrf_network_builder (bmrf_network_builder_params &tp)
 constructor from a parameter block (the only way).
 ~bmrf_network_builder ()
 Default Destructor.
bmrf_network_sptr network ()
 get the completed network.
void init ()
 initialize the builder.
void set_image (vil_image_view< float > const &image)
 specify the image for the current frame.
void set_edges (int frame, vcl_vector< vtol_edge_2d_sptr > const &edges)
 set the edge segmentation for the current frame.
void epi_coords (const double u, const double v, double &alpha, double &s) const
 convert image coordinates to epipolar coordinates.
bool image_coords (const double a, const double s, double &u, double &v) const
 convert epipolar coordinates to image coordinates.
bool build ()
 the main process method.
bool SanityCheck ()
 Checks that parameters are within acceptable bounds.
bool Valid ()
const char * GetErrorMsg ()
void SetErrorMsg (const char *msg)

Public Attributes

float eu_
 col position of the epipole
float ev_
 row position of the epipole
int elu_
 col position of the epipolar parameter space
int elv_min_
 minimum row position of the epipolar space
int elv_max_
 maximum row position of the epipolar space
int Ns_
 number of intensity samples in s of an unbounded region
float max_delta_recip_s_
 maximum difference of reciprocals of s for time neighbors

Protected Member Functions

float scan_interval (float xs, float ys, float xe, float ye, int &npix)
bool scan_intensity_info (bmrf_epi_point_sptr const &pm1, bmrf_epi_point_sptr p, bmrf_epi_point_sptr const &pp1)
bool inside_epipolar_wedge (vdgl_digital_curve_sptr const &dc)
 Test if a digital curve is entirely inside the epipolar wedge.
bool extract_alpha_segments (vdgl_digital_curve_sptr const &dc, vcl_vector< bmrf_epi_seg_sptr > &epi_segs)
 Scan the input digital curve and produce monotonic alpha sequences.
bool compute_segments ()
bool intensity_candidates (const bmrf_epi_seg_sptr &seg, vcl_set< bmrf_epi_seg_sptr > &left_cand, vcl_set< bmrf_epi_seg_sptr > &right_cand) const
 find the candidate bounding neighbors for intensity scans.
double radius (const double s) const
 the radius for intensity sampling.
double find_left_s (const double a, const double s, vcl_set< bmrf_epi_seg_sptr > const &cand) const
 find the closest left bounding segment s value.
double find_right_s (const double a, const double s, vcl_set< bmrf_epi_seg_sptr > const &cand) const
 find the closest right bounding segment s value.
double ds (const double s) const
double scan_interval (const double a, const double sl, const double s) const
 Find the average intensity for given s limits on a line of constant alpha.
double scan_left (double a, double s, vcl_set< bmrf_epi_seg_sptr > const &left_cand, double &ds) const
double scan_right (double a, double s, vcl_set< bmrf_epi_seg_sptr > const &right_cand, double &ds) const
bool fill_intensity_values (bmrf_epi_seg_sptr &seg)
 scan the segment and sample intensity values in the region.
bool set_intensity_info ()
 set the intensity data for the epi segments on this frame.
bool add_frame_nodes ()
 Add the current nodes to the network.
bool time_neighbors (bmrf_node_sptr const &node, vcl_set< bmrf_node_sptr > &neighbors) const
 Find the neighbors of a node in time from the previous frame.
bool assign_neighbors ()
 Assign neighbors to nodes. For now just select a range of.
void InitParams (float eu, float ev, int elu, int elv_min, int elv_max, int Ns, float max_delta_recip_s)

Protected Attributes

bool network_valid_
 network building status flags.
int frame_
 the current frame index.
double du_
 the increment in image column dimension.
double da_
 the increment in epipolar angle.
double alpha_min_
 the minimum alpha bound.
double alpha_inv_
 the alpha scale factor to map alpha onto [0, 1].
double smax_
 the maximum distance from the epipole in the image.
vgl_point_2d< double > epi_
 the epipole.
vnl_double_3 upper_wedge_line_
 the homogeneous coordinates of the upper epipolar wedge limit.
vnl_double_3 lower_wedge_line_
 the homogeneous coordinates of the lower epipolar wedge limit.
vil_image_view< float > image_
 the image for the current frame.
vcl_vector< vtol_edge_2d_sptredges_
 the edges for current frame.
bmrf_network_sptr network_
 the network under construction.
vcl_vector< bmrf_epi_seg_sptrepi_segs_
 temporary arrays for building the intensity information.
vcl_multimap< double, bmrf_node_sptrs_node_map_
 map s ranges to nodes.
vcl_multimap< double, bmrf_node_sptrprev_s_node_map_
 map s ranges to nodes for the previous frame.

Friends

vcl_ostream & operator<< (vcl_ostream &, const bmrf_network_builder_params &tp)


Constructor & Destructor Documentation

bmrf_network_builder::bmrf_network_builder bmrf_network_builder_params tp  ) 
 

constructor from a parameter block (the only way).

Definition at line 32 of file bmrf_network_builder.cxx.

bmrf_network_builder::~bmrf_network_builder  ) 
 

Default Destructor.

Definition at line 66 of file bmrf_network_builder.cxx.


Member Function Documentation

bool bmrf_network_builder::add_frame_nodes  )  [protected]
 

Add the current nodes to the network.

Definition at line 527 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::assign_neighbors  )  [protected]
 

Assign neighbors to nodes. For now just select a range of.

neighbors from alpha and s in the previous frame, i.e., no in-frame neighbors.

Definition at line 610 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::build  ) 
 

the main process method.

Definition at line 644 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::compute_segments  )  [protected]
 

see if the curve is inside the epipolar wedge.

Definition at line 253 of file bmrf_network_builder.cxx.

double bmrf_network_builder::ds const double  s  )  const [protected]
 

Definition at line 439 of file bmrf_network_builder.cxx.

void bmrf_network_builder::epi_coords const double  u,
const double  v,
double &  alpha,
double &  s
const
 

convert image coordinates to epipolar coordinates.

Definition at line 85 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::extract_alpha_segments vdgl_digital_curve_sptr const &  dc,
vcl_vector< bmrf_epi_seg_sptr > &  epi_segs
[protected]
 

Scan the input digital curve and produce monotonic alpha sequences.

Definition at line 187 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::fill_intensity_values bmrf_epi_seg_sptr seg  )  [protected]
 

scan the segment and sample intensity values in the region.

bounded by the closest left and right segments or by the limiting scale.

Definition at line 492 of file bmrf_network_builder.cxx.

double bmrf_network_builder::find_left_s const double  a,
const double  s,
vcl_set< bmrf_epi_seg_sptr > const &  cand
const [protected]
 

find the closest left bounding segment s value.

Definition at line 383 of file bmrf_network_builder.cxx.

double bmrf_network_builder::find_right_s const double  a,
const double  s,
vcl_set< bmrf_epi_seg_sptr > const &  cand
const [protected]
 

find the closest right bounding segment s value.

Definition at line 412 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::image_coords const double  a,
const double  s,
double &  u,
double &  v
const
 

convert epipolar coordinates to image coordinates.

Note:
if u or v are outside the image return false.

Definition at line 287 of file bmrf_network_builder.cxx.

void bmrf_network_builder::init  ) 
 

initialize the builder.

Definition at line 112 of file bmrf_network_builder.cxx.

void bmrf_network_builder_params::InitParams float  eu,
float  ev,
int  elu,
int  elv_min,
int  elv_max,
int  Ns,
float  max_delta_recip_s
[protected, inherited]
 

Definition at line 46 of file bmrf_network_builder_params.cxx.

bool bmrf_network_builder::inside_epipolar_wedge vdgl_digital_curve_sptr const &  dc  )  [protected]
 

Test if a digital curve is entirely inside the epipolar wedge.

defined for processing.

see if the box is below the upper wedge line.

see if the box is above the lower wedge line.

form inside.

Definition at line 219 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::intensity_candidates const bmrf_epi_seg_sptr seg,
vcl_set< bmrf_epi_seg_sptr > &  left_cand,
vcl_set< bmrf_epi_seg_sptr > &  right_cand
const [protected]
 

find the candidate bounding neighbors for intensity scans.

All intensity bound candidates, x, must satisfy: x_alpha_min < alpha_max and x_alpha_max > alpha_min

Candidates for the left scan must satisfy x_s_max > s_min - r x_s_min < s_max

Candidates for the right scan also must satisfy x_s_min < s_max x_s_max > s_min + r

Definition at line 319 of file bmrf_network_builder.cxx.

bmrf_network_sptr bmrf_network_builder::network  ) 
 

get the completed network.

Definition at line 663 of file bmrf_network_builder.cxx.

double bmrf_network_builder::radius const double  s  )  const [protected]
 

the radius for intensity sampling.

Definition at line 375 of file bmrf_network_builder.cxx.

bool bmrf_network_builder_params::SanityCheck  )  [virtual, inherited]
 

Checks that parameters are within acceptable bounds.

Note that msg << ends seems to restart the string and erase the previous string. We should only use it as the last call, use vcl_endl otherwise.

Reimplemented from gevd_param_mixin.

Definition at line 69 of file bmrf_network_builder_params.cxx.

bool bmrf_network_builder::scan_intensity_info bmrf_epi_point_sptr const &  pm1,
bmrf_epi_point_sptr  p,
bmrf_epi_point_sptr const &  pp1
[protected]
 

double bmrf_network_builder::scan_interval const double  a,
const double  sl,
const double  s
const [protected]
 

Find the average intensity for given s limits on a line of constant alpha.

Definition at line 445 of file bmrf_network_builder.cxx.

float bmrf_network_builder::scan_interval float  xs,
float  ys,
float  xe,
float  ye,
int &  npix
[protected]
 

double bmrf_network_builder::scan_left double  a,
double  s,
vcl_set< bmrf_epi_seg_sptr > const &  left_cand,
double &  ds
const [protected]
 

Definition at line 470 of file bmrf_network_builder.cxx.

double bmrf_network_builder::scan_right double  a,
double  s,
vcl_set< bmrf_epi_seg_sptr > const &  right_cand,
double &  ds
const [protected]
 

Definition at line 480 of file bmrf_network_builder.cxx.

void bmrf_network_builder::set_edges int  frame,
vcl_vector< vtol_edge_2d_sptr > const &  edges
 

set the edge segmentation for the current frame.

Definition at line 103 of file bmrf_network_builder.cxx.

void bmrf_network_builder::set_image vil_image_view< float > const &  image  ) 
 

specify the image for the current frame.

Definition at line 97 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::set_intensity_info  )  [protected]
 

set the intensity data for the epi segments on this frame.

Definition at line 514 of file bmrf_network_builder.cxx.

bool bmrf_network_builder::time_neighbors bmrf_node_sptr const &  node,
vcl_set< bmrf_node_sptr > &  neighbors
const [protected]
 

Find the neighbors of a node in time from the previous frame.

Definition at line 567 of file bmrf_network_builder.cxx.


Friends And Related Function Documentation

vcl_ostream& operator<< vcl_ostream &  os,
const bmrf_network_builder_params tp
[friend, inherited]
 

Definition at line 80 of file bmrf_network_builder_params.cxx.


Member Data Documentation

double bmrf_network_builder::alpha_inv_ [protected]
 

the alpha scale factor to map alpha onto [0, 1].

Definition at line 123 of file bmrf_network_builder.h.

double bmrf_network_builder::alpha_min_ [protected]
 

the minimum alpha bound.

Definition at line 120 of file bmrf_network_builder.h.

double bmrf_network_builder::da_ [protected]
 

the increment in epipolar angle.

Definition at line 117 of file bmrf_network_builder.h.

double bmrf_network_builder::du_ [protected]
 

the increment in image column dimension.

Definition at line 114 of file bmrf_network_builder.h.

vcl_vector<vtol_edge_2d_sptr> bmrf_network_builder::edges_ [protected]
 

the edges for current frame.

Definition at line 141 of file bmrf_network_builder.h.

int bmrf_network_builder_params::elu_ [inherited]
 

col position of the epipolar parameter space

Definition at line 46 of file bmrf_network_builder_params.h.

int bmrf_network_builder_params::elv_max_ [inherited]
 

maximum row position of the epipolar space

Definition at line 48 of file bmrf_network_builder_params.h.

int bmrf_network_builder_params::elv_min_ [inherited]
 

minimum row position of the epipolar space

Definition at line 47 of file bmrf_network_builder_params.h.

vgl_point_2d<double> bmrf_network_builder::epi_ [protected]
 

the epipole.

Definition at line 129 of file bmrf_network_builder.h.

vcl_vector<bmrf_epi_seg_sptr> bmrf_network_builder::epi_segs_ [protected]
 

temporary arrays for building the intensity information.

Definition at line 147 of file bmrf_network_builder.h.

float bmrf_network_builder_params::eu_ [inherited]
 

col position of the epipole

Definition at line 44 of file bmrf_network_builder_params.h.

float bmrf_network_builder_params::ev_ [inherited]
 

row position of the epipole

Definition at line 45 of file bmrf_network_builder_params.h.

int bmrf_network_builder::frame_ [protected]
 

the current frame index.

Definition at line 111 of file bmrf_network_builder.h.

vil_image_view<float> bmrf_network_builder::image_ [protected]
 

the image for the current frame.

Definition at line 138 of file bmrf_network_builder.h.

vnl_double_3 bmrf_network_builder::lower_wedge_line_ [protected]
 

the homogeneous coordinates of the lower epipolar wedge limit.

Definition at line 135 of file bmrf_network_builder.h.

float bmrf_network_builder_params::max_delta_recip_s_ [inherited]
 

maximum difference of reciprocals of s for time neighbors

Definition at line 50 of file bmrf_network_builder_params.h.

bmrf_network_sptr bmrf_network_builder::network_ [protected]
 

the network under construction.

Definition at line 144 of file bmrf_network_builder.h.

bool bmrf_network_builder::network_valid_ [protected]
 

network building status flags.

Definition at line 108 of file bmrf_network_builder.h.

int bmrf_network_builder_params::Ns_ [inherited]
 

number of intensity samples in s of an unbounded region

Definition at line 49 of file bmrf_network_builder_params.h.

vcl_multimap<double,bmrf_node_sptr> bmrf_network_builder::prev_s_node_map_ [protected]
 

map s ranges to nodes for the previous frame.

Definition at line 153 of file bmrf_network_builder.h.

vcl_multimap<double,bmrf_node_sptr> bmrf_network_builder::s_node_map_ [protected]
 

map s ranges to nodes.

Definition at line 150 of file bmrf_network_builder.h.

double bmrf_network_builder::smax_ [protected]
 

the maximum distance from the epipole in the image.

Definition at line 126 of file bmrf_network_builder.h.

vnl_double_3 bmrf_network_builder::upper_wedge_line_ [protected]
 

the homogeneous coordinates of the upper epipolar wedge limit.

Definition at line 132 of file bmrf_network_builder.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:51:55 2008 for contrib/brl/bseg/bmrf by  doxygen 1.4.4