7 #include "../algo-common.h" 9 #include "../src/proc/sse/sse-pointcloud.h" 10 #include "../src/cuda/cuda-pointcloud.cuh" 11 #include "../src/types.h" 21 { 0.180086836f, -0.534179211f, -0.00139013783f, 0.000118769123f, 0.470662683f } };
25 for (
auto i = 0;
i < 2;
i++)
28 REQUIRE(std::abs(pixel1[
i] - pixel2[
i]) <= 0.001);
34 float point[3] = { 0 };
46 float point[3] = { 0 };
57 #if 0 //TODO: check why sse tests fails on LibCi 58 TEST_CASE(
"inverse_brown_conrady_sse_deproject")
60 std::shared_ptr<librealsense::pointcloud_sse> pc_sse = std::make_shared<librealsense::pointcloud_sse >();
67 for (
auto i = 0;
i < 4;
i++)
72 std::vector<librealsense::float2>
res(4, { 0,0 });
73 std::vector<librealsense::float2> unnormalized_res(4, { 0,0 });
80 for (
auto i = 0;
i < 4;
i++)
82 compare(unnormalized_res[
i], pixel[i]);
88 std::shared_ptr<librealsense::pointcloud_sse> pc_sse = std::make_shared<librealsense::pointcloud_sse >();
95 for (
auto i = 0;
i < 4;
i++)
100 std::vector<librealsense::float2>
res(4, { 0,0 });
101 std::vector<librealsense::float2> unnormalized_res(4, { 0,0 });
108 for (
auto i = 0;
i < 4;
i++)
110 compare(unnormalized_res[
i], pixel[i]);
116 TEST_CASE(
"inverse_brown_conrady_cuda_deproject")
118 std::vector<float3>
point(1280 * 720, { 0,0,0 });
122 std::vector<uint16_t>
depth(1280 * 720, 1000);
123 rscuda::deproject_depth_cuda((
float*)
point.data(),
intrin, depth.data(), 1);
124 for (
auto i = 0;
i < 720;
i++)
126 for (
auto j = 0;
j < 1280;
j++)
135 TEST_CASE(
"brown_conrady_cuda_deproject")
137 std::vector<float3>
point(1280 * 720, { 0,0,0 });
141 std::vector<uint16_t>
depth(1280 * 720, 1000);
142 rscuda::deproject_depth_cuda((
float*)
point.data(),
intrin, depth.data(), 1);
143 for (
auto i = 0;
i < 720;
i++)
145 for (
auto j = 0;
j < 1280;
j++)
GLint GLint GLsizei GLsizei GLsizei depth
TEST_CASE("inverse_brown_conrady_deproject")
static void rs2_deproject_pixel_to_point(float point[3], const struct rs2_intrinsics *intrin, const float pixel[2], float depth)
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented...
static void rs2_project_point_to_pixel(float pixel[2], const struct rs2_intrinsics *intrin, const float point[3])
std::pair< int, int > pixel
void compare(librealsense::float2 pixel1, librealsense::float2 pixel2)
GLdouble GLdouble GLint GLint const GLdouble * points