Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

How to load an OpenCV Mat image object into Visual C++ Label?

$
0
0
How can I set an opencv Mat image object into a C++/CLI label? I have tried the following.
     

Mat image = imread("C:/Users/Public/Pictures/Sample Pictures/Desert.jpg"); 

 imageLabel->BackgroundImage = image;

But it is simply generating errors.

  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
 Any ideas?


Viewing all articles
Browse latest Browse all 15302

Trending Articles