A recently found extension of the Nijboer-Zernike approach to optical aberrations allows analytic computation of the intensity point-spread function in the focal region of an optical system. Here, the exit pupil function is expanded as a Zernike series , with a complex coefficient of the single aberration , and the contribution of each of the terms of this series to the complex-amplitude point-spread function U in the focal region has an analytic form. This representation of U , and hence of the intensity point-spread function I = | U |2, is highly efficient since normally a pupil function is already accurately described by a few ß's. In this paper, the inverse problem of retrieving the ß's from a given intensity I in the focal region is studied. A computation scheme for solving this nonlinear estimation problem, under the assumption of small-to-medium-large aberrations, is proposed. The key step is to linearize the theoretical intensity, comprising the ß's as unknowns, by deleting second-order terms, and to optimize the match between the linearized, theoretical intensity and the given intensity in the focal region. The special case of a small pure-phase aberration pupil function is separately considered. For general pupil functions (also containing amplitude errors) or larger pure-phase aberrations, the linearization error(s) cannot be ignored. By adopting a predictor-corrector approach, the effect of linearization can be eliminated iteratively and this yields accurate or even perfect retrieval of aberrations well beyond the diffraction limit. Although the method was developed for lithographic applications, with numerical apertures = 0.60 and almost-ideal point sources, it has potential applications to more general light optics settings (microscopy, astronomy,...). The application range of the method is, furthermore, extended in this paper to cover the medium-high numerical aperture range (= 0.80) and to the case that the lateral size of the illumination source is comparable to the diffraction unit. The paper is explorative in nature and aims at illustrating the potential and key features of the methods, on the whole by showing results from simulations. Accordingly, little effort has been spent on addressing the many fundamental aspects of a mathematical, statistical and modelling nature; a list containing these fundamental issues is included at the end of the paper.