遇到这么一段代码
Mat rgbMat = new Mat(height,width,MatType.CV_8UC3);
Mat yuvMat = new Mat(height + height /2 ,width,MatType.CV_8UC1,YUV_IntPtr);
Cv2.CvtColor(yuvMat,rgbMat,ColorConversionCodes.YUV420pBGR);
我试着修改成这样的
Mat rgbMat = new Mat(height,width,MatType.CV_8UC3);
Mat yuvMat = new Mat(height ,width,MatType.CV_8UC1,YUV_IntPtr);
Cv2.CvtColor(yuvMat,rgbMat,ColorConversionCodes.YUV420pBGR);
发现转换之后的rgbMat的高度小了,但是为啥要height1.5,不能width1.5?