public static int[][] toRGB(float[][] gray) {
int [][]imageRGB;
for(int i=0; i<gray.length;i++) {
for(int j=0; j< gray[0].length; j++) {
imageRGB[i][j]=getRGB(gray[i][j]);
}
}
return imageRGB;
}
This method won't work. Java tells me that it's because the variable imageRGB hasn't been initialised. Any idea how to fix this?