From 7b7062e91e8f744e70e2915e6897982c9561ddc1 Mon Sep 17 00:00:00 2001 From: VahdPourAmin Date: Wed, 18 Aug 2021 08:29:52 +0200 Subject: [PATCH] double to float replacing --- GPU_version/vio/kernel/compute-residual.cl | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/GPU_version/vio/kernel/compute-residual.cl b/GPU_version/vio/kernel/compute-residual.cl index 5409d19..97b2394 100644 --- a/GPU_version/vio/kernel/compute-residual.cl +++ b/GPU_version/vio/kernel/compute-residual.cl @@ -35,18 +35,7 @@ void jacobian_xyz2uv(float3 xyz_in_f, float* J) *(J + 4) = (xyz_in_f[1]) * ((1. / xyz_in_f[2]) * (1. / xyz_in_f[2])); // y/z^2 *(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(float3 xyz_in_f, float3 ref_pose, float3 cur_pose, float* J) -{ - 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]; - *(J + 3) = 0.0; - *(J + 4) = 1.0; - *(J + 5) = ((-1 * cos(txtytetha[2]) * cos(ref_pose[2])) + (sin(txtytetha[2]) * sin(ref_pose[2]))) * uv[0] - ((sin(txtytetha[2]) * cos(ref_pose[2])) + (cos(txtytetha[2]) * sin(ref_pose[2]))) * uv[1]; -} + void compute_hessain(float3 j, __global float* H, float w) { *(H + 0) += j[0] * j[0] * w;