static void initiateParameters() throws IOException {
		InputParams inputParams = new InputParams();
		while (!inputParams.isFinised) {
			sikuli.wait(1);
		}

		rowNum = inputParams.getRowNum();
		cowNum = inputParams.getCowNum();
		cards = new Card[rowNum + 2][cowNum + 2];
		isScaned = new boolean[rowNum + 2][cowNum + 2];

		for (int i = 0; i < rowNum + 2; i++)
			for (int j = 0; j < cowNum + 2; j++) {
				cards[i][j] = new Card();
				if (i == 0 || j == 0 || i == rowNum + 1 || j == cowNum + 1) {
					cards[i][j].setKind(0);
					isScaned[i][j] = true;
				}
			}
		capturePicDirectory = System.getProperty("user.dir");
		capturePicDirectory += File.separator + "capture.png";
		BufferedImage fatherImage = ImageIO.read(new File(capturePicDirectory));
		captureHeight = fatherImage.getHeight();
		captureWidth = fatherImage.getWidth();
		sikuli.wait(5);
		CardHeight = captureHeight / rowNum;
		CardWidth = captureWidth / cowNum;
		ScreenRegion fatherRegion = sikuli.find(capturePicDirectory);
		sikuli.wait(5);
		Assert.assertNotNull(fatherRegion);
		GameX = fatherRegion.getUpperLeftCorner().getX();
		GameY = fatherRegion.getUpperLeftCorner().getY();

		Coordinate coordinate = null;
		int kind = 1;
		while ((coordinate = getNextEmpty()) != null) {
			BufferedImage sonImage = null;
			sonImage = fatherImage.getSubimage((coordinate.getC() - 1)
					* (CardWidth + 1), (coordinate.getR() - 1)
					* (CardHeight + 1), CardWidth - cowNum + 1, CardHeight
					- rowNum + 1);
			Target finaltarget = new ColorImageTarget(sonImage);
			// set the similarity between the target region and the screenRegion
			finaltarget.setMinScore(0.8);
			List<ScreenRegion> finalRegions = sikuli.findAll(finaltarget);
			// just for debuging
			for (ScreenRegion screenRegion : finalRegions) {
				int c = (screenRegion.getCenter().getX() - GameX) / CardWidth;
				int r = (screenRegion.getCenter().getY() - GameY) / CardHeight;
				cards[r + 1][c + 1] = new Card();
				cards[r + 1][c + 1].setKind(kind);
				isScaned[r + 1][c + 1] = true;
			}
			kind++;
		}
	}