Skip to content

Commit

Permalink
Replace uses of OpenCVHelp.forceLoadOpenCV()
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Mar 11, 2025
1 parent 65bd321 commit 804e008
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import edu.wpi.first.apriltag.AprilTagFields;
import edu.wpi.first.cameraserver.CameraServer;
import edu.wpi.first.cscore.CvSource;
import edu.wpi.first.cscore.OpenCvLoader;
import edu.wpi.first.cscore.VideoSource.ConnectionStrategy;
import edu.wpi.first.math.MathUtil;
import edu.wpi.first.math.Pair;
Expand Down Expand Up @@ -94,7 +95,7 @@ public class PhotonCameraSim implements AutoCloseable {
private boolean videoSimProcEnabled = true;

static {
OpenCVHelp.forceLoadOpenCV();
OpenCvLoader.forceStaticLoad();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import edu.wpi.first.apriltag.AprilTag;
import edu.wpi.first.cscore.CvSource;
import edu.wpi.first.cscore.OpenCvLoader;
import edu.wpi.first.math.geometry.Pose3d;
import edu.wpi.first.math.geometry.Translation3d;
import edu.wpi.first.math.util.Units;
Expand Down Expand Up @@ -62,7 +63,7 @@ public class VideoSimUtil {
private static double fieldWidth = 8.0137;

static {
OpenCVHelp.forceLoadOpenCV();
OpenCvLoader.forceStaticLoad();

// create Mats of 10x10 apriltag images
for (int i = 0; i < VideoSimUtil.kNumTags36h11; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import edu.wpi.first.apriltag.AprilTag;
import edu.wpi.first.apriltag.AprilTagFieldLayout;
import edu.wpi.first.cscore.OpenCvLoader;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Pose3d;
Expand All @@ -57,7 +58,6 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
import org.photonvision.estimation.OpenCVHelp;
import org.photonvision.estimation.TargetModel;
import org.photonvision.estimation.VisionEstimation;
import org.photonvision.jni.PhotonTargetingJniLoader;
Expand All @@ -84,7 +84,7 @@ public static void setUp() {
fail(e);
}

OpenCVHelp.forceLoadOpenCV();
OpenCvLoader.forceStaticLoad();

// See #1574 - test flakey, disabled until we address this
assumeTrue(false);
Expand Down

0 comments on commit 804e008

Please sign in to comment.