Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2016-03-30 07:51:56 -0600

Nbb gravatar image

Display grayscale image in picturebox

Hi,

I am trying to display a grayscale image in a visual studio C++ picture box. I followed the code below yet it says the mixChannels argument are not correct. What is &amp ?

Mat gray_3channels(gray.rows, gray.cols, CV_8UC3);
 Mat in[] = { gray, gray, gray };
 int from_to[] = { 0,0, 1,1, 2,2 };
 mixChannels( in, 3, &gray_3channels, 1, from_to, 3 );

http://answers.opencv.org/question/16573/displaying-grayscale-in-pictureboxpixelformat/

But if anyone knows how else i can easily display grayscale image in a picture box please do tell me. Thanks