Next Article in Journal
Effects of a Forest-Based Exercise Program on Physical Function According to Sleep Quality in Older Adults with Mild Cognitive Impairment: Pilot Study
Next Article in Special Issue
Raman Hyperspectral Imaging of Nanofibers for Tissue Engineering Applications
Previous Article in Journal
Prediction of the Remaining Life of Rolling Bearings Based on Health Indicators and Temporal Attention Networks
Previous Article in Special Issue
Association of Masseter Muscle Shear Modulus and Thickness with Y-Balance Test Performance Among Healthy Adults
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Estimating the Transfer Functions of Optical Imaging Systems from Their Degraded Images by Optimization and Global Search Algorithms

by
Nahed H. Solouma
1,*,
Michael R. Gardner
1,
Noura E. Negm
2 and
Sadeq S. Alsharafi
3,*
1
Biomedical Engineering Department, College of Engineering, King Faisal University, P.O. Box 400, Al-Ahsa 31982, Saudi Arabia
2
Biophotonics Lab, National Institute of Laser Enhanced Sciences, Cairo University, Giza 12613, Egypt
3
National Magnetic Resonance Research Center (UMRAM), Bilkent University, Ankara 06800, Turkey
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2026, 16(12), 5868; https://doi.org/10.3390/app16125868
Submission received: 6 May 2026 / Revised: 2 June 2026 / Accepted: 4 June 2026 / Published: 10 June 2026
(This article belongs to the Special Issue Advanced Biomedical Imaging Technologies and Their Applications)

Abstract

Optical imaging is among the safest and most highly impactful biomedical imaging modalities. Aberration in optical imaging systems leads to distorted images. This distortion is almost nonlinear and hence affects the relative size, intensity and appearance of image details. Image aberration has many types, with some or all of them able to be imposed on the image based on the quality of the imaging system and/or surrounding conditions. Many approaches have been introduced to remove or minimize aberration from optical images. If the transfer function of an imaging system and the function of the noise added during the imaging process are known, then an ideal image can be obtained from the image produced by this system. The point spread function (PSF) of an optical imaging system is the image it produces for a point object. PSF is the observable form of the transfer function. The transfer function itself is the exit pupil function or typically the system aberration. The nonlinearity and multiplicity of the aberration imposed on the image, together with the added noise, make it difficult to obtain the transfer function from the degraded images. In this work, optimization and global search techniques are utilized in an iterative image restoration algorithm to estimate the transfer function and restore the image. The proposed technique updates an initially suggested solution of transfer function by optimizing the aberration coefficients. The final solution of the transfer function and hence the PSF is reached when the optimum restored image is obtained. The proposed algorithm is validated by a set of 12 images degraded by different combinations of aberration patterns. Many statistical metrics are used to assess the performance of the proposed algorithm, resulting in a 100% success rate with SSIM equals 1 and a MAE range from 0 to 1 × 10 8 .

1. Background and Literature Review

