public void saveHistogram(String path) {
		try {
			if(path == null)
				path = "histogram.csv";
			File file = new File("histogram.csv");
			file.createNewFile();
			FileWriter fileW = new FileWriter(file);
			BufferedWriter buffW = new BufferedWriter(fileW);
			buffW.write("Grayscale");
			for(int i = 0; i < histogram.length; ++i)
				buffW.write(";" + i);
			buffW.write("\n");
			buffW.write("Intensity");
			for(int i = 0; i < histogram.length; ++i)
				buffW.write(";" + histogram[i]);
			buffW.close();
			fileW.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}