Fix cv exception when using both TRACK_OPTFLOW and ZED_STEREO

This commit is contained in:
Aymeric DUJARDIN
2019-04-24 15:18:41 +02:00
parent bc95ce3c25
commit 42d08fd820

View File

@ -129,7 +129,9 @@ cv::Mat slMat2cvMat(sl::Mat &input) {
cv::Mat zed_capture_rgb(sl::Camera &zed) {
sl::Mat left;
zed.retrieveImage(left);
return slMat2cvMat(left).clone();
cv::Mat left_rgb;
cv::cvtColor(slMat2cvMat(left), left_rgb, CV_RGBA2RGB);
return left_rgb;
}
cv::Mat zed_capture_3d(sl::Camera &zed) {