In the medical field, optical imaging remains a vital imaging tool for many biological and physiological studies. A main issue in optical imaging is the aberration imposed on the images by the imaging system, which leads to image distortion. The aberration comes from the limitations of the design of optical components, the surrounding conditions and/or the physical characteristics of the imaged objects [1,2]. The lens itself is an imaging system, although sophisticated systems often have many components. Therefore, in optical imaging, the lens is generally used to refer to the imaging system.
A collimated beam has a planer wavefront that keeps its shape when it propagates through a homogeneous and uniform medium. Passing through a non-planar optical element or lens, this wavefront gets distorted by aberration. Aberration is due to the deviation of rays, departing from a single point on the object, from their expected paths. As a result, rays from a single point on the object reach the sensor, or the image plane, at different points with different intensities. And hence, point on the object is not represented by a point on the image but rather by a shape; however, the point itself can still be observed in this shape on the image. If this is applied to all points of the object, intuitively, it leads to the formation of an image distorted by the rays’ deviations [3,4].
The image plane is the plane on which the best image can be formed. The image is fully described by the spatial distribution of amplitude and phase. However, the observable image is the spatial distribution of light intensities simulating the distribution of light intensities coming from the object. Taking into account that light intensity is given by the squared amplitude of the beam, denote the 2D object and the image functions by f ( x , y ) and g ( x , y ) respectively. An ideal system produces an ideal image g x , y = f ( x , y ) . As a system, the output of the optical imaging system is given by
g x , y = h x , y f x , y + n x , y
where h x , y and n ( x , y ) are the system transfer function and the noise added to the image by the environment, respectively. In the frequency domain, it is given by
G u , v = H u , v · F u , v + N u , v  
The formula of the produced image in Equation (1) comes from the fact that each point on the object sends a cone of light covering the full extent of the lens. This means that each point on the lens collects (i.e., adds) rays from all points on the object and sends them to different points on the image plane. A cone of rays emanates from one point on the object, passes the lens and is focused onto the image plane. If the system is ideal, it focuses this cone to a single point on the image plane and hence produces an ideal image. However, nothing created by humans is ideal, and the cone is focused to a shape (e.g., a spot) rather than a point. This happens with cones from each point on the object, which leads to an overall distorted image. The noise is added to the image by the surrounding conditions. This definition means that the image is the convolution of the object function and the transfer function plus the noise, as described by Equation (1).
So, the transfer function h ( x , y ) is basically the image of a point source if no noise is added. The point source is represented by a delta or an impulse function, and hence the transfer function is also called the impulse response of the system. Therefore, for a point source,
P o b j = δ ( x , y ) P S F = I x , y = h ( x , y ) 2
where P o b j is a point object given by the delta or impulse function and P S F (Point Spread Function) is its observable image function given by the intensity distribution I ( x , y ) over the space of the image. The transfer function h ( x , y ) is the spatial distribution of light amplitude and phase. To clarify, consider a planar uniform wavefront passing through an optical element or system that becomes deformed due to the lens shape into a non-planar wavefront that reaches the sensor with different intensities, i.e., non-uniform. The shape of the lens pushes rays to pass slower or faster than each other with slightly different deviations, leading to an aberrated wavefront. As a result, the aberration pattern is the deviation or spatial error function between the planar wavefront and its deformed wavefront. This wavefront deviation or aberration pattern is denoted by w ( x , y ) and w ( r , θ ) in the Cartesian and polar coordinates, respectively. In the frequency domain, the aberration pattern is described by the phase differences between the shape of the original and the deformed wavefronts, θ u , v . Consequently, it is more easily studied in the frequency domain [5]. The lens aberration is imposed to any imaged object either it is a point or any other shape and is denoted by
A b r r n = θ u , v
where θ is the phase difference and u , v are the spatial frequencies in the x and y directions, respectively.
To decrease the lens aberration, a stop aperture is placed after the lens, as shown in Figure 1. This allows only paraxial rays to pass to the image plane. Paraxial rays undergo less deviations than peripheral rays. The stop aperture is called the exit pupil. In all, the aperture multiplies the wavefront by a zero-one function outside and inside its circumference, respectively. This is just an apodization function and is given by
x , y = 1                                   0 r 1 0                                                   r > 1               ,                               r = x 2 + y 2    
where r is the radius of the pupil. The aberration and, consequently, the transfer function is typically measured after the exit pupil, and that’s why it is called the pupil function. For a circular aperture, the pupil function is given in the polar coordinate by
P r , θ = A r , θ e j 2 π w r , θ = H ( r , θ )
where A ( r , θ ) , w r , θ and H ( r , θ ) are the notations of the apodization function, the aberration pattern and the transfer functions in the polar coordinates, respectively.
From the above analysis and as provided in [6], the transfer function in the frequency domain is given by
H u , v = A u , v e j θ u , v
Different optical elements impose different aberration patterns. For a single lens, the point object appears as a shape in the image. For a 3D image, this shape may be a sphere, an ellipsoid, etc. For a 2D image, the point object may appear in the image as a spot, a comma, etc., as shown in Figure 1. As an example, if the transfer function is a Gaussian spot, then the narrower the spot, the sharper the PSF and the better the lens. That is why the image of a point object is called the Point-Spread Function (PSF), as it indicates how spread the image of a point is [6].
However, the mathematical foundation of aberration in the spatial domain is done starting from the fact that the aberration is the wavefront deviation. Aberration has different forms or patterns. Practically, all patterns are imposed on the image but with different weights according to quality of the optical elements used. So, the overall aberration is the summation of nonlinear patterns with different weights, and hence it is not easy to fit it in a systematic mathematical function. In 1934, Frits Zernike, the famous Dutch physicist, introduced the sequence of Zernike polynomials. These polynomials are orthogonal over a unit circle. Zernike reported the great similarity between these polynomials and aberration patterns for the circular exit pupil and [7]. Decomposing the aberration to its different patterns, these patterns are also orthogonal over a unit circle. Therefore, the aberration wavefront w ( ρ , θ ) is the summation of Zernike terms with different coefficients representing the weights of different aberration patterns. Details of different Zernike polynomials and different aberration types are provided in [7,8,9]. A lens or an optical imaging system imposes multiple types of aberration on the produced image [10]. The wavefront aberration is given in the Cartesian and polar coordinates by
w x , y = k = 1 i C k Z k ( x , y )
w r , θ = k = 1 i C k Z k r , θ
where Z k is the kth Zernike term, C k is the coefficient of the kth term and i is the number of Zernike terms used to describe the aberration as accurately as possible. The aberration types are usually sorted in triangular outlines called aberration pyramid. On the apex, zeroth order which has only one pattern called piston. The first order has two patterns: tilt-x and tilt-y. The second order has three patterns: astigmatism ± 45 ° and defocus. The third order has four patterns: trefoil-x, trefoil-y, coma-x and coma-y, and so on [10].
Theoreticaaly, the number of Zernike terms i = , but usually few types or even one type of aberration is dominant for a lens or a system. These dominant types have the greatest coefficients and are enough to be defined for aberration correction [10]. In [10], the authors provide the details of 15 types of aberration representing the first five orders. Table 1 presents 5 of these 15: piston, tilt or prism along the x-direction, coma in the x-direction, defocus and primary spherical with their formulae in the polar and Cartesian coordinates. Some other patterns of these 15 are used in this work and are presented in Table 2.
From Equations (6) and (7) and over the pupil area,
h x , y = a x , y w x , y    
H u , v = A u , v e j 2 π W u , v
To improve the optical image, the researchers provided many techniques to remove or minimize the aberrations. A single optical element or system can impose one or more aberration types on the produced image. The imposed aberration types are usually unknown and have different coefficients. This makes it too difficult to remove aberration, but the good news is that one or two types of imposed aberration are dominant according to the values of their coefficients. Trials are usually done to remove such dominant aberration types in a process called aberration correction [3,4,5,6].
From Equation (6), the system transfer function is the exit pupil function with aberration representing the phase of such function. Therefore, knowing the transfer function, the aberration can be removed using the inverse function. However, practical handling is not always that simple because of the nonlinearity of aberration as well as the noise added to images during capture [9].
A lot of research has been conducted to reduce the aberration of optical images, either by digital image processing or using the adaptive optics kits aligned with the optical imaging system. The use of adaptive optics, either regarding the size or alignment, is expensive and adds complexity to the system.
In the field of digital image processing, many researchers have introduced computational methods to estimate the original image from the aberrated image with or without knowing the imposed aberrations. The new approaches use a deconvolution algorithm to deblur the aberrated images [11,12]. If the transfer function of the imaging system is known, the reconstructed image is simply obtained by deconvolution of the aberrated image with the transfer function. The advantage of using post-processing by digital algorithms can be extended to enhance the resolution and contrast of the image and to denoise the image with no cost. Unfortunately, the transfer system is almost unknown. Using blind deconvolution approaches suggested by many studies is not guaranteed to give an accurate image reconstruction [13].
Many modern approaches to computational aberration correction are based on deep learning (DL) methods. For example, Li trained a DL model with a set of optical lenses and their corresponding images [14,15]. Their system takes the aberrant image and the PSF map as inputs and outputs a corrected image. In another example of DL-based aberration correction, Eboli reported a “blind” optical aberration compensation technique in which chromatic aberrations were corrected using a convolutional neural network trained to minimize residuals between the red/green and blue/green planes [16]. More recently, Gong reported a DL-based approach in which the physical properties of optical lenses were incorporated into an aberration correction network [17].
While the most recent examples of aberration correction incorporate a physics-informed approach, these techniques have largely avoided differentiable optical models or the discussion of fundamental aberration theory with Zernike coefficients. Liaudat proposed such a model in which the wavefront itself is considered, not merely the pixels of the image [18]. Another recent example in aberration correction that considers Zernike coefficients is the work of Sauniere, in which the team used a DL approach to extract Zernike coefficients from a low-resolution PSF image [19]. These DL approaches are limited in that they require advanced computing power. There remains a gap in the literature for advanced aberration correction methods that do not rely on DL. Such an analytical system would speed up aberration correction, a proposition that would be useful in many areas where optical imaging is employed. To test the validity of the proposed method, a reference high-quality image was used, a degraded version was obtained by convolving the reference image by a known aberration pattern, obtaining both the restored image and the test pattern. Through visual investigation, the restored method was identical to the reference image, and the induced aberration pattern was identical to the imposed testing pattern.

