mirror of
https://github.com/opencv/opencv.git
synced 2025-06-21 02:20:50 +08:00
Undo multi dict functionality of refineDetectedMarkers method
This commit is contained in:
parent
1f9d6aa6cf
commit
364eedb87e
@ -1240,6 +1240,7 @@ void ArucoDetector::refineDetectedMarkers(InputArray _image, const Board& _board
|
||||
InputOutputArrayOfArrays _rejectedCorners, InputArray _cameraMatrix,
|
||||
InputArray _distCoeffs, OutputArray _recoveredIdxs) const {
|
||||
DetectorParameters& detectorParams = arucoDetectorImpl->detectorParams;
|
||||
const Dictionary& dictionary = arucoDetectorImpl->dictionaries.at(0);
|
||||
RefineParameters& refineParams = arucoDetectorImpl->refineParams;
|
||||
CV_Assert(refineParams.minRepDistance > 0);
|
||||
|
||||
@ -1262,6 +1263,10 @@ void ArucoDetector::refineDetectedMarkers(InputArray _image, const Board& _board
|
||||
// list of missing markers indicating if they have been assigned to a candidate
|
||||
vector<bool > alreadyIdentified(_rejectedCorners.total(), false);
|
||||
|
||||
// maximum bits that can be corrected
|
||||
int maxCorrectionRecalculated =
|
||||
int(double(dictionary.maxCorrectionBits) * refineParams.errorCorrectionRate);
|
||||
|
||||
Mat grey;
|
||||
_convertToGrey(_image, grey);
|
||||
|
||||
@ -1277,11 +1282,6 @@ void ArucoDetector::refineDetectedMarkers(InputArray _image, const Board& _board
|
||||
}
|
||||
vector<int> recoveredIdxs; // original indexes of accepted markers in _rejectedCorners
|
||||
|
||||
for (const auto& dictionary : arucoDetectorImpl->dictionaries) {
|
||||
// maximum bits that can be corrected
|
||||
int maxCorrectionRecalculated =
|
||||
int(double(dictionary.maxCorrectionBits) * refineParams.errorCorrectionRate);
|
||||
|
||||
// for each missing marker, try to find a correspondence
|
||||
for(unsigned int i = 0; i < undetectedMarkersIds.size(); i++) {
|
||||
|
||||
@ -1384,7 +1384,6 @@ void ArucoDetector::refineDetectedMarkers(InputArray _image, const Board& _board
|
||||
recoveredIdxs.push_back(closestCandidateIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// parse output
|
||||
if(finalAcceptedIds.size() != _detectedIds.total()) {
|
||||
|
Loading…
Reference in New Issue
Block a user