# Pre-Processing of Inner CCD Image Stitching of the SDGSAT-1 Satellite
## 3 Methodology
### Inner CCD Image Matching  
Usually, imaging matching methods are divided into two parts, feature-based methods and area-based methods [29]. Feature-based methods include the SIFT method [30] as well as other methods that depend on detecting distinctive features such as points, contours, and edges. In contrast, area-based methods use mutual information [31] or cross-correlation [32] to estimate the geometric transformation by optimizing a similarity measurement. For remote sensing images, the feature-based method always suffers from high computational costs. In this paper, the area-based normalized cross-correlation (NCC) method based on phase congruency is applied to estimate the transformation between adjacent sub-CCD images.  
For optical images, the phase congruency model is established based on an additive Gaussian noise model as follows:  
\[\begin{split} Pc(x,y)&=\frac{\Sigma_{n}E_{\theta_{ k}}(x,y)}{\Sigma_{n}\Sigma_{k}A_{n,\theta_{k}}(x,y)+\epsilon}\\ E_{\theta_{k}}(x,y)&=\sqrt{F_{\theta_{k}}^{2}(x,y) +H_{\theta_{k}}^{2}(x,y)}\\ &=\Sigma_{n}(e_{n,\theta_{k}}(x,y)+o_{n,\theta_{k}}(x,y))\\ &=\Sigma_{n}(I(x,y)\cdot M_{n}^{e}+I(x,y)\cdot M_{n}^{o})\end{split} \tag{8}\]  
where \(E_{\theta_{k}}(x,y)\) is the local energy, \(A_{n,\theta_{k}}\) is the amplitude, \(\theta_{k}\) represents the orientation angle, \(\epsilon\) is a preset parameter to avoid ill-conditional equations, \(I(x,y)\) represents the pixel value at location \((x,y)\), and \(M_{n}^{e}\) and \(M_{n}^{o}\) are the even and odd components of the 2D filters at a scale \(n\).  
After the transformation of different raw sub-CCD images, the structural image can avoid the instability caused by differences in brightness. Therefore, the NCC model is applied for the extraction of tie points:  
\[\rho=\frac{\Sigma(w(u,v)\cdot PC_{I}(x-u,y-v)-\mu_{1})(w(u,v)\cdot PC_{T}(x,y )-\mu_{2})}{\sqrt{\Sigma(w(u,v)\cdot PC_{I}(x-u,y-v)-\mu_{1})^{2}\Sigma(w(u,v )\cdot PC_{T}(x,y)-\mu_{2})^{2}}} \tag{9}\]  
where \(\rho\) is the correlation coefficient, \((u,v)\) represents the image-space coordinate in the sliding window, \((x,y)\) is the central point of the mask, and \(PC_{I}\) and \(PC_{T}\) represent the intensity of the reference and slave image, respectively. The definition of \(w\), \(\mu_{1}\), and \(\mu_{2}\) can be shown as follows:  
\[\begin{split} w(u,v)=\frac{e}{(x-u)^{2}+(y-v)^{2}}\\ \mu_{1}=\frac{1}{N}\Sigma(w(u,v)\cdot PC_{I}(x-u,y-v))\\ \mu_{2}=\frac{1}{N}\Sigma(w(u,v)\cdot PC_{T}(x-u,y-v))\end{split} \tag{10}\]  
where \(e\) is introduced as an adjustable coefficient to balance the geometric differences caused by image distortions and \(N\) is the size of the mask.  
Usually, the overlapping area of inner CCD images is several tens of pixels. Therefore, the size of the mask is set as half the width of the overlapping area. In each window, the center points with the largest correlation coefficients are regarded as candidate points. With the help of the random sample consensus (RANSAC) algorithm, outliers are removed, allowing the geometric performance between adjacent inner CCD images in both the image row and column directions to be improved.