fix(equidistant_camera):fix array radius initialize problems

This commit is contained in:
Messier
2019-09-03 10:23:07 +08:00
parent 8bc2401bb3
commit d1104099c3
2 changed files with 2 additions and 1 deletions

View File

@@ -282,6 +282,7 @@ void EquidistantCamera::estimateIntrinsics(
std::vector<Eigen::Vector2d> center(boardSize.height);
int arrayLength = boardSize.height;
double *radius = new double[arrayLength];
memset(radius, 0, arrayLength * sizeof(double));
for (int r = 0; r < boardSize.height; ++r) {
std::vector<cv::Point2d> circle;
for (int c = 0; c < boardSize.width; ++c) {
@@ -378,6 +379,7 @@ void EquidistantCamera::estimateIntrinsics2(
std::vector<Ctain::Vector2d> center(boardSize.height);
int arrayLength = boardSize.height;
double *radius = new double[arrayLength];
memset(radius, 0, arrayLength * sizeof(double));
for (int r = 0; r < boardSize.height; ++r) {
std::vector<cv::Point2d> circle;
for (int c = 0; c < boardSize.width; ++c) {