Changeset 496
- Timestamp:
- 05/20/09 01:10:08 (3 years ago)
- Files:
-
- 1 modified
-
trunk/software/scripts/calib/calibrate.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/software/scripts/calib/calibrate.c
r495 r496 11 11 // The number of input images. Each is named input.%d.jpg, where 12 12 // is in the range [1..NUM_INPUTS] inclusive. 13 #define NUM_INPUTS 713 #define NUM_INPUTS 6 14 14 15 15 // The number of inner corners on the chessboard … … 36 36 CV_CALIB_CB_FILTER_QUADS, 37 37 CV_CALIB_CB_ADAPTIVE_THRESH, 38 CV_CALIB_CB_ADAPTIVE_THRESH,39 38 CV_CALIB_CB_ADAPTIVE_THRESH 40 39 }; … … 60 59 CvSize pattern_size = cvSize(BOARD_COLS, BOARD_ROWS); 61 60 62 // Find the chessboard corners63 61 int success = 1; 64 62 int total_corners = BOARD_COLS * BOARD_ROWS * NUM_INPUTS; … … 81 79 &corner_count, 82 80 CORNER_FLAGS[i]); 81 // I'm just guessing with the parameters here. 82 //cvFindCornerSubPix(img, my_corners, corner_count, 83 // cvSize(5, 5), // window to search 84 // cvSize(-1, -1), // window to ignore (-1 disables) 85 // cvTermCriteria(CV_TERMCRIT_ITER, 10, 10.0)); 86 83 87 cvDrawChessboardCorners(img, pattern_size, my_corners, corner_count, pattern_was_found); 84 88 cvSaveImage(out_fn, img); … … 135 139 // and K_1,3 and K_2,3 contain the camera center, which should be half 136 140 // the image dimensions. 137 float K_data[] = { 0.0, 0.0, IMAGE_WIDTH / 2.0,138 0.0, 0.0, IMAGE_HEIGHT / 2.0,141 float K_data[] = {1.0, 0.0, 0.0, 142 0.0, 1.0, 0.0, 139 143 0.0, 0.0, 1.0}; 140 144 CvMat K = cvMat(3, 3, CV_32FC1, &K_data); … … 154 158 NULL, // rotation_vectors 155 159 NULL, // translation_vectors 156 0);160 CV_CALIB_FIX_ASPECT_RATIO); 157 161 158 162 printf("\nK:\n"); … … 162 166 163 167 } 168

