Replace CV_BGRA2RGBA with CV_BGR2RGB

This commit is contained in:
Kalman
2018-08-07 16:58:19 +08:00
parent 6d961203be
commit 67a0356a84
4 changed files with 6 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ cv::Mat frame2mat(const std::shared_ptr<device::Frame> &frame) {
return img;
} else if (frame->format() == Format::BGR888) {
cv::Mat img(frame->height(), frame->width(), CV_8UC3, frame->data());
cv::cvtColor(img, img, CV_BGRA2RGBA);
cv::cvtColor(img, img, CV_BGR2RGB);
return img;
} else {
return cv::Mat(frame->height(), frame->width(), CV_8UC1, frame->data());