Fix camera intrinsics ProjectTo3D

This commit is contained in:
2021-01-07 00:29:30 +01:00
parent b447ad5e62
commit dea40fea84
2 changed files with 4 additions and 3 deletions

View File

@@ -84,9 +84,9 @@ namespace openVulkanoCpp::Math
{
// TODO handle skew
return {
(pixelCoordinates.x - Cx()) * depth / Fx(),
(pixelCoordinates.y - Cy()) * depth / Fy(),
depth
( pixelCoordinates.x - Cx()) * depth / Fx(),
(-pixelCoordinates.y + Cy()) * depth / Fy(),
-depth
};
}

View File

@@ -11,6 +11,7 @@
#include <glm/gtc/quaternion.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtx/transform.hpp>
namespace openVulkanoCpp::Math
{