Convert format by mainipulating pixels
This commit is contained in:
@@ -47,7 +47,6 @@ 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_BGR2RGB);
|
||||
return img;
|
||||
} else {
|
||||
return cv::Mat(frame->height(), frame->width(), CV_8UC1, frame->data());
|
||||
|
||||
Reference in New Issue
Block a user