Optical profilometers can in principle be used to measure the roughness of surfaces that are not accessible for mechanical profilometers. Optical measurements can be performed through a transparent layer because of the noncontacting nature of the measuring principle. In this article the properties of a focus error detection system are given for the general case of scanning free surfaces and for the particular case of a glass plate lying on the scanned surface. Tests show that scanning through a glass plate is possible, but there are some limitations. The conditions under which proper measurements can be performed are described. Some examples of scanning through a transparent layer will be presented in part II of this paper.