Replace CV_BGRA2RGBA with CV_BGR2RGB in samples/uvc/camera.cc

This commit is contained in:
Kalman 2018-08-07 17:06:14 +08:00
parent 67a0356a84
commit b9def3128e

View File

@ -144,7 +144,7 @@ int main(int argc, char *argv[]) {
// only lastest frame is valid // only lastest frame is valid
cv::Mat img(400, 1280, CV_8UC3, const_cast<void *>(frame->data)); cv::Mat img(400, 1280, CV_8UC3, const_cast<void *>(frame->data));
cv::cvtColor(img, img, CV_BGRA2RGBA); cv::cvtColor(img, img, CV_BGR2RGB);
cv::imshow("frame", img); cv::imshow("frame", img);
frame = nullptr; frame = nullptr;