From 82d59b88a85f55b7d87ad572b762d8792bc40911 Mon Sep 17 00:00:00 2001 From: VahdPourAmin Date: Wed, 18 Aug 2021 08:28:20 +0200 Subject: [PATCH] double to float replacing --- GPU_version/vio/kernel/compute-residual.cl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU_version/vio/kernel/compute-residual.cl b/GPU_version/vio/kernel/compute-residual.cl index 4b0b118..5409d19 100644 --- a/GPU_version/vio/kernel/compute-residual.cl +++ b/GPU_version/vio/kernel/compute-residual.cl @@ -36,10 +36,10 @@ void jacobian_xyz2uv(float3 xyz_in_f, float* J) *(J + 5) = -(xyz_in_f[0]) * (xyz_in_f[1]) / ((1. / xyz_in_f[2]) * (1. / xyz_in_f[2])); // -x*y/z^2 } <<<<<<< HEAD -void jacobian_xyz2uv_2(double3 xyz_in_f, double3 ref_pose, double3 cur_pose, double* J) +void jacobian_xyz2uv_2(float3 xyz_in_f, float3 ref_pose, float3 cur_pose, float* J) { - double3 txtytetha = cur_pose - ref_pose; - double2 uv = world2cam(xyz_in_f); + float3 txtytetha = cur_pose - ref_pose; + float2 uv = world2cam(xyz_in_f); *(J + 0) = 1.0; *(J + 1) = 0.0; *(J + 2) = ((-1 * sin(txtytetha[2]) * cos(ref_pose[2])) - (cos(txtytetha[2]) * sin(ref_pose[2]))) * uv[0] + ((cos(txtytetha[2]) * cos(ref_pose[2])) - (sin(txtytetha[2]) * sin(ref_pose[2]))) * uv[1];