2. Methods

As the observable image of a point object, the PSF is commonly used to assess the quality of the imaging system because it describes how a point object is represented (or get spread) in the produced image. From Equation (3), the PSF is the square of the modulus of the system’s transfer function. As a result, the transfer function h ( x , y ) —and consequently the PSF—differs from system to system and basically from one optical element to another based on the quality of the materials, fabrication methods and alignment. It is worth mentioning that the Fourier transform of the PSF is the OTF, abbreviated from Optical Transfer Function, while MTF or H ( u , v ) is the Fourier transform of h x , y [20].
Image improvement is mostly done digitally by applying image processing algorithms to the images. In most cases, image processing is applied while the transfer functions are unknown. Filtering techniques are applied to the images for many reasons, including restoration. Theoretically, image restoration means obtaining the ideal image f ( x , y ) from a given distorted image g ( x , y ) . Practically, the ideal image cannot be obtained but rather an estimate of it that must be improved as much as possible. Therefore, image restoration leads to aberration correction. Image restoration can be done by digital filtering in the spatial domain to obtain an estimated image f ^ ( x , y ) or in the frequency domain to estimate F ^ ( u , v ) and then converting it to the spatial domain. It is usually recommended to apply digital filters in the frequency domain to remove the complexity of convolution in the spatial domain [21].
The Wiener filter is known for its efficiency in image restoration and obtaining the spatial deformation exerted on an image while taking noise into consideration. The Wiener filtering process in the frequency domain is given by
F ^ u , v = H ( u , v ) G u , v H u , v 2 + K ( u , v )                       H u , v T         0                                                                                   H u , v < T
where H ( u , v ) is the complex conjugate of H ( u , v ) , T is a thresholding small value applied on H u , v to avoid the infinity mathematical result, and K ( u , v ) is the noise-to-signal power ratio calculated from the prior knowledge of both the noise n x , y and the original object f ( x , y ) . K ( u , v ) can be empirically selected in case of no prior knowledge of the original image or object and noise. It can also be set to zero in case of the absence of noise [22]. In the field of digital image processing, the system transfer function is called the degradation function because an image produced by a system is degraded by the effect of its transfer function.
The phase diversity method, described in [22], is a phase retrieval technique. Phase retrieval means obtaining the aberration pattern that is distorting or degrading the image, allowing the original image to be restored. The phase diversity technique is based on capturing multiple images of the same scene such that one of them is in-focus and the others are degraded with known aberration patterns. A mathematical model for the aberration is initially assumed, and the algorithm runs iteratively to minimize the difference between the model and the real data. This difference represents a merit function. The smaller the merit function indicator, the closer the updated aberration pattern is to the known real one, which occurs while the algorithm is converging. In [23], the authors utilized the phase diversity method to restore the original image as well as the imposed aberration by a modified Wiener filter. This sort of Wiener filter receives two versions of degraded images, g 1 ( x , y ) and g 2 ( x , y ) of the same object. In most cases, the researcher has one degraded image g ( x , y ) and the aim is to restore its original image. In [23], the authors used the given image g ( x , y ) as g 1 ( x , y ) and obtained g 2 ( x , y ) by further degrading g ( x , y ) by a known aberration pattern. This process was done iteratively to get more improved estimates f ^ ( x , y ) . In the frequency domain, this restoration process is given by
F ^ u , v = H 1 u , v G 1 u , v + H 2 u , v G 2 u , v H 1 u , v 2 + H 2 u , v 2 + K ( u , v )             H 1 u , v T , H 2 u , v T ,     0                                                                                                                                             H 1 u , v < T ,   H 2 u , v < T
where G 1 u , v   and G 2 u , v are the Fourier transform of g 1 ( x , y ) and g 2 ( x , y ) or the two versions of g ( x , y ) ; H 1 u , v and H 2 u , v are the corresponding MTF or degradation functions. For the optical imaging systems, MTF is given by the apodization and the aberration as driven above in Equation (6). The process is done iteratively until reaching the best solution. Initial solutions for H 1 u , v   and H 2 u , v are randomly suggested and, consequently, a first solution of F ^ u , v is obtained. While iterating, the transfer functions H 1 u , v   and H 2 u , v are updated and consequently F ^ u , v . The iterations are executed in a converging fashion, until reaching the optimum solution.
An objective function representing the difference between the estimated and the given image is calculated to check the convergence of the process. According to the value of the objective function, the values of the MTFs are updated and, consequently, so is the estimated image.
In previous works, to optimize the solution, the steepest descent and the conjugate gradient optimizers were used. These optimizers were gradient-based local search methods susceptible to numerous local minima in the objective function [24,25].
In this work, the MTFs are just the Zernike terms of coefficients changing during the iterations. According to the value of the objective function, the coefficients of the Zernike terms composing the transfer functions are updated and, consequently, the values of H 1 u , v , H 2 u , v and F ^ u , v . Instead of using the gradient-based local optimization, we used the global Particle Swarm Optimization (PSO) method. PSO is a population-based global metaheuristic optimizer that uses a swarm of particles to simultaneously explore the entire Zernike coefficient space, eliminating the entrapment of local-minima.
Using an array C of values representing the coefficients of the Zernike terms, PSO explores the bounded Zernike coefficient space to minimize the objective function until reaching the optimum coefficient. The optimum Zernike coefficient leads to the optimum solution of F ^ u , v , by which the optimum solution of H ^ u , v can be estimated as follows:
F ^ u , v = G u , v H ^ u , v H ^ u , v = F ^ u , v G u , v
The process ends at this point or after completing the pre-set number of iterations.
The objective function used in this work is the grand sum error representing the difference between the estimated image and the given image. The grand sum error objective function is given by
E C = s u m E 1 C 2 + E 2 C 2  
where E 1 C and E 1 C are the grand summation of the squared pixel-wise difference between the corresponding estimate and the degraded images. Squaring the difference is done to overcome the sign issue. So, for a Zernike coefficient C , the grand sum errors are given by
E 1 C = g 1 x , y F 1 H 1 u , v F ^ u , v E 2 C = g 2 x , y F 1 H 2 u , v F ^ u , v
According to Equation (13), the optimum solution is obtained at the optimum value C at which Equation (13) gives the minimum value of E C . For a limited number of executions, the range of the Zernike coefficients C lies between a lower bound l b and an upper bound u b , and a function tolerance, F U N T O L , is set to reach the minimum objective error such that
m i n   E C   ,       l b C u b  
Figure 2 shows a flow chart of the proposed method where the execution stops at the i t h iteration if the following condition is satisfied:
E C i E C i + 1 < F I N T O L                 O R                   i = m a x

