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

fix aruco: build warnings (MSVS 2015) #3346

Merged
merged 1 commit into from
Sep 5, 2022
Merged
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
2 changes: 1 addition & 1 deletion modules/aruco/src/aruco_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bool DetectorParameters::readDetectorParameters(const FileNode& fn) {

bool DetectorParameters::writeDetectorParameters(const Ptr<FileStorage>& fs)
{
if (fs.empty() && !fs->isOpened())
if (fs.empty() || !fs->isOpened())
return false;
return readWrite(*this, nullptr, fs);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/aruco/src/charuco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
// try to find the rest of markers in the diamond
vector< int > acceptedIdxs;
Ptr<Board> _b = _charucoDiamondLayout.staticCast<Board>();
Ptr<RefineParameters> refineParameters = makePtr<RefineParameters>(minRepDistance, -1, false);
Ptr<RefineParameters> refineParameters = makePtr<RefineParameters>(minRepDistance, -1.f, false);
ArucoDetector detector(dictionary, DetectorParameters::create(), refineParameters);
detector.refineDetectedMarkers(grey, _b, currentMarker, currentMarkerId, candidates, noArray(), noArray(),
acceptedIdxs);
Expand Down
2 changes: 1 addition & 1 deletion modules/aruco/test/test_boarddetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class CV_ArucoRefine : public cvtest::BaseTest {
params->cornerRefinementMethod = aruco::CORNER_REFINE_SUBPIX;
if (arucoAlgParams == ArucoAlgParams::USE_ARUCO3)
params->useAruco3Detection = true;
Ptr<aruco::RefineParameters> refineParams = makePtr<aruco::RefineParameters>(10, 3., true);
Ptr<aruco::RefineParameters> refineParams = makePtr<aruco::RefineParameters>(10.f, 3.f, true);
detector = aruco::ArucoDetector(dictionary, params, refineParams);
}

Expand Down