We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b527ab9 commit 07126d8Copy full SHA for 07126d8
modules/rgbd/src/depth_to_3d.cpp
@@ -232,14 +232,8 @@ namespace rgbd
232
depth.type() == CV_64FC1 || depth.type() == CV_32FC1 || depth.type() == CV_16UC1 || depth.type() == CV_16SC1);
233
CV_Assert(mask.empty() || mask.channels() == 1);
234
235
- // TODO figure out what to do when types are different: convert or reject ?
236
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;
+ K.convertTo(K_new, depth.depth() == CV_64F ? CV_64F : CV_32F); // issue #1021
243
244
// Create 3D points in one go.
245
if (!mask.empty())
0 commit comments