# Expanded Scene Image Preprocessing Method for the Shack-Hartmann Wavefront Sensor
## 1 Introduction  
Advances in science and technology have greatly expanded the application of adaptive optics, leading to increased demands for real-time responsiveness and accuracy in wavefront detection. The Shack-Hartmann Wavefront Sensor (HWFS), comprising a microlens array and a CCD at its focal plane, has emerged as the dominant wavefront sensor due to its versatile features and capabilities [1; 2]. For example, it has been well used in the visual performance and retinal imaging resolution of the human eye [3; 4], optical imaging of scattering media [5; 6], and biological studies [7].  
To date, the research on Shack-Hartmann wavefront sensors has primarily focused on point-target imaging [8; 9; 10]. Various techniques have been employed to enhance the accuracy of the centroid extraction, including the windowed thresholded centroid of mass method [11], local adaptive thresholding [12; 13], and the autocorrelation centroid of mass extraction [14]. These methods calculate the wavefront slopes for different subaperture ranges to achieve wavefront reconstruction. However, certain domains, such as solar telescopes, space-to-earth remote sensing, and other applications, face challenges in locating point targets within the field of view. Consequently, extended targets are introduced [15; 16]. Extended target Shack-Hartmann wavefront sensors produce arrays of sub-images that exhibit similar content on the CCD. To prevent overlap between the sub-images, additional field-of-view diaphragms are required to limit the image size [17]. Wavefront phase errors cause shifts in the sub-images; thus, the accuracy of wavefront detection depends primarily on the accurate determination of the offset between each sub-image. Factors such as atmospheric turbulence and noise [18] contribute to a decrease in the signal-to-noise ratio, thereby diminishing the accuracy of wavefront detection [19].  
In recent years, there has been significant interest, both domestically and internationally, in methods aimed at enhancing the accuracy of wavefront under low signal-to-noise ratios. [PERSON] et al. proposed a method to estimate the noise error using multi-frame Shack-Hartmann photograms and their computed center-of-mass displacements, and the estimation error of this method can be less than 2% under the condition that the signal-to-noise ratio meets the normal operation of the Shack-Hartmann sensor [20]. [PERSON] et al. developed a centroid of the mass estimator utilizing stream processing, which mitigates the impact of background and noise when the scene content is smaller than the subaperture field of view [21]. [PERSON] et al. proposed an algorithm based on the antisymmetric response of the bias to the subpixel position of the true centroid, effectively reducing the bias by a factor of approximately seven, albeit with twice the computational expenses compared to current mutual algorithms [22].  
In order to enhance the accuracy of detection, we propose an image preprocessing method that involves reducing the noise in the sub-image array acquired from the CCD. The introduced Gaussian-Poisson noise is converted to Gaussian noise using the Generalized Anscombe transform (GAT) [23]. To handle the image noise, we utilize residual feedback for block-matching and 3D filtering (BM3D). Additionally, we perform offset computation using the normalized intercorrelation algorithm [24] to achieve wavefront reconstruction [25].