double to float replacing

This commit is contained in:
VahdPourAmin
2021-08-18 08:29:52 +02:00
parent 82d59b88a8
commit 7b7062e91e
+1 -12
View File
@@ -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;