I'm a beginner in Java and a geomatics student. I’am using IntelliJ. I have a math and geographical problem in java. I work with a image built with an array of pixels
My pixels are stocked in a multidimensional array. The image range is : 6784 in term of pixels, so the pixel in the middle is the pixel number 3392. This pixel is the only one which have geographical coordinates in UTM area 30 (France). On each side of that pixel, there is the other pixel which doesn’t have geographical coordinates. I would like to deduce their coordinates with the informations I have :
Resolution of a pixel is 0.03, each pixel measuring 3 centimeters. My image is 50.94 meters on each side of the central pixel.
Any ideas ? Thank you for the help !
Snippet :
int w = 3392*2, h = pixels.length / w; int i = 0,j = 0; byte[][] tableauMulti = new byte[h][w]; for ( int pos = 0; pos < pixels.length; pos++ ) { i = pos / w; j = pos % w; tableauMulti[j] = pixels[pos]; } for (int numRow = 0; numRow < h; numRow++) { int pixelMilieu = tableauMulti[numRow][3392]; }
أكثر...
My pixels are stocked in a multidimensional array. The image range is : 6784 in term of pixels, so the pixel in the middle is the pixel number 3392. This pixel is the only one which have geographical coordinates in UTM area 30 (France). On each side of that pixel, there is the other pixel which doesn’t have geographical coordinates. I would like to deduce their coordinates with the informations I have :
Resolution of a pixel is 0.03, each pixel measuring 3 centimeters. My image is 50.94 meters on each side of the central pixel.
Any ideas ? Thank you for the help !
Snippet :
int w = 3392*2, h = pixels.length / w; int i = 0,j = 0; byte[][] tableauMulti = new byte[h][w]; for ( int pos = 0; pos < pixels.length; pos++ ) { i = pos / w; j = pos % w; tableauMulti[j] = pixels[pos]; } for (int numRow = 0; numRow < h; numRow++) { int pixelMilieu = tableauMulti[numRow][3392]; }
أكثر...