added calib calc

added bool to check if calib is done
This commit is contained in:
Unknown
2019-09-17 13:59:53 +03:00
parent fca17885bb
commit 326da862c4
4 changed files with 29 additions and 5 deletions

View File

@@ -35,4 +35,10 @@ public class CameraValues {
HorizontalFocalLength = ImageWidth / (2 * FastMath.tan(HorizontalView /2));
VerticalFocalLength = ImageWidth / (2 * FastMath.tan(VerticalView /2));
}
public double CalculatePitch(double PixelY, double centerY){
return (FastMath.toDegrees((FastMath.atan(PixelY - centerY) / VerticalFocalLength)) * -1);
}
public double CalculateYaw(double PixelX, double centerX){
return FastMath.toDegrees(FastMath.atan(PixelX - centerX) / HorizontalFocalLength);
}
}