#include <sdet_grid_finder.h>
Inheritance diagram for sdet_grid_finder:

Definition at line 91 of file sdet_grid_finder.h.
Public Types | |
| enum | debug { NO_DEBUG = 0, VANISHING_POINT, AFFINE_GROUP_BEFORE_SKEW_SCALE, AFFINE_GROUP_AFTER_SKEW_SCALE, TRANS_PERIM_LINES, AFFINE_GROUP_AFTER_TRANS } |
Public Member Functions | |
| sdet_grid_finder (sdet_grid_finder_params &gfp) | |
| constructor from a parameter block (the only way). | |
| ~sdet_grid_finder () | |
| Default Destructor. | |
| bool | match_grid () |
| find the grid in the set of line segments. | |
| bool | compute_homography () |
| bool | compute_manual_homography (vsol_point_2d_sptr ul, vsol_point_2d_sptr ur, vsol_point_2d_sptr lr, vsol_point_2d_sptr ll) |
| The user will select the four corners of the grid in order to provide. | |
| void | clear () |
| Clear internal storage. | |
| bool | set_lines (const float xsize, const float ysize, vcl_vector< vsol_line_2d_sptr > const &lines) |
| if there are less than 2 dominant groups then return false. | |
| bool | get_homography (vgl_h_matrix_2d< double > &homog) |
| bool | get_debug_lines (vcl_vector< vsol_line_2d_sptr > &lines) |
| bool | get_debug_grid_lines (vcl_vector< vsol_line_2d_sptr > &lines) |
| bool | get_affine_lines (vcl_vector< vsol_line_2d_sptr > &lines) |
| bool | get_matched_lines (vcl_vector< vsol_line_2d_sptr > &lines) |
| bool | get_mapped_lines (vcl_vector< vsol_line_2d_sptr > &lines) |
| Get the original set of lines mapped by the line homography. | |
| bool | get_backprojected_grid (vcl_vector< vsol_line_2d_sptr > &lines) |
| Get the grid lines mapped back onto the image. | |
| void | set_verbose () |
| void | unset_verbose () |
| bool | transform_grid_points (vnl_matrix_fixed< double, 3, 3 > &K, vnl_matrix_fixed< double, 3, 4 > &M, vcl_vector< vsol_point_2d_sptr > &points) |
| test camera parameter matrices. | |
| bool | init_output_file (vcl_ofstream &outstream) |
| write transformed grid points to a file. | |
| bool | write_image_points (vcl_ofstream &outstream) |
| append the output file with points calculated using homography_. | |
| bool | check_grid_match (vil1_image img) |
| make sure homography and image correspond with each other. | |
| bool | SanityCheck () |
| Checks that parameters are within acceptable bounds. | |
| void | get_debug_choices (vcl_vector< vcl_string > &choices) |
Public Attributes | |
| int | n_lines_x_ |
| number of horizontal grid lines | |
| int | n_lines_y_ |
| number of vertical grid lines | |
| double | spacing_ |
| spacing between lines | |
| int | thresh_ |
| bin threshold for dominant orientation groups | |
| float | angle_tol_ |
| angle tolerance for a dominant group | |
| bool | verbose_ |
| print informative debug output | |
| int | debug_state_ |
| general purpose debug state | |
Protected Member Functions | |
| vsol_line_2d_sptr | transform_line (vgl_h_matrix_2d< double > const &h, vsol_line_2d_sptr const &l) |
| transform a vsol line by transforming the end points. | |
| bool | get_vanishing_point (vcl_vector< vsol_line_2d_sptr > const ¶_lines, vgl_homg_point_2d< double > &vp) |
| the vanishing point of a line bundle. | |
| bool | scale_transform (const double max_distance, vcl_vector< vsol_line_2d_sptr > const &gh, vcl_vector< vsol_line_2d_sptr > const &gv, vnl_matrix_fixed< double, 3, 3 > &S) |
| Form a histogram of all pairwise distances of lines from the origin. | |
| bool | compute_vanishing_points () |
| vanishing points of the grid lines. | |
| bool | compute_projective_homography () |
| Compute a projective homography that sends the two major group vanishing points to the x and y directions. | |
| bool | compute_affine_homography () |
| bool | compute_homography_linear_chamfer (vgl_h_matrix_2d< double > &H) |
| Assumes that a set of lines have been binned in the 1-d chamfer index. | |
| bool | get_square_pixel_stats (vil1_image img, int x, int y, double &mean_intensity, double &intensity_sigma) |
| gets pixels stats from img within grid square specified by x,y. | |
| void | InitParams (const int n_lines_x, const int n_lines_y, const double spacing, const int thresh, const float angle_tol, bool verbose, int debug_state) |
Protected Attributes | |
| bool | groups_valid_ |
| members. | |
| bool | vanishing_points_valid_ |
| bool | projective_homography_valid_ |
| bool | affine_homography_valid_ |
| bool | homography_valid_ |
| float | xmax_ |
| float | ymax_ |
| vcl_vector< vsol_line_2d_sptr > | lines_ |
| vcl_vector< vsol_line_2d_sptr > | display_lines_ |
| vcl_vector< vsol_line_2d_sptr > | matched_lines_ |
| vcl_vector< vsol_line_2d_sptr > | debug_lines_ |
| vcl_vector< vsol_line_2d_sptr > | debug_grid_lines_ |
| vcl_vector< vsol_line_2d_sptr > | group0_ |
| vcl_vector< vsol_line_2d_sptr > | group1_ |
| vcl_vector< vsol_line_2d_sptr > | afgroup0_ |
| vcl_vector< vsol_line_2d_sptr > | afgroup1_ |
| bsol_hough_line_index_sptr | index_ |
| grid_profile_matcher | chamf0_ |
| grid_profile_matcher | chamf90_ |
| vgl_homg_point_2d< double > | vp0_ |
| vgl_homg_point_2d< double > | vp90_ |
| vgl_h_matrix_2d< double > | projective_homography_ |
| vgl_h_matrix_2d< double > | affine_homography_ |
| vgl_h_matrix_2d< double > | homography_ |
Friends | |
| vcl_ostream & | operator<< (vcl_ostream &, const sdet_grid_finder_params &gfp) |
|
|
Definition at line 19 of file sdet_grid_finder_params.h. |
|
|
constructor from a parameter block (the only way).
Definition at line 304 of file sdet_grid_finder.cxx. |
|
|
Default Destructor.
Definition at line 316 of file sdet_grid_finder.cxx. |
|
|
make sure homography and image correspond with each other.
Definition at line 1403 of file sdet_grid_finder.cxx. |
|
|
Clear internal storage.
Definition at line 1393 of file sdet_grid_finder.cxx. |
|
|
Definition at line 697 of file sdet_grid_finder.cxx. |
|
|
Definition at line 1191 of file sdet_grid_finder.cxx. |
|
|
Assumes that a set of lines have been binned in the 1-d chamfer index. Assumes that dindex0_ are vertical lines and dindex90_ are horizontal Definition at line 902 of file sdet_grid_finder.cxx. |
|
||||||||||||||||||||
|
The user will select the four corners of the grid in order to provide. a rough estimate of the homography, then grid lines will be used to calculate a fine-tuned homography Definition at line 1060 of file sdet_grid_finder.cxx. |
|
|
Compute a projective homography that sends the two major group vanishing points to the x and y directions.
Definition at line 522 of file sdet_grid_finder.cxx. |
|
|
vanishing points of the grid lines.
Definition at line 487 of file sdet_grid_finder.cxx. |
|
|
Definition at line 1239 of file sdet_grid_finder.cxx. |
|
|
Get the grid lines mapped back onto the image.
Definition at line 1291 of file sdet_grid_finder.cxx. |
|
|
Definition at line 38 of file sdet_grid_finder_params.cxx. |
|
|
Definition at line 1254 of file sdet_grid_finder.cxx. |
|
|
Definition at line 1246 of file sdet_grid_finder.cxx. |
|
|
|
|
|
Get the original set of lines mapped by the line homography.
Definition at line 1271 of file sdet_grid_finder.cxx. |
|
|
Definition at line 1262 of file sdet_grid_finder.cxx. |
|
||||||||||||||||||||||||
|
gets pixels stats from img within grid square specified by x,y. Not returning a valid sigma value for now -DEC Definition at line 1484 of file sdet_grid_finder.cxx. |
|
||||||||||||
|
the vanishing point of a line bundle.
Definition at line 406 of file sdet_grid_finder.cxx. |
|
|
write transformed grid points to a file. the zhang calibration routine located in bmvl/bcal Definition at line 1331 of file sdet_grid_finder.cxx. |
|
||||||||||||||||||||||||||||||||
|
Definition at line 49 of file sdet_grid_finder_params.cxx. |
|
|
find the grid in the set of line segments.
Definition at line 515 of file sdet_grid_finder.cxx. |
|
|
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. Definition at line 72 of file sdet_grid_finder_params.cxx. |
|
||||||||||||||||||||
|
Form a histogram of all pairwise distances of lines from the origin. h_i is the count, d_i is the average distance in a bin The first peak is the distance between grid lines in the horizontal (gh) and vertical (gv) directions. The transformation makes each of these distances equal to spacing. The result is returned in S. Definition at line 627 of file sdet_grid_finder.cxx. |
|
||||||||||||||||
|
if there are less than 2 dominant groups then return false.
Definition at line 368 of file sdet_grid_finder.cxx. |
|
|
Definition at line 124 of file sdet_grid_finder.h. |
|
||||||||||||||||
|
test camera parameter matrices.
Definition at line 1367 of file sdet_grid_finder.cxx. |
|
||||||||||||
|
transform a vsol line by transforming the end points.
Definition at line 1225 of file sdet_grid_finder.cxx. |
|
|
Definition at line 125 of file sdet_grid_finder.h. |
|
|
append the output file with points calculated using homography_.
Definition at line 1345 of file sdet_grid_finder.cxx. |
|
||||||||||||
|
Definition at line 108 of file sdet_grid_finder_params.cxx. |
|
|
Definition at line 195 of file sdet_grid_finder.h. |
|
|
Definition at line 174 of file sdet_grid_finder.h. |
|
|
Definition at line 185 of file sdet_grid_finder.h. |
|
|
Definition at line 186 of file sdet_grid_finder.h. |
|
|
angle tolerance for a dominant group
Definition at line 53 of file sdet_grid_finder_params.h. |
|
|
Definition at line 190 of file sdet_grid_finder.h. |
|
|
Definition at line 191 of file sdet_grid_finder.h. |
|
|
Definition at line 182 of file sdet_grid_finder.h. |
|
|
Definition at line 181 of file sdet_grid_finder.h. |
|
|
general purpose debug state
Definition at line 55 of file sdet_grid_finder_params.h. |
|
|
Definition at line 179 of file sdet_grid_finder.h. |
|
|
Definition at line 183 of file sdet_grid_finder.h. |
|
|
Definition at line 184 of file sdet_grid_finder.h. |
|
|
members.
Definition at line 171 of file sdet_grid_finder.h. |
|
|
Definition at line 196 of file sdet_grid_finder.h. |
|
|
Definition at line 175 of file sdet_grid_finder.h. |
|
|
Definition at line 187 of file sdet_grid_finder.h. |
|
|
Definition at line 178 of file sdet_grid_finder.h. |
|
|
Definition at line 180 of file sdet_grid_finder.h. |
|
|
number of horizontal grid lines
Definition at line 49 of file sdet_grid_finder_params.h. |
|
|
number of vertical grid lines
Definition at line 50 of file sdet_grid_finder_params.h. |
|
|
Definition at line 194 of file sdet_grid_finder.h. |
|
|
Definition at line 173 of file sdet_grid_finder.h. |
|
|
spacing between lines
Definition at line 51 of file sdet_grid_finder_params.h. |
|
|
bin threshold for dominant orientation groups
Definition at line 52 of file sdet_grid_finder_params.h. |
|
|
Definition at line 172 of file sdet_grid_finder.h. |
|
|
print informative debug output
Definition at line 54 of file sdet_grid_finder_params.h. |
|
|
Definition at line 192 of file sdet_grid_finder.h. |
|
|
Definition at line 193 of file sdet_grid_finder.h. |
|
|
Definition at line 176 of file sdet_grid_finder.h. |
|
|
Definition at line 177 of file sdet_grid_finder.h. |
1.4.4