From: Vlad Joukov on
Hello I am trying to convert a C image to mxArray.
I am able to retrieve the pixels of the image and I can create the
proper size mxArray. What is the correct way to assign the values?

mwSize dims[] = {image.Height,image.Width,3};
mxCreateNumericArray(3,dims,mxUINT8_CLASS,mxREAL);

for(int i=0;i<image.Height;i++)
{

for(int j=0;j<image.Width;j++)
{
GetPixel(image,i,j);
pixel has y,u,v unsigned short components.
how do I assign the y,u,v values to correct locations in the mxArray ??
}

}