public static int[][] constructI(int[][] example) {

		int x, y;
		x = example.length;
		if (example.length > 0) {
			y = example[0].length;
		} else {
			y = 0;
			throw new RuntimeException(
					"ExtractFeature->constructI(): This is not 2-d array");
		}

		int[][] I = new int[x + 1][y + 1];
		I[0][0] = example[0][0];

		for (int i = 0; i <= x; i++) {
			I[i][0] = 0;
		}

		for (int j = 0; j <= y; j++) {
			I[0][j] = 0;
		}

		for (int i = 1; i <= x; i++) {
			for (int j = 1; j <= y; j++) {

				I[i][j] = example[i - 1][j - 1] + I[i - 1][j] + I[i][j - 1]
						- I[i - 1][j - 1];

			}
		}

		return I;
	}