I am trying to get and set pixels of a gray scale image by using emgu Cv with C#. If I use a large image size this error message occurs: "Index was outside the bounds of the array."
If I use an image 200x200 or less then there is no error but I don't understand why.
Following is my code:
Image<Gray , byte> grayImage;
--------------------------------------------------------------------
for (int v = 0; v < grayImage.Height; v++)
{
for (int u = 0; u < grayImage.Width; u++)
{
byte a = grayImage.Data[u , v , 0]; //Get Pixel Color | fast way
byte b = (byte)(myHist[a] * (K - 1) / M);
grayImage.Data[u , v , 0] = b; //Set Pixel Color | fast way
}
}
--------------------------------------------------------------------
http://i306.photobucket.com/albums/nn262/neji1909/9-6-25565-10-39.png
Please help me and sorry I am not good at English.