Replace CV_BGRA2RGBA with CV_BGR2RGB
This commit is contained in:
parent
6d961203be
commit
67a0356a84
|
@ -142,8 +142,8 @@ int main(int argc, char *argv[]) {
|
|||
cv::Mat right_img(
|
||||
right_data.frame->height(), right_data.frame->width(), CV_8UC3,
|
||||
right_data.frame->data());
|
||||
cv::cvtColor(left_img, left_img, CV_BGRA2RGBA);
|
||||
cv::cvtColor(right_img, right_img, CV_BGRA2RGBA);
|
||||
cv::cvtColor(left_img, left_img, CV_BGR2RGB);
|
||||
cv::cvtColor(right_img, right_img, CV_BGR2RGB);
|
||||
cv::hconcat(left_img, right_img, img);
|
||||
} else {
|
||||
return -1;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -79,7 +79,7 @@ void Dataset::SaveStreamData(
|
|||
cv::Mat img(
|
||||
data.frame->height(), data.frame->width(), CV_8UC3,
|
||||
data.frame->data());
|
||||
cv::cvtColor(img, img, CV_BGRA2RGBA);
|
||||
cv::cvtColor(img, img, CV_BGR2RGB);
|
||||
cv::imwrite(ss.str(), img);
|
||||
} else {
|
||||
cv::Mat img(
|
||||
|
|
|
@ -106,11 +106,11 @@ int main(int argc, char *argv[]) {
|
|||
cv::Mat left_img(
|
||||
left_frame->height(), left_frame->width(), CV_8UC3,
|
||||
left_frame->data());
|
||||
cv::cvtColor(left_img, left_img, CV_BGRA2RGBA);
|
||||
cv::cvtColor(left_img, left_img, CV_BGR2RGB);
|
||||
cv::Mat right_img(
|
||||
right_frame->height(), right_frame->width(), CV_8UC3,
|
||||
right_frame->data());
|
||||
cv::cvtColor(right_img, right_img, CV_BGRA2RGBA);
|
||||
cv::cvtColor(right_img, right_img, CV_BGR2RGB);
|
||||
cv::hconcat(left_img, right_img, img);
|
||||
} else {
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user