From 25061b428021dd39a05aef5ddeb9e4ab5f3c887b Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Wed, 9 Nov 2016 11:35:12 +0100 Subject: [PATCH] convertPointsToHomogeneous: fix output type for depth == CV_32S --- modules/calib3d/src/fundam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/fundam.cpp b/modules/calib3d/src/fundam.cpp index 9af70dd210..63bdff298a 100644 --- a/modules/calib3d/src/fundam.cpp +++ b/modules/calib3d/src/fundam.cpp @@ -954,7 +954,7 @@ void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst ) } CV_Assert( npoints >= 0 && (depth == CV_32S || depth == CV_32F || depth == CV_64F)); - int dtype = CV_MAKETYPE(depth <= CV_32F ? CV_32F : CV_64F, cn+1); + int dtype = CV_MAKETYPE(depth, cn+1); _dst.create(npoints, 1, dtype); Mat dst = _dst.getMat(); if( !dst.isContinuous() )