Skip to content

Commit

Permalink
fixed bug and cast warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrPanov committed Sep 5, 2022
1 parent 467fd62 commit b1cc000
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit b1cc000

Please sign in to comment.