First, you generate the noise map with the perlin noise function shown in the project.
The noise map has to be the same size as your original photo, so make a noise map with the same size.
If you want extreme graininess, just use Layer 1 or 2.
When you have the noise map, that's half the battle.
All what's left to do is to mix the original photo and the noise map together, using color multiplication, blending, color addition or some other color mixing algorithm, depending on the effect you want to achieve