The interpretation of high resolution secondary electron images, and quantitative measurements of micrometer size features on integrated circuits, both require accurate modelling of the process of image formation in the scanning electron microscope. A Monte Carlo model, based on the semi-empirical theory of Salow, has been developed which permits the simultaneous computation of the secondary and backscattered yields. The physical constants necessary to apply this model can be derived from straightforward measurements of the total electron yield as a function of beam energy. On the basis of simplifying assumptions line profiles and images can then be simulated for specimens of a given geometry. The application of this technique to the problem of critical dimension metrology in the SEM is illustrated. A comparison of computed and experimental data shows that good qualitative and quantitative agreement is achieved, the quality of the comparison being limited mainly by the poor signal transfer characteristics of the video-chain of the microscope and effects such as sample charging which are not considered in the simulation