public class ImageDataTest {
public static void main(String[] args) {
// float[][][] integralSum = new float[35+1][2570][3469];
ImageData d = new ImageData();
float scale = 0.5f;
d.importData("input_tiff/germany_coordinates.dat", scale);
// d.importData("input_tiff/test.dat");
//MemoryUtil.printMemoryInMB("after importData");
//MemoryUtil.freeMemory();
System.out.println(d.getNumberOfClasses());
System.out.println(d.getNumberOfPoints());
Vector<ColorModel> classColors = ColorReader
.getColorsAsColorModel("input_tiff/germany_colors.dat");
long currentTimeInSeconds = System.currentTimeMillis();
MemoryUtil.printMemoryInMB("before computing saliency");
d.computeSaliency(20, classColors);
MemoryUtil.printMemoryInMB("after computing saliency");
currentTimeInSeconds = System.currentTimeMillis()
- currentTimeInSeconds;
System.out.println("saliency time: " + currentTimeInSeconds + "milliseconds");
currentTimeInSeconds = System.currentTimeMillis();
d.computeVisibility(14);
MemoryUtil.freeMemory();
MemoryUtil.printMemoryInMB("after computing visibility");
currentTimeInSeconds = System.currentTimeMillis()
- currentTimeInSeconds;