Output RGBA images when bayer_xx2YYYA is called

This commit is contained in:
Mark Harfouche 2018-09-07 15:57:55 -04:00
parent 286c2c236b
commit 53bbed89ae

View File

@ -1686,8 +1686,11 @@ void cv::demosaicing(InputArray _src, OutputArray _dst, int code, int dcn)
CV_Error(CV_StsUnsupportedFormat, "Bayer->Gray demosaicing only supports 8u and 16u types");
break;
case CV_BayerBG2BGR: case CV_BayerGB2BGR: case CV_BayerRG2BGR: case CV_BayerGR2BGR:
case CV_BayerBG2BGRA: case CV_BayerGB2BGRA: case CV_BayerRG2BGRA: case CV_BayerGR2BGRA:
if (dcn <= 0)
dcn = 4;
/* fallthrough */
case CV_BayerBG2BGR: case CV_BayerGB2BGR: case CV_BayerRG2BGR: case CV_BayerGR2BGR:
case CV_BayerBG2BGR_VNG: case CV_BayerGB2BGR_VNG: case CV_BayerRG2BGR_VNG: case CV_BayerGR2BGR_VNG:
{
if (dcn <= 0)