From 6eb57fea654ca768b039d3059d5d866598664df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Sandr=C3=A9n?= Date: Wed, 8 Feb 2017 14:47:29 +0100 Subject: [PATCH] Shadow masks changed to single channel (#985) since rest of the patterns are single channel, the masks should be as well. --- modules/structured_light/src/graycodepattern.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/structured_light/src/graycodepattern.cpp b/modules/structured_light/src/graycodepattern.cpp index ff56a027d..dceaec9fb 100644 --- a/modules/structured_light/src/graycodepattern.cpp +++ b/modules/structured_light/src/graycodepattern.cpp @@ -367,8 +367,8 @@ void GrayCodePattern_Impl::getImagesForShadowMasks( InputOutputArray blackImage, Mat& blackImage_ = *( Mat* ) blackImage.getObj(); Mat& whiteImage_ = *( Mat* ) whiteImage.getObj(); - blackImage_ = Mat( params.height, params.width, CV_8UC3, Scalar( 0, 0, 0 ) ); - whiteImage_ = Mat( params.height, params.width, CV_8UC3, Scalar( 255, 255, 255 ) ); + blackImage_ = Mat( params.height, params.width, CV_8U, Scalar( 0 ) ); + whiteImage_ = Mat( params.height, params.width, CV_8U, Scalar( 255 ) ); } // For a (x,y) pixel of the camera returns the corresponding projector's pixel