Can someone help me in getting cv::Mat from Cvb::imageptr in C++? I dont see a document or example program doing this

{
 path = Cvb::ExpandPath(path);
        // open a device
        auto device = Cvb::DeviceFactory::Open(path);
        auto stream = device->Stream();
        Cvb::WaitStatus res;
        Cvb::UI::ImageView view2;
        view2.setWindowIcon(QIcon(":/qttutorial.png"));
        view2.SetUploadMode(Cvb::UI::UploadMode::Viewport);
        view2.SetRenderEngine(Cvb::UI::RenderEngine::OpenGL2);
        Cvb::ImagePtr img = stream->GetSnapshot(res);

       cv::Mat imageMat = .....???

}

The conversion is necessary to convert to regular Mat OpenCV, where a lot of image based functions can be easily done.

A post was merged into an existing topic: Lib Bridge | CVB to OpenCV