Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ceres_intrinsic_camera_calibrator): ceres-based intrinsic calibrator #141

Merged
merged 17 commits into from
Oct 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ calibrate(
const Eigen::MatrixXd & initial_dist_coeffs_eigen, int num_radial_coeffs, int num_rational_coeffs,
bool use_tangential_distortion, bool verbose)
{
int num_dist_coeffs = initial_dist_coeffs_eigen.rows() * initial_dist_coeffs_eigen.cols();
Copy link
Contributor

@amadeuszsz amadeuszsz Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: narrowing conversion, std::size_t might be applied in both lines

int expected_dist_coeffs = num_rational_coeffs > 0 ? 8 : 5;
if (
initial_camera_matrix_eigen.cols() != 3 || initial_camera_matrix_eigen.rows() != 3 ||
object_points_eigen_list.size() != image_points_eigen_list.size() || num_radial_coeffs < 0 ||
num_radial_coeffs > 3 || num_rational_coeffs < 0 || num_rational_coeffs > 3 ||
std::min<std::size_t>(initial_dist_coeffs_eigen.rows(), initial_dist_coeffs_eigen.cols()) > 1) {
num_dist_coeffs != expected_dist_coeffs) {
std::cout << "Invalid parameters" << std::endl;
std::cout << "\t object_points_list.size(): " << object_points_eigen_list.size() << std::endl;
std::cout << "\t image_points_list.size(): " << image_points_eigen_list.size() << std::endl;
Expand Down
Loading