3. Implementation and Testing

To test the validity of this work, the high-quality microscopic image shown in Figure 3 was used as a reference or an original image f ( x , y ) . Considering a zero-noise function, a degraded or an input image g ( x , y ) was obtained by convolving the reference image by a known transfer function as follows:
g x , y = h x , y f x , y  
G u , v = H u , v F U , v      
Over the area of the pupil where the apodization function equals 1, form Equation (10) was substituted into Equation (15):
G u , v = A F u , v e j 2 π W u , v W u , v = F w x , y
According to the phase diversity method [6,23], the aberration function θ u , v and hence W ( u , v ) can be chosen as one aberration pattern or a combination of multiple aberration patterns and then be imposed on the reference image.
The same method was followed to obtain two versions g 1 ( x , y ) and g 2 ( x , y ) from the input image g ( x , y ) by degrading it using two known aberration patterns, w 1 ( x , y ) and w 2 ( x , y ) , respectively. The algorithm was then applied to obtain the optimum estimate F ^ u , v and the corresponding aberration pattern W u , v .
The generated test images where the reference image was degraded by a spherical aberration pattern to get the input image g ( x , y ) are shown in Figure 3. For simplicity, the first known aberration pattern used to get g 1 ( x , y ) was the piston type which resulted in the same image. The second aberration pattern used to get g 2 ( x , y ) was a quadratic term particularly a defocus aberration, which is commonly used for this purpose. The quadratic form of the defocus aberration provides diversity over the full spatial frequency range, making it a robust choice for phase retrieval [6,23]. So, from Table 1,
w x , y = 6 x 2 + y 2 2 6 x 2 + y 2 + 1 g x , y = f ( x , y ) 6 x 2 + y 2 2 6 x 2 + y 2 + 1 w 1 x , y = 1 g 1 x , y = g x , y w 1 x , y g 1 ( x , y ) = g ( x , y ) W 2 x , y = 2 ( x 2 + y 2 ) 1 g 1 x , y = g x , y 2 ( x 2 + y 2 ) 1
The workflow of the proposed algorithm was implemented from the above equations and applied to gray-level images and gray-level aberration patterns. Figure 3 shows a diagram representing the workflow of the proposed method.
The number of Zernike modes Z n used to validate the methods was 37 modes. For the 37 Zernike modes, the PSO initialized a swarm of S   = 2 Z n =   74 particles at random positions drawn uniformly from the range [ 0 , 1 ] of C 0 , where 0 is the lower bound l b or minimum C 0 and 1 is the upper bound u b or maximum C 0 . The upper bound u b   = 1 for the contributing or active Zernike terms, but u b   =   0 for the zero-contribution Zernike modes. This reduced the effective search dimensionality. The initial guess of the starting position of one particle of the active Zernike modes x 0 was tried for three values x 0 = 0.0 ,   0.5 ,   1.0 —i.e., x 0 = l b ,   m i d p o i n t ,   u b —with three independent random seeds to test the robustness of the algorithm. In each of the nine runs, the PSO converged to the exact global optimal solution, confirming the complete robustness to the choice of initial particle position.
All methods were implemented in MATLAB 2025a running on a 64-bit operating system. The hardware environment consisted of an Intel® Core™ i7-9850H CPU (@ 2.60 GHz) processor with 32.0 GB of RAM.
The particle swarm optimization, PSO, was implemented using MATLAB’s particleswarm function from the Global Optimization Toolbox to search for the optimal Zernike coefficients that minimize the error function E (C). At each iteration, each particle updates its velocity and position guided by its personal best solution and the global best solution found by the entire swarm. The algorithm was configured with MaxIterations = 1000 and FunctionTolerance = 10−10. Parallel evaluation across all 74 particles enabled via MATLAB’s Parallel Computing Toolbox (UseParallel = true). Unlike gradient-based local solvers such as Sequential Quadratic Programming (SQP) or fmincon, PSO requires no gradient information and is inherently resistant to local minima, making it well-suited to the multi-modal E (C) landscape illustrated in Figure 4.

