osg Image转opencv Mat
osg::ref_ptr<osg::Image> saveOsgImgObj = new osg::Image(); saveOsgImgObj = captureCallback2Obj->getOsgCameraImage(); cv::Mat opencv_img(saveOsgImgObj->t(), saveOsgImgObj->s(), CV_8UC3); opencv_img.data = (uchar *)saveOsgImgObj->data(); cv::flip(opencv_img, opencv_img, 0); cv::cvtColor(opencv_img, opencv_img, CV_RGB2BGR);
##############