Skip to content

Commit 4924bb8

Browse files
committed
Merge pull request #1020 from Sahloul:bugs/python_wrapper/surface_matching
2 parents 0cc63ae + 07126d8 commit 4924bb8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

modules/rgbd/src/depth_to_3d.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,8 @@ namespace rgbd
232232
depth.type() == CV_64FC1 || depth.type() == CV_32FC1 || depth.type() == CV_16UC1 || depth.type() == CV_16SC1);
233233
CV_Assert(mask.empty() || mask.channels() == 1);
234234

235-
// TODO figure out what to do when types are different: convert or reject ?
236235
cv::Mat K_new;
237-
if ((depth.depth() == CV_32F || depth.depth() == CV_64F) && depth.depth() != K.depth())
238-
{
239-
K.convertTo(K_new, depth.depth());
240-
}
241-
else
242-
K_new = K;
236+
K.convertTo(K_new, depth.depth() == CV_64F ? CV_64F : CV_32F); // issue #1021
243237

244238
// Create 3D points in one go.
245239
if (!mask.empty())

0 commit comments

Comments
 (0)