4. Assessment of the Proposed Method

To assess the performance and success rate of the proposed framework, a set of synthetically aberrated images was fed to the framework. The images and the aberration patterns used to degrade them are presented in Table 2. The Structural Similarity Index Measure (SSIM) was used to compare the estimated image to the reference image. The Mean Absolute Error (MAE) was used to compare the obtained set of aberration coefficients to those used for degradation as a reference.
The SSIM measures the quality of the visually perceived image by comparing its contrast, brightness and structural information to those of the reference image. The image statistics are usually used to express its brightness, contrast and conformation [26]. So, the SSIM is given by
S S I M ( f , f ^ ) = 2 μ f μ f ^ + b 1 2 σ f f ^ + b 2 μ f 2 + μ f ^ 2 + b 1 σ f 2 + σ f ^ 2 + b 2
where μ f ,   μ f ^ ,     σ f   and σ f ^ are the local means and standard deviations of the search windows in the reference and the estimated image; σ f f ^ ,   is the cross covariance of a window in f and its corresponding window in f ^ ; and b 1   and b 2 are two variables used to stabilize the division with weak denominators. These two variables are commonly given in terms of the dynamic range of the image’s brightness. The SSIM ranges from zero to one, and the higher the SSIM, the greater the similarity between the reference and the estimated image is.
The MAE calculates the average of the absolute differences between a reference and an estimated set of values [27]. Hence, the MAE suits the case of comparing the set of the estimated aberration coefficients and those used to degrade the image. The closer the value of the MAE to zero, the greater the similarity between the two compared sets of coefficients, and hence the more similar the aberration patterns themselves are. The MAE of this case is given by
M A E = 1 K k = 1 k = K C k C ^ k  
where C k     and C ^ k are the kth aberration coefficients of the reference and estimated patterns, respectively, and K is the number of coefficients.

5. Results and Discussion

