Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Having trouble with using Mat image in pictureBox of Visual C++ CLR project

Mat imgs = imread("d:/s.jpg"); cvtColor(imgs, imgs, CV_BGR2RGB, 1); this->pictureBox1->Image=(gcnew System::Drawing::Bitmap(imgs.cols,imgs.rows,imgs.step.p[0], System::Drawing::Imaging::PixelFormat::Format24bppRgb, System::IntPtr)imgs.data));

it is not working, it only show some white and gray lines Please Help Me thanks

Having trouble with using Mat image in pictureBox of Visual C++ CLR project

Mat imgs = imread("d:/s.jpg"); imread("d:/s.jpg");

cvtColor(imgs, imgs, CV_BGR2RGB, 1); 1);

this->pictureBox1->Image=(gcnew System::Drawing::Bitmap(imgs.cols,imgs.rows,imgs.step.p[0], System::Drawing::Imaging::PixelFormat::Format24bppRgb, System::IntPtr)imgs.data));

it is not working, it only show some white and gray lines Please Help Me thanks