Beam emittance measurement by the pepper-pot method