The proposed method for the transfer function estimation utilized a PSO algorithm for optimization and a global search instead of the local search used with the phase diversity method. PSO overcomes the problem of local minima entrapment, which is commonly faced while using the local gradient descent search. During the search algorithm, the local optimizer may give wrong results due to the existence of many local minima. Figure 4 demonstrates real examples of the presence of local minima for the 1D and 2D Zernike coefficient spaces, respectively. The multi-start points approach used by PSO provides a global search because the entire space is searched simultaneously by a swarm of particles, overcoming the local minima entrapment [23,24,25].
Moreover, the PSO-based method is entirely data-driven and doesn’t require any prior knowledge of the signal and noise power spectrum. This increases the robustness of the proposed method [23,24,25].
A third advantage of the use of PSO is that it provides a provable optimum solution of the spectrum function F ^ ( u , v ) that gives the least-square error at each PSO iteration. This is done through achieving the restoration and identification sub-problems in a unified framework instead of solving them sequentially as in most of the phase diversity variants [23,24,25].
In this work, we used 37 Zernike modes to cover a wide range of possible aberration patterns that may affect the optical images, starting from the lowest or 0th order to the beginning of the 8th order. For this number of Zernike modes, a swarm of 74 particles was used to simultaneously explore the entire Zernike coefficient space.
Generally speaking, PSO has no formal guarantee of convergence in the strict mathematical sense. However, for a compact search space of [0, 1]nx with a continuous objective function error E ( C ) , PSO is about 100% probable to converge to a near-global optimum regardless of the initial conditions [26,27]. The convergence of the proposed method is shown on the left side of Figure 5.
As shown in Figure 3, the testing image was obtained by degrading the reference image by the spherical aberration pattern
w r , θ = 0.44 ( 6 ρ 4 6 ρ 2 + 1 )
The coefficient of the optimum estimated aberration pattern was also 0.44, the SSIM equaled 1, and the MAE equaled 0, which means the restored image was identical to the reference one, and the estimated aberration pattern was identical to the reference degradation pattern.
To calculate the success rate of the proposed method, we applied the algorithm to 12 images degraded by different known aberration pattern(s): namely, (a) defocus, (b) 45° primary astigmatism, (c) secondary astigmatism-x, (d) primary coma-y, (e) a combination of secondary coma-x and secondary coma-y, (f) primary spherical, (g) secondary spherical, (h) a combination of defocus and 45° primary astigmatism, (i) a combination of defocus and primary coma-y, (j) a combination of defocus and primary spherical, (k) a combination of defocus, 45°primary astigmatism, primary coma-x and primary coma-y, and (l) a combination of defocus, primary coma-y, primary spherical, and 45°primary astigmatism.
The preset number of iterations was 1000 for all cases, but the proposed method utilizing PSO converged in less than 130 iterations, as shown on the left side of Figure 5. for case L. The results of these 12 cases are presented in Table 2. The results include the reference patterns, their coefficients, the degraded images, the estimated aberration coefficients and the performance assessment metrics. For more confirmation, besides the SSIM and the MAE, we also calculated the peak signal-to-noise ratio (PSNR) of the estimated image, the root mean square error (RMSE) for the estimated image and the aberration coefficients. As shown in Table 2, for a precision of four decimal points, the reference and estimated aberration coefficients were identical. The SSIM for all cases equaled 1, which means the highest degree of similarity between the restored and the reference images. These results were confirmed by the values of the RMSE, which is given by i R M S E in Table 2; the values ranged from 329 ×   10 8 to 0. The MAE equaled 1 × 10 8 for combinations of four aberration patterns and equaled 0 for other cases, which reflects the ultimate similarity between the estimated and reference coefficients. These results were also confirmed by the RMSE, which is denoted as p R M S E in Table 2, and the values ranged from 0 to 3 × 10 8 , confirming the very high similarity. For more confirmation of these promising results, the PSNR of the estimated images were calculated to range from 109.65–243.72 dB, which indicates high quality of the restored images.
For more discussion about the importance of using PSO for optimization, its convergence was investigated through the change of the objective error function E   ( C ) against the number of iterations, as shown on the left side of Figure 5, for case L with four aberration patterns. The objective error function reached zero in about 130 iterations. The right side of Figure 5 shows the evolution of the estimated Zernike coefficients during the iteration process for case L. The solid curves represent the recovered coefficients, while the dashed horizontal lines indicate the corresponding true values, showing the close convergence of all coefficients to their ground-truth values after about 50 iterations. The rapid convergence caused by the use of PSO led to faster execution times. As presented in the rightmost column of Table 2, the execution time ranged from 35.55 s to 166.70 s according to the number and order of the imposed aberration patterns. This reflects the complexity added when treating images degraded by greater numbers and higher orders of aberration patterns. Moreover, the execution times reported in this work are much shorter than the times needed by classical phase diversity methods with local gradient descent, which may exceed multiple hours.
Analyzing the fault tolerance is an important aspect to reach a solid conclusion [28]. A sensitivity analysis for the function tolerance, FUNTOL, was conducted on case l as one of the complicated cases. Loose tolerances (10−2, 10−3) led to premature convergence ( i R M S E   =   0.0004 ), while 10−4 and tighter consistently achieved RMSE = 0. A function tolerance of 10−4 is recommended, as it achieved the correct solution in 166.7 s versus 190.0 s for 10−10 with a 14% reduction in runtime while keeping its accuracy. Although the maximum number of iterations was preset to 1000, the optimum solutions were reached in less than 130 iterations.
Table 2. The results of algorithm execution at FUNTOL of 10−4 to the 12 different cases, where N/T are the number and type of aberration patterns used to degrade the reference image and obtain an image g x , y ,   C and C ^ are the reference and estimated aberration coefficient(s), i R M S E and p R M S E are the RMSE of the image and the aberration patterns, respectively, and T i m e is the execution time in seconds.
Table 2. The results of algorithm execution at FUNTOL of 10−4 to the 12 different cases, where N/T are the number and type of aberration patterns used to degrade the reference image and obtain an image g x , y ,   C and C ^ are the reference and estimated aberration coefficient(s), i R M S E and p R M S E are the RMSE of the image and the aberration patterns, respectively, and T i m e is the execution time in seconds.
N/T C               P         g ( x , y )     C ^ S S I M M A E P S N R i R M S E p R M S E T i m e
(a)
1/Defocus
0.5200Applsci 16 05868 i006Applsci 16 05868 i0070.520010109.6598 329 × 10 8 038.75
(b)
1/45° Primary Astigmatism-x
0.4600Applsci 16 05868 i008Applsci 16 05868 i0090.460010173.77250039.18
(c)
1/Secondary Astigmatism-y
0.2200Applsci 16 05868 i010Applsci 16 05868 i0110.220010166.97690038.77
(d)
1/Primary Coma-y
0.7100Applsci 16 05868 i012Applsci 16 05868 i0130.710010188.48430038.20
(e)
1/Secondary Coma-x + Secondary Coma-y
0.8900, 0.8900Applsci 16 05868 i014Applsci 16 05868 i0150.8900, 0.890010176.43380043.299
(f)
1/Primary Spherical
0.4400Applsci 16 05868 i016Applsci 16 05868 i0170.440010243.72580035.55
(g)
1/Secondary Spherical
0.3800Applsci 16 05868 i018Applsci 16 05868 i0190.380010140.5378 1 × 10 8 044.50
(h)
2/Defocus and 45° Primary Astigmatism
0.6700, 0.6900Applsci 16 05868 i020Applsci 16 05868 i0210.6700, 0.690010143.1842 7 × 10 8 066.60
(i)
2/Defocus + Primary Coma-y
0.5100, 0.5200Applsci 16 05868 i022Applsci 16 05868 i0230.5100, 0.520010214.3220061.89
(j)
2/Defocus + Primary Spherical
0.7700, 0.9200Applsci 16 05868 i024Applsci 16 05868 i0250.7700, 0.920010175.72440056.52
(k)
4/Defocus + 45°Primary Astigmatism + Primary Coma-x + Primary Coma-y
0.4000, 0.9400, 0.6300, 0.6300Applsci 16 05868 i026Applsci 16 05868 i0270.4000, 0.9400, 0.6300, 0.63001 1 × 10 8 144.1946 6 × 10 8 3 × 10 8 109.97
(L)
4/Defocus + Primary Coma-y + Primary Spherical + Secondary Astigmatism-x
0.1100, 0.5100, 0.8700, 0.3200Applsci 16 05868 i028Applsci 16 05868 i0290.1100, 0.5100, 0.8700, 0.320011 ×   10 8 137.6549 13 × 10 8 3 × 10 8 166.70

6. Conclusions and Future Work

In conclusion, we have proposed a robust method for the estimation of the transfer function of optical imaging systems by obtaining the deformation of wavefront a.k.a. the aberration imposed on the image. The proposed algorithm utilizes particle swarm optimization while restoring the reference image by Wiener filtering. This method showed its superiority with respect to the classic phase diversity methods based on local gradient search, since it converges rapidly and produces accurate results. Since this study is limited by the use of synthetic data, we are planning to build an optical setup to take different images under different conditions with different lens parameters to generalize the concept proved in this work. Different deep learning methods will be investigated and utilized with the experimental data we will collect. Also, the proposed method can be applied to images produced by planar x-ray and other imaging modalities to estimate their transfer functions other than aberration.

Author Contributions

