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

		int[][] I = constructI(example);
		int x = I.length - 1;
		int y = I[0].length - 1;

		if (x % 8 != 0 || y % 8 != 0) {
			throw new RuntimeException(
					"ExtractFeature->extractInt: the example should have width and height of 2^(n+3), n>=0");
		}

		if (x < 8 || y < 8) {
			throw new RuntimeException("example should be at least 8*8 ");
		}

		// Use 2-rec, 4-rectangle features of Viola-Jones
		// Here we only construct 32 features in total
		// 2-rec -> 16 features; 4-rec -> 32 coupling features
		int[] binaryFeature = new int[48];

		// Extracting features
		int xIncr = x / 8;
		int yIncr = y / 8;
		int next = 0;

		// 2-rec vertical
		for (int i = 0; i < 8; i++) {

			int part1 = I[x / 2][yIncr * (i + 1)] - I[x / 2][yIncr * i];
			int part2 = I[x][yIncr * (i + 1)] - I[x][yIncr * i];
			binaryFeature[next] = part2 - part1 - part1;
			next++;

		}

		// 2-rec horizontal
		for (int i = 0; i < 8; i++) {

			int part1 = I[xIncr * (i + 1)][y / 2] - I[xIncr * i][y / 2];
			int part2 = I[xIncr * (i + 1)][y] - I[xIncr * i][y];
			binaryFeature[next] = part2 - part1 - part1;
			next++;

		}

		// 3-rec - coupling horizontal
		xIncr = x / 4;
		yIncr = y / 8;
		for (int i = 1; i <= 8; i++) {

			int part1 = I[xIncr * 1][yIncr * i] - I[xIncr * 1][yIncr * (i - 1)];
			int part2 = I[xIncr * 2][yIncr * i] - I[xIncr * 2][yIncr * (i - 1)]
					- I[xIncr * 1][yIncr * i] + I[xIncr * 1][yIncr * (i - 1)];
			int part3 = I[xIncr * 3][yIncr * i] - I[xIncr * 3][yIncr * (i - 1)]
					- I[xIncr * 2][yIncr * i] + I[xIncr * 2][yIncr * (i - 1)];
			int part4 = I[xIncr * 4][yIncr * i] - I[xIncr * 4][yIncr * (i - 1)]
					- I[xIncr * 3][yIncr * i] + I[xIncr * 3][yIncr * (i - 1)];

			binaryFeature[next] = part3 + part1 - part2;
			next++;
			binaryFeature[next] = part4 + part2 - part3;
			next++;

		}

		// 3-rec - coupling vertical
		xIncr = x / 8;
		yIncr = y / 4;
		for (int i = 1; i <= 8; i++) {

			int part1 = I[xIncr * i][yIncr * 1] - I[xIncr * (i-1)][yIncr * 1];
			int part2 = I[xIncr * i][yIncr * 2] - I[xIncr * (i-1)][yIncr * 2]
					- I[xIncr * i][yIncr * 1] + I[xIncr * (i-1)][yIncr * 1];
			int part3 = I[xIncr * i][yIncr * 3] - I[xIncr * (i-1)][yIncr * 3]
					- I[xIncr * i][yIncr * 2] + I[xIncr * (i-1)][yIncr * 2];			
			int part4 = I[xIncr * i][yIncr * 4] - I[xIncr * (i-1)][yIncr * 4]
							- I[xIncr * i][yIncr * 3] + I[xIncr * (i-1)][yIncr * 3];

			binaryFeature[next] = part3 + part1 - part2;
			next++;
			binaryFeature[next] = part4 + part2 - part3;
			next++;

		}

		// 4-rec - coupling TODO

		return binaryFeature;

	}