Lines Matching refs:cameras
63 : num_images(_num_images), pairwise_matches(&_pairwise_matches[0]), cameras(&_cameras[0]) {} in CalcRotation()
70 K_from(0,0) = cameras[edge.from].focal; in operator ()()
71 K_from(1,1) = cameras[edge.from].focal * cameras[edge.from].aspect; in operator ()()
72 K_from(0,2) = cameras[edge.from].ppx; in operator ()()
73 K_from(1,2) = cameras[edge.from].ppy; in operator ()()
76 K_to(0,0) = cameras[edge.to].focal; in operator ()()
77 K_to(1,1) = cameras[edge.to].focal * cameras[edge.to].aspect; in operator ()()
78 K_to(0,2) = cameras[edge.to].ppx; in operator ()()
79 K_to(1,2) = cameras[edge.to].ppy; in operator ()()
82 cameras[edge.to].R = cameras[edge.from].R * R; in operator ()()
87 CameraParams* cameras; member
108 std::vector<CameraParams> &cameras) in estimate() argument
143 cameras.assign(num_images, CameraParams()); in estimate()
145 cameras[i].focal = focals[i]; in estimate()
151 cameras[i].ppx -= 0.5 * features[i].img_size.width; in estimate()
152 cameras[i].ppy -= 0.5 * features[i].img_size.height; in estimate()
160 …n_tree.walkBreadthFirst(span_tree_centers[0], CalcRotation(num_images, pairwise_matches, cameras)); in estimate()
165 cameras[i].ppx += 0.5 * features[i].img_size.width; in estimate()
166 cameras[i].ppy += 0.5 * features[i].img_size.height; in estimate()
178 std::vector<CameraParams> &cameras) in estimate() argument
189 setUpInitialCameraParams(cameras); in estimate()
265 obtainRefinedCameraParams(cameras); in estimate()
271 Mat R_inv = cameras[span_tree_centers[0]].R.inv(); in estimate()
273 cameras[i].R = R_inv * cameras[i].R; in estimate()
282 void BundleAdjusterReproj::setUpInitialCameraParams(const std::vector<CameraParams> &cameras) in setUpInitialCameraParams() argument
288 cam_params_.at<double>(i * 7, 0) = cameras[i].focal; in setUpInitialCameraParams()
289 cam_params_.at<double>(i * 7 + 1, 0) = cameras[i].ppx; in setUpInitialCameraParams()
290 cam_params_.at<double>(i * 7 + 2, 0) = cameras[i].ppy; in setUpInitialCameraParams()
291 cam_params_.at<double>(i * 7 + 3, 0) = cameras[i].aspect; in setUpInitialCameraParams()
293 svd(cameras[i].R, SVD::FULL_UV); in setUpInitialCameraParams()
308 void BundleAdjusterReproj::obtainRefinedCameraParams(std::vector<CameraParams> &cameras) const in obtainRefinedCameraParams()
312 cameras[i].focal = cam_params_.at<double>(i * 7, 0); in obtainRefinedCameraParams()
313 cameras[i].ppx = cam_params_.at<double>(i * 7 + 1, 0); in obtainRefinedCameraParams()
314 cameras[i].ppy = cam_params_.at<double>(i * 7 + 2, 0); in obtainRefinedCameraParams()
315 cameras[i].aspect = cam_params_.at<double>(i * 7 + 3, 0); in obtainRefinedCameraParams()
321 Rodrigues(rvec, cameras[i].R); in obtainRefinedCameraParams()
324 cameras[i].R.convertTo(tmp, CV_32F); in obtainRefinedCameraParams()
325 cameras[i].R = tmp; in obtainRefinedCameraParams()
463 void BundleAdjusterRay::setUpInitialCameraParams(const std::vector<CameraParams> &cameras) in setUpInitialCameraParams() argument
469 cam_params_.at<double>(i * 4, 0) = cameras[i].focal; in setUpInitialCameraParams()
471 svd(cameras[i].R, SVD::FULL_UV); in setUpInitialCameraParams()
486 void BundleAdjusterRay::obtainRefinedCameraParams(std::vector<CameraParams> &cameras) const in obtainRefinedCameraParams()
490 cameras[i].focal = cam_params_.at<double>(i * 4, 0); in obtainRefinedCameraParams()
496 Rodrigues(rvec, cameras[i].R); in obtainRefinedCameraParams()
499 cameras[i].R.convertTo(tmp, CV_32F); in obtainRefinedCameraParams()
500 cameras[i].R = tmp; in obtainRefinedCameraParams()