Conceptualization, N.H.S.; methodology, S.S.A. and N.H.S.; software, S.S.A., N.E.N. and M.R.G.; validation, S.S.A., N.H.S., M.R.G. and N.E.N.; formal analysis, S.S.A., N.H.S., M.R.G. and N.E.N.; investigation, S.S.A.; resources, S.S.A., M.R.G. and N.E.N.; data curation, S.S.A., N.H.S. and M.R.G.; writing—original draft preparation, S.S.A. and M.R.G.; writing—review and editing, N.H.S.; visualization, S.S.A., N.E.N. and M.R.G.; supervision, N.H.S.; project administration, N.H.S.; funding acquisition, N.H.S. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Deanship of Scientific Research, Vice Presidency for Graduate Studies and Scientific Research, King Faisal University, Saudi Arabia [Grant number: KFU263112].

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used in this work are available in https://drive.google.com/drive/folders/1nILZIL2-oj7IzHbJrSPVMaUDDbyEPiUO (accessed on 3 June 2026).

Acknowledgments

This work is supported by the Labs of Cairo University and the Egyptian Calibration authority.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Smith, N.; Webb, A. Introduction to Medical Imaging Physics, Engineering and Clinical Applications; Cambridge University Press: New York, NY, USA, 2011. [Google Scholar]
  2. Ravikumar, S. Effect of Optical Aberrations on Image Quality and Visual Performance. Ph.D. Thesis, Indiana University, Bloomington, IN, USA, 2009. [Google Scholar]
  3. Mahajan, V.N. Optical Imaging and Aberrations, Part II. Wave Diffraction Optics; Chapter 1, Chapter 2 and Chapter 5; SPIE Digital liberary: Bellingham, WA, USA, 2001. [Google Scholar]
  4. van Driel, H.M. Modern Optics Notes; Chapter 5; Version 2.2; University of Toronto: Toronto, ON, Canada, 2010. [Google Scholar]
  5. Fienup, J.R. Phase retrieval algorithms: A comparison. Appl. Opt. 1982, 21, 2758–2769. [Google Scholar] [CrossRef] [PubMed]
  6. Solouma, N. Assessment of Imaging Systems: A Tutorial Handouts; King Faisal University: Al-Hofuf, Saudi Arabia, 2025. [Google Scholar]
  7. Zernike, F. Diffraction theory of the knife-edge test and its improved form, the phase-contrast method. Physica 1934, 1, 377–384. [Google Scholar] [CrossRef]
  8. Born, M.; Wolf, E. Principles of Optics; Pergamon Press: New York, NY, USA, 1959; pp. 464–466, 767–772. [Google Scholar]
  9. Wyant, J.C.; Creath, K. Applied Optics and Optical Engineering; Shannon, R., Wyant, J., Eds.; Academic Press: New York, NY, USA, 1992; Volume XI, pp. 28–39. [Google Scholar]
  10. Negm, N. The Use of Adaptive Optics to Improve Image Quality of the Wide-Field Transmission Microscopy. Chapter 2. Ph.D. Thesis, Cairo University, Giza, Egypt, 2017. [Google Scholar]
  11. Ahmad, A.; Shemonski, N.D.; Adie, S.G.; Kim, H.-S.; Hwu, W.-M.W.; Carney, P.S.; Boppart, S.A. Real-time in vivo computed optical interferometric tomography. Nat. Photonics 2013, 7, 444–448. [Google Scholar] [CrossRef] [PubMed]
  12. Zhu, D.; Wang, R.; Žurauskas, M.; Pande, P.; Bi, J.; Yuan, Q.; Wang, L.; Gao, Z.; Boppart, S.A. Automated fast computational adaptive optics for optical coherence tomography based on a stochastic parallel gradient descent algorithm. Opt. Express 2020, 28, 23306–23319. [Google Scholar] [CrossRef] [PubMed]
  13. Dhawan, A.P.; Rangayyan, R.M.; Gordon, R. Image restoration by Wiener deconvolution in limited-view computed tomography. Appl. Opt. 1985, 24, 4013–4020. [Google Scholar] [CrossRef] [PubMed]
  14. Li, X.; Suo, J.; Zhang, W.; Yuan, X.; Dai, Q. Universal and flexible optical aberration correction using deep-prior based deconvolution. In Proceedings of the IEEE/CVF International Conference on Computer Vision; IEEE: New York, NY, USA, 2021; pp. 2613–2621. [Google Scholar]
  15. Wang, X.; Jiang, H.; Dong, Y.; Mu, M. Spatial-channel collaborative multi-scale graph interaction deep transfer learning for unsupervised rotating machinery fault diagnosis. Eng. Appl. Artif. Intell. 2026, 176, 114691. [Google Scholar] [CrossRef]
  16. Eboli, T.; Morel, J.-M.; Facciolo, G. Fast two-step blind optical aberration correction. In European Conference on Computer Vision; Springer: Cham, Switzerland, 2022; pp. 693–708. [Google Scholar]
  17. Gong, J.; Yang, R.; Zhang, W.; Suo, J.; Dai, Q. A Physics-informed Low-rank Deep Neural Network for Blind and Universal Lens Aberration Correction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2024; pp. 24861–24870. [Google Scholar]
  18. Liaudat, T.; Starck, J.-L.; Kilbinger, M.; Frugier, P.-A. Rethinking data-driven point spread function modeling with a differentiable optical model. Inverse Probl. 2023, 39, 035008. [Google Scholar] [CrossRef]
  19. Sauniere, L.; Gillard, W.; Zoubian, J. Decoding optical aberrations of low-resolution Instruments from PSFs: Machine learning and Zernike polynomials perspectives. In Space Telescopes and Instrumentation 2024: Optical, Infrared, and Millimeter Wave; SPIE: Bellingham, WA, USA, 2024; Volume 13092, pp. 1262–1274. [Google Scholar]
  20. Shaw, J.A. Optical System Design Handout; Montana State University: Bozeman, MT, USA, 2026. [Google Scholar]
  21. Umbaugh, S.E. Digital Image Processing and Analysis: Applications with MATLAB® and CVIPtools; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
  22. Fienup, J.R. Phase-retrieval algorithms for a complicated optical system. Appl. Opt. 1993, 32, 1737–1746. [Google Scholar] [CrossRef] [PubMed]
  23. Donatelli, M.; Serra-Capizzano, S. Computational Methods for Inverse Problems in Imaging; Springer: Cham, Switzerland, 2019. [Google Scholar]
  24. Kennedy, J.; Eberhart, R. Particle swarm optimization. In Proceedings of the ICNN’95—International Conference on Neural Networks, Perth, WA, Australia; IEEE: Piscataway, NJ, USA, 1995; Volume 4, pp. 1942–1948. [Google Scholar]
  25. Shi, Y.; Eberhart, R. A modified particle swarm optimizer. In Proceedings of the 1998 IEEE International Conference on Evolutionary Computation Proceedings; IEEE World Congress on Computational Intelligence; IEEE: Anchorage, AK, USA, 1998; pp. 69–73. [Google Scholar] [CrossRef]
  26. Sara, U.; Akter, M.; Uddin, M. Image Quality Assessment through FSIM, SSIM, MSE and PSNR—A Comparative Study. J. Comput. Commun. 2019, 7, 8–18. [Google Scholar] [CrossRef]
  27. Willmott, C.J.; Matsuura, K. On the use of dimensioned measures of error to evaluate the performance of spatial interpolators. Int. J. Geogr. Inf. Sci. 2005, 20, 89–102. [Google Scholar] [CrossRef]
  28. Zhao, H.; Wang, B.; Fu, Y.; Li, N.; Gao, Z. Fixed-time adaptive fault-tolerant control of a multi-mode VTOL UAV with variable prescribed performance boundaries under random disturbances. ISA Trans. 2026; in press.
