Commit 07126d86 authored by Hamdi Sahloul's avatar Hamdi Sahloul

Create a float-type cloud when depth map is not double-type

parent b527ab99
......@@ -232,14 +232,8 @@ namespace rgbd
depth.type() == CV_64FC1 || depth.type() == CV_32FC1 || depth.type() == CV_16UC1 || depth.type() == CV_16SC1);
CV_Assert(mask.empty() || mask.channels() == 1);
// TODO figure out what to do when types are different: convert or reject ?
cv::Mat K_new;
if ((depth.depth() == CV_32F || depth.depth() == CV_64F) && depth.depth() != K.depth())
{
K.convertTo(K_new, depth.depth());
}
else
K_new = K;
K.convertTo(K_new, depth.depth() == CV_64F ? CV_64F : CV_32F); // issue #1021
// Create 3D points in one go.
if (!mask.empty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment