private static int[][] getNeighbours(ImageData imageData, int mx, int my, int x, int y, int w, int h) {
		int[][] pixels = new int[h][w];
		int iw = w/2;
		int ih = h/2;
		for (int i = -ih; i <= ih; i++) {
			for (int j = -iw; j <= iw; j++) {
				int xx = x + j;
				xx = xx < 0 ? 0 : xx > mx ? mx : xx;
				int yy = y + i;
				yy = yy < 0 ? 0 : yy > my ? my : yy;

				pixels[i + ih][j + iw] = imageData.getPixel(xx, yy);

			}
		}
		return pixels;
	}