Can anybody tell me the correct java code for this c++ code snippet:
output.at(x, y) = target.at(dx, dy);
I have tried this java code and they are displacing pixel but not showing image clearly :
output.put(x, y, target.get(dx, dy));
Can anybody tell me the correct java code for this c++ code snippet:
output.at(x, y) = target.at(dx, dy);
I have tried this java code and they are displacing pixel but not showing image clearly :
output.put(x, y, target.get(dx, dy));
For one channel images e.g. grey-scale; 0 ~ 255
Getting a pixel value
double pixelValue = image.get(i,j)[0];
Setting a pixel value
image.put(i,j,230);
For 3 channel images e.g. RGB (3 values 0 ~ 255)
Getting a pixel (double[] array will have 3 values)
double[] pixelValue = image.get(i,j);
Setting a pixel with 3 RGB values
image.put(i,j,255,250,100); // yellow color