Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
amquake committed Jul 1, 2023
1 parent 5be4557 commit c9d2f1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public static Optional<PNPResults> solvePNP_SQUARE(
Transform3d best = null;
Transform3d alt = null;

for(int tries = 0; tries < 2; tries++) {
for (int tries = 0; tries < 2; tries++) {
// calc rvecs/tvecs and associated reprojection error from image points
Calib3d.solvePnPGeneric(
objectPoints,
Expand All @@ -455,11 +455,11 @@ public static Optional<PNPResults> solvePNP_SQUARE(
}

// check if we got a NaN result
if(!Double.isNaN(errors[0])) break;
if (!Double.isNaN(errors[0])) break;
else { // add noise and retry
double[] br = imagePoints.get(0, 0);
br[0]-=0.001;
br[1]-=0.001;
br[0] -= 0.001;
br[1] -= 0.001;
imagePoints.put(0, 0, br);
}
}
Expand All @@ -476,8 +476,7 @@ public static Optional<PNPResults> solvePNP_SQUARE(
System.err.println("SolvePNP_SQUARE failed!");
e.printStackTrace();
return Optional.empty();
}
finally {
} finally {
// release our Mats from native memory
objectPoints.release();
imagePoints.release();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public static Mat get16h5TagImage(int id) {
name = name.substring(0, name.length() - idString.length()) + idString;

var resource = VideoSimUtil.class.getResource(kResourceTagImagesPath + name + ".png");
Mat result = new Mat();

Mat result = new Mat();
// reading jar file
if (resource != null && resource.getPath().startsWith("file")) {
BufferedImage buf;
Expand Down

0 comments on commit c9d2f1e

Please sign in to comment.