private static void diffusePixel(Image original, Image diffused, int i, int j, BorderDetectorFunction pf) {
		for(ChannelType channel: Image.rgbValues()){
			double oldValueIJ = original.getPixel(i, j, channel);
	
			double DnIij = i > 0 ? original.getPixel(i - 1, j, channel)
					- oldValueIJ : 0;
			double DsIij = i < original.getWidth() - 1 ? original.getPixel(i + 1, j, channel)
					- oldValueIJ : 0;
			double DeIij = j < original.getHeight() - 1 ? original.getPixel(i, j + 1, channel)
					- oldValueIJ : 0;
			double DoIij = j > 0 ? original.getPixel(i, j - 1, channel)
					- oldValueIJ : 0;
	
			double Cnij = pf.g(DnIij);
			double Csij = pf.g(DsIij);
			double Ceij = pf.g(DeIij);
			double Coij = pf.g(DoIij);
	
			double DnIijCnij = DnIij * Cnij;
			double DsIijCsij = DsIij * Csij;
			double DeIijCeij = DeIij * Ceij;
			double DoIijCoij = DoIij * Coij;
	
			double lambda = 0.25;
			double newValueIJ = oldValueIJ + lambda
					* (DnIijCnij + DsIijCsij + DeIijCeij + DoIijCoij);
			diffused.setPixel(i, j, channel, newValueIJ);
		}
	}