如何将 opencv Mat 图像对象设置为 C++/CLI 标签?我尝试了以下方法。
Mat image = imread("C:/Users/Public/Pictures/Sample Pictures/Desert.jpg");
imageLabel->BackgroundImage = image;
但它只是产生错误。
Error 1 error C2664: 'void System::Windows::Forms::Control::BackgroundImage::set(System::Drawing::Image ^)' : cannot convert parameter 1 from 'cv::Mat' to 'System::Drawing::Image ^' c:\users\yohan\documents\visual studio 2010\projects\opencvfinaltest\opencvfinaltest\Form1.h 144 1 OpenCVFinalTest
有任何想法吗?