public static double[][] FromImage(String path){
		ArrayList<double[]> A = new ArrayList<>();

		BufferedReader br = null;
		try {
			br = new BufferedReader(new FileReader(path));
			String line = null;
			while ((line = br.readLine()) != null) {
				String split[] = line.split(",");

				double[] row = new double[split.length];
				for(int i=0; i<row.length; i++)
					row[i] = Double.parseDouble(split[i]);
				A.add(row);
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (NumberFormatException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally{
			if(br != null)
				try {
					br.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
		}

		double[][] I = null;
		if(A.size()>0){
			I = new double[A.size()][A.get(0).length];
			for(int i=0; i<A.size(); i++){
				I[i] = A.get(i);
			}
		}
		return I;
	}