diff --git a/src/openpose/utilities/openCv.cpp b/src/openpose/utilities/openCv.cpp index c66a78d13144e13772503abe875436eaabb4b369..38ce44ddaa279805325f97e5102b6a8eef2d07ae 100644 --- a/src/openpose/utilities/openCv.cpp +++ b/src/openpose/utilities/openCv.cpp @@ -141,7 +141,7 @@ namespace op // Empirically tested - OpenCV is more efficient normalizing a whole matrix/image (it uses AVX and // other optimized instruction sets). // In addition, the following if statement does not copy the pointer to a cv::Mat, just wrapps it. - cv::Mat floatPtrImageCvWrapper(height, width, CV_32FC3, floatPtrImage); + cv::Mat floatPtrImageCvWrapper(height*width*3, 1, CV_32FC1, floatPtrImage); // CV_32FC3 warns about https://github.com/opencv/opencv/issues/16739 floatPtrImageCvWrapper = floatPtrImageCvWrapper*(1/256.f) - 0.5f; #endif }