Skip to content

Commit

Permalink
fix calculated center pt
Browse files Browse the repository at this point in the history
  • Loading branch information
amquake committed Aug 19, 2023
1 parent 76eb0f3 commit 74f1582
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ public void setCalibration(int resWidth, int resHeight, Rotation2d fovDiag) {
var distCoeff = VecBuilder.fill(0, 0, 0, 0, 0);

// assume centered principal point (pixels)
double cx = resWidth / 2.0;
double cy = resHeight / 2.0;
double cx = resWidth / 2.0 - 0.5;
double cy = resHeight / 2.0 - 0.5;

// use given fov to determine focal point (pixels)
double fx = cx / Math.tan(fovWidth.getRadians() / 2.0);
Expand Down

0 comments on commit 74f1582

Please sign in to comment.