Add support for CV_BGR2RGB color transformation

This commit is contained in:
Anshul Jain 2015-10-08 12:14:18 -07:00
parent c7037ef20c
commit a2073757a2

View File

@ -1785,6 +1785,8 @@ NAN_METHOD(Matrix::CvtColor) {
iTransform = CV_BayerRG2BGR; iTransform = CV_BayerRG2BGR;
} else if (!strcmp(sTransform, "CV_BayerGR2BGR")) { } else if (!strcmp(sTransform, "CV_BayerGR2BGR")) {
iTransform = CV_BayerGR2BGR; iTransform = CV_BayerGR2BGR;
} else if (!strcmp(sTransform, "CV_BGR2RGB")) {
iTransform = CV_BGR2RGB;
} else { } else {
iTransform = 0; // to avoid compiler warning iTransform = 0; // to avoid compiler warning
Nan::ThrowTypeError("Conversion code is unsupported"); Nan::ThrowTypeError("Conversion code is unsupported");