private int addPNoise(int pixel, Random random) {
		// init:
		double L = Math.exp(-noiseFactor * MEAN_FACTOR);
		int k = 0;
		double p = 1;
		do {
			k++;
			// Generate uniform random number u in [0,1] and let p ? p � u.
			p *= random.nextDouble();
		} while (p >= L);
		double retValue = Math.max((pixel + (k - 1) / MEAN_FACTOR - noiseFactor), 0);
		return (int) retValue;
	}