Public Member Functions | Private Member Functions | Private Attributes
vmal_track_lines Class Reference

#include <vmal_track_lines.h>

List of all members.

Public Member Functions

 vmal_track_lines ()
 Constructor.
virtual ~vmal_track_lines ()
 Destructor.
void track_lines (const vcl_vector< vcl_vector< vtol_edge_2d_sptr > * > *fit_lines, const vcl_vector< vcl_vector< vtol_edge_2d_sptr > * > *transformed_lines, const vcl_vector< vil1_image > &images, const vcl_vector< vnl_double_3x3 > &homo, vmal_multi_view_data_edge_sptr matches)
 Main function that computes the matches between lines in the images.
void sort_lines (vmal_multi_view_data_edge_sptr matches, vmal_multi_view_data_edge_sptr sorted_matches)
 Sort the input matches.
double lines_correlation (vtol_edge_2d_sptr line0, vtol_edge_2d_sptr line1, const vnl_double_3x3 &H, vil1_memory_image_of< vxl_byte > &image0, vil1_memory_image_of< vxl_byte > &image1)
 Compute the correlation between two lines using the homography.

Private Member Functions

double seg_angle (vtol_edge_2d_sptr, vtol_edge_2d_sptr)
bool belong (vtol_edge_2d_sptr, vtol_edge_2d_sptr)
double dist (vtol_edge_2d_sptr, vtol_edge_2d_sptr)
double project_point (double x0, double y0, double ax, double ay, double bx, double by, double *x, double *y)
 Project the point (x0,y0) on the line ((ax,ay),(bx,by)).
int is_cur_best (vtol_edge_2d_sptr trans_line, vtol_edge_2d_sptr fitted_line, vtol_edge_2d_sptr other_line)
vtol_edge_2d_sptr find_transfo (vtol_edge_2d_sptr line, vcl_vector< vtol_edge_2d_sptr > &fit_lines, const vcl_vector< vtol_edge_2d_sptr > &transformed_lines)
 Find the transformed of line.
void refine_line_at_min (vtol_edge_2d_sptr line0, vtol_edge_2d_sptr line1, vtol_edge_2d_sptr &new_line0, vtol_edge_2d_sptr &new_line1, const vnl_double_3x3 &H)
 Compute two new lines by comparing the input lines and keeping their common part through the homography.
void sort_a_pair_of_line (vtol_edge_2d_sptr line0, vtol_edge_2d_sptr line1, vtol_edge_2d_sptr &new_line0, vtol_edge_2d_sptr &new_line1)
void cost_function (vtol_edge_2d_sptr line0, vtol_edge_2d_sptr t_line0, vtol_edge_2d_sptr line1, const vil1_image &image0, const vil1_image &image1, const vnl_double_3x3 homo, double &result)

Private Attributes

double theta_
double radius_

Detailed Description

Definition at line 27 of file vmal_track_lines.h.


Constructor & Destructor Documentation

vmal_track_lines::vmal_track_lines ( )

Constructor.

Definition at line 18 of file vmal_track_lines.cxx.

vmal_track_lines::~vmal_track_lines ( ) [virtual]

Destructor.

Definition at line 22 of file vmal_track_lines.cxx.


Member Function Documentation

bool vmal_track_lines::belong ( vtol_edge_2d_sptr  trans_line,
vtol_edge_2d_sptr  fit_line 
) [private]

Definition at line 190 of file vmal_track_lines.cxx.

void vmal_track_lines::cost_function ( vtol_edge_2d_sptr  line0,
vtol_edge_2d_sptr  t_line0,
vtol_edge_2d_sptr  line1,
const vil1_image &  image0,
const vil1_image &  image1,
const vnl_double_3x3  homo,
double &  result 
) [private]

Definition at line 558 of file vmal_track_lines.cxx.

double vmal_track_lines::dist ( vtol_edge_2d_sptr  trans_line,
vtol_edge_2d_sptr  fit_line 
) [private]

Definition at line 251 of file vmal_track_lines.cxx.

vtol_edge_2d_sptr vmal_track_lines::find_transfo ( vtol_edge_2d_sptr  line,
vcl_vector< vtol_edge_2d_sptr > &  fit_lines,
const vcl_vector< vtol_edge_2d_sptr > &  transformed_lines 
) [private]

Find the transformed of line.

Definition at line 440 of file vmal_track_lines.cxx.

int vmal_track_lines::is_cur_best ( vtol_edge_2d_sptr  trans_line,
vtol_edge_2d_sptr  fitted_line,
vtol_edge_2d_sptr  other_line 
) [private]

Definition at line 398 of file vmal_track_lines.cxx.

double vmal_track_lines::lines_correlation ( vtol_edge_2d_sptr  line0,
vtol_edge_2d_sptr  line1,
const vnl_double_3x3 H,
vil1_memory_image_of< vxl_byte > &  image0,
vil1_memory_image_of< vxl_byte > &  image1 
)

Compute the correlation between two lines using the homography.

It also computes a translation vector to correct the error due to the homography.

Definition at line 519 of file vmal_track_lines.cxx.

double vmal_track_lines::project_point ( double  x0,
double  y0,
double  ax,
double  ay,
double  bx,
double  by,
double *  x,
double *  y 
) [private]

Project the point (x0,y0) on the line ((ax,ay),(bx,by)).

The resulting projected point is (x,y). It also returns the distance between the line and the projected point. If (x,y) does not belong to the segment [(ax,ay),(bx,by)], sets (x,y) to (-1,-1).

void vmal_track_lines::refine_line_at_min ( vtol_edge_2d_sptr  line0,
vtol_edge_2d_sptr  line1,
vtol_edge_2d_sptr &  new_line0,
vtol_edge_2d_sptr &  new_line1,
const vnl_double_3x3 H 
) [private]

Compute two new lines by comparing the input lines and keeping their common part through the homography.

double vmal_track_lines::seg_angle ( vtol_edge_2d_sptr  trans_line,
vtol_edge_2d_sptr  fit_line 
) [private]

Definition at line 173 of file vmal_track_lines.cxx.

void vmal_track_lines::sort_a_pair_of_line ( vtol_edge_2d_sptr  line0,
vtol_edge_2d_sptr  line1,
vtol_edge_2d_sptr &  new_line0,
vtol_edge_2d_sptr &  new_line1 
) [private]

Definition at line 489 of file vmal_track_lines.cxx.

void vmal_track_lines::sort_lines ( vmal_multi_view_data_edge_sptr  matches,
vmal_multi_view_data_edge_sptr  sorted_matches 
)

Sort the input matches.

The first end-point of the first line of a match must be linked to the corresponding end-point of the second line.

Definition at line 456 of file vmal_track_lines.cxx.

void vmal_track_lines::track_lines ( const vcl_vector< vcl_vector< vtol_edge_2d_sptr > * > *  fit_lines,
const vcl_vector< vcl_vector< vtol_edge_2d_sptr > * > *  transformed_lines,
const vcl_vector< vil1_image > &  images,
const vcl_vector< vnl_double_3x3 > &  homo,
vmal_multi_view_data_edge_sptr  matches 
)

Main function that computes the matches between lines in the images.

Definition at line 26 of file vmal_track_lines.cxx.


Member Data Documentation

double vmal_track_lines::radius_ [private]

Definition at line 107 of file vmal_track_lines.h.

double vmal_track_lines::theta_ [private]

Definition at line 106 of file vmal_track_lines.h.


The documentation for this class was generated from the following files: