The pinhole test is a rapid screening technique to check for gross focusing errors in the eyes.
If the vision
improves dramatically with a pinhole we at least know the amblyopia
isn't too severe. The only real way to quantify it is to do a refraction with a device called a phoropter which uses real lenses.