I am converting some C code into Java which includes image processing. However, I am stuck in a situation where I have to convert some lines of codes which include pointer calculations:
for(i=xMin[k];i<=xMax[k];i++)
{
for(j=yMin[k];j<=yMax[k];j++)
{
if (Bimg[i][j]== k1)
{
/* accessing single channel for r g b value */
b = data[i*step + j*channels + 0];
g = data[i*step + j*channels + 1];
r = data[i*step + j*channels + 2];
}
}
}
Can anybody please tell me how to convert this "data" pointer into java equivalent? Here, "data" is a pointer variable.