Figure 1. A schematic diagram of a simple optical imaging system showing the point object, the exit pupil and the PSF.
Figure 1. A schematic diagram of a simple optical imaging system showing the point object, the exit pupil and the PSF.
Applsci 16 05868 g001
Figure 2. A flow chart elaborating the proposed method where C is the optimal solution of the coefficient C .
Figure 2. A flow chart elaborating the proposed method where C is the optimal solution of the coefficient C .
Applsci 16 05868 g002
Figure 3. A process diagram showing the workflow of the algorithm with the images used to test its validity and the estimated optimum image and optimum aberration pattern.
Figure 3. A process diagram showing the workflow of the algorithm with the images used to test its validity and the estimated optimum image and optimum aberration pattern.
Applsci 16 05868 g003
Figure 4. The demonstration of local minima problem occurred on the error function E   ( C ) and may lead to inaccurate results. Upper: for a 1D Zernike coefficient C space. Lower: for a 2D Zernike coefficient C space.
Figure 4. The demonstration of local minima problem occurred on the error function E   ( C ) and may lead to inaccurate results. Upper: for a 1D Zernike coefficient C space. Lower: for a 2D Zernike coefficient C space.
Applsci 16 05868 g004
Figure 5. Convergence of the optimization algorithm. (Left): A semi-log plot of the objective function value against the number of iterations, demonstrating a rapid decrease and convergence to a very small residual. (Right): The evolution of the estimated Zernike coefficients during optimization. The solid curves represent the recovered coefficients, while the dashed horizontal lines indicate the corresponding true values, showing close convergence of all coefficients to their ground-truth values.
Figure 5. Convergence of the optimization algorithm. (Left): A semi-log plot of the objective function value against the number of iterations, demonstrating a rapid decrease and convergence to a very small residual. (Right): The evolution of the estimated Zernike coefficients during optimization. The solid curves represent the recovered coefficients, while the dashed horizontal lines indicate the corresponding true values, showing close convergence of all coefficients to their ground-truth values.
Applsci 16 05868 g005
Table 1. Some common aberration types.
Table 1. Some common aberration types.
( k , Order) Z k r , θ Aberration TypeAberration Pattern
Z k x , y
(0, 0)1PistonApplsci 16 05868 i001
1
(1, 1) ρ   s i n   s i n   θ   Tilt-yApplsci 16 05868 i002
y
(8, 3) ( 3 ρ 3 2 ρ ) c o s θ Coma-xApplsci 16 05868 i003
3 x ( x 2 + y 2 ) 2 x
(4, 2) ( 2 ρ 2 1 ) DefocusApplsci 16 05868 i004
2 ( x 2 + y 2 ) 1
(12, 4) ( 6 ρ 4 6 ρ 2 + 1 ) Primary SphericalApplsci 16 05868 i005
6 x 2 + y 2 2 6 x 2 + y 2 + 1
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Solouma, N.H.; Gardner, M.R.; Negm, N.E.; Alsharafi, S.S. Estimating the Transfer Functions of Optical Imaging Systems from Their Degraded Images by Optimization and Global Search Algorithms. Appl. Sci. 2026, 16, 5868. https://doi.org/10.3390/app16125868

AMA Style

Solouma NH, Gardner MR, Negm NE, Alsharafi SS. Estimating the Transfer Functions of Optical Imaging Systems from Their Degraded Images by Optimization and Global Search Algorithms. Applied Sciences. 2026; 16(12):5868. https://doi.org/10.3390/app16125868

Chicago/Turabian Style

Solouma, Nahed H., Michael R. Gardner, Noura E. Negm, and Sadeq S. Alsharafi. 2026. "Estimating the Transfer Functions of Optical Imaging Systems from Their Degraded Images by Optimization and Global Search Algorithms" Applied Sciences 16, no. 12: 5868. https://doi.org/10.3390/app16125868

APA Style

Solouma, N. H., Gardner, M. R., Negm, N. E., & Alsharafi, S. S. (2026). Estimating the Transfer Functions of Optical Imaging Systems from Their Degraded Images by Optimization and Global Search Algorithms. Applied Sciences, 16(12), 5868. https://doi.org/10.3390/app16125868

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop