Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -59,6 +59,9 @@ class GridCalibrationTargetCirclegrid : public GridCalibrationTargetBase {
bool computeObservation(const cv::Mat &image, Eigen::MatrixXd &outImagePoints,
std::vector<bool> &outCornerObserved) const;

/// \brief receive the circlegrid options
const CirclegridOptions options() const {return _options;}

private:
/// \brief initialize the object
void initialize();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <aslam/cameras/GridCalibrationTargetCirclegrid.hpp>

namespace aslam {

namespace cameras {
Expand Down Expand Up @@ -773,7 +775,15 @@ bool OmniProjection<DISTORTION_T>::initializeIntrinsics(const std::vector<GridCa
}

// MIN_CORNERS is an arbitrary threshold for the number of corners
const size_t MIN_CORNERS = 4;
size_t MIN_CORNERS = 4;

// allow asymmetric circle grids with half of the minimum corners as 2 asymmetric columns are treated a 1
if (const aslam::cameras::GridCalibrationTargetCirclegrid* circleGrid = dynamic_cast<const aslam::cameras::GridCalibrationTargetCirclegrid*>(&target)){
if (circleGrid->options().useAsymmetricCirclegrid){
MIN_CORNERS = MIN_CORNERS / 2;
}
}

if (count > MIN_CORNERS)
{
// Resize P to fit with the count of valid points.
Expand Down
10 changes: 9 additions & 1 deletion aslam_cv/aslam_cameras/src/OmniCameraGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,15 @@ bool OmniProjection::initializeIntrinsics(
}
}

const int MIN_CORNERS = 8;
int MIN_CORNERS = 8;

// allow asymmetric circle grids with half of the minimum corners as 2 asymmetric columns are treated a 1
if (const aslam::cameras::GridCalibrationTargetCirclegrid* circleGrid = dynamic_cast<const aslam::cameras::GridCalibrationTargetCirclegrid*>(&target)){
if (circleGrid->options().useAsymmetricCirclegrid){
MIN_CORNERS = MIN_CORNERS / 2;
}
}

// MIN_CORNERS is an arbitrary threshold for the number of corners
if (count > MIN_CORNERS) {
// Resize P to fit with the count of valid points.
Expand Down