Skip to content

Commit

Permalink
Fix aruco todos
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Oct 14, 2023
1 parent ae72de9 commit e04e3a1
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

package org.photonvision.vision.aruco;

import org.opencv.aruco.Aruco;
import org.opencv.objdetect.ArucoDetector;
import org.opencv.objdetect.DetectorParameters;
import org.opencv.objdetect.Dictionary;
import org.opencv.objdetect.Objdetect;
import org.photonvision.common.logging.LogGroup;
import org.photonvision.common.logging.Logger;

Expand All @@ -37,8 +40,7 @@ public ArucoDetectorParams() {
setCornerAccuracy(25);
setCornerRefinementMaxIterations(100);

// TODO
// detector = new ArucoDetector(Dictionary.get(Aruco.DICT_APRILTAG_16h5), parameters);
detector = new ArucoDetector(Objdetect.getPredefinedDictionary(Objdetect.DICT_APRILTAG_16h5), parameters);
}

public void setDecimation(float decimate) {
Expand All @@ -55,8 +57,7 @@ public void setDecimation(float decimate) {
public void setCornerRefinementMaxIterations(int iters) {
if (iters == m_iterations || iters <= 0) return;

// TODO
// parameters.set_cornerRefinementMethod(Aruco.CORNER_REFINE_SUBPIX);
parameters.set_cornerRefinementMethod(Objdetect.CORNER_REFINE_SUBPIX);
parameters.set_cornerRefinementMaxIterations(iters); // 200

m_iterations = iters;
Expand Down

0 comments on commit e04e3a1

Please sign in to comment.