Skip to content

Commit

Permalink
cahnged unit conversions for distance
Browse files Browse the repository at this point in the history
  • Loading branch information
EomLions committed Feb 22, 2025
1 parent eb9bd36 commit 231a864
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public ScreenToWorldConverter(double objectRealWidth, Mat cameraMatrix) {

public double calculateDistance(double detectionWidth) {
double fx = CAMERA_MATRIX.get(0, 0)[0];
return (((objectRealWidth * fx) / detectionWidth) - 20) / 100; // m
return (((objectRealWidth * fx) / detectionWidth) - 20) / 10_000; // m
}

public double calculateHorizontalAngle(double objectCenterX) {
Expand Down

0 comments on commit 231a864

Please sign in to comment.