# Visible and Near-Infrared Image Synthesis Using PCA Fusion of Multiscale Layers
## 2 Laplacian Pyramid  
The Laplacian pyramid is a multiscale processing algorithm that decomposes input images into multiscale images [7]. Laplacian-pyramid images can be separately processed at each pyramid level. Multiscale images of the Laplacian pyramid are obtained using Gaussian blur, up/downsampling, and image subtraction.  
The first step in the Laplacian pyramid is based on the Gaussian pyramid, which produces multiple images with Gaussian blurring and downsampling. A filter with two dimensions of Gaussian blurring is shown in Equation (1):  
\[w(x,y)=\frac{1}{2\pi\sigma^{2}}e^{-\frac{x^{2}+y^{2}}{2\sigma^{2}}}, \tag{1}\]  
where \(w(x,y)\) is a function of the Gaussian blur whose size depends on the \(\sigma\) value. Generally, we use a \(5\times 5\) Gaussian blur prior to downsampling the images. The \(5\times 5\) Gaussian blur is to provide adequate filtering at a low computational cost [7].  
Image downsampling is performed after blurring. The Gaussian pyramid aims to create a repetitive image that has been smoothened and downsampled. Gaussian blurring and downsampling are represented in Equation (2):  
\[g_{i+1}(i,j)=\sum\
olimits_{m=-2}^{2}\sum\
olimits_{m=-2}^{2}w(m,n)g_{l}(2i+ m,2j+n), \tag{2}\]where \(w(m,n)\) is the Gaussian blur filter; \(g_{l}\) is the input image; and \(g_{l+1}(i,j)\)\((i,j)\) is the Gaussian pyramid image of the results of blurring and downsampling of the input image. The downsampling method reduces the image size to one-half the row and column of the original image. Thus, the Gaussian pyramid is computed by blurring an input image of a different size. Therefore, the Gaussian pyramid is a sequence of low-pass and downsampled images.  
Image blurring is calculated as the average pixel value of the surrounding pixels. Specifically, it is the removal of high-frequency components from an image-processing perspective. Therefore, the Gaussian blur is performed before image downsampling because it removes the high-frequency components that may cause aliasing. Aliasing is a result of a sampling-rate signal that is insufficient for changing other signals. Therefore, image blurring and smoothing are performed before downsampling to eliminate aliasing effects.  
The second step in creating the Laplacian pyramid is to upsample the Gaussian pyramid and subtract the previous level image of the Gaussian pyramid to obtain a differential image. The upsampling of the Gaussian pyramid is as expressed in Equation (3):  
\[Expand(g_{l+1}(i,j))=4\sum\
olimits_{m=-2}^{2}\sum\
olimits_{n=-2}^{2}w(m,n )g_{l+1}\bigg{(}\frac{i-m}{2},\frac{j-n}{2}\bigg{)}, \tag{3}\]  
where \(Expand(g_{l+1}(i,j))\) is an upsampled image of the Gaussian pyramid, and \(g_{l+1}\) is an image of the Gaussian pyramid obtained using Equation (2).  
A method for obtaining the differential images is given in Equation (4); the upsampling image obtained using Equation (3) is subtracted from the previous step image:  
\[L_{0}=g_{l}-Expand(g_{l+1}), \tag{4}\]  
where \(L_{0}\) is the image of the Laplacian pyramid; \(g_{l}\) is the Gaussian pyramid obtained in the previous step; and \(Expand(g_{l+1}(i,j))\) is the upsampling image obtained using Equation (3).  
The reconstruction of the Laplacian pyramid is an iterative process of upsampling from the lowest-level image in the Laplacian pyramid and adding each level of differential images. To reconstruct the image without any error, the Gaussian-blurred images should be upsampled, and this blurred image is subtracted from the previous level of input images; this is shown in Equations (3) and (4). In summary, the Laplacian pyramid stores the differential images acquired by the Gaussian pyramid at each level. Figure 1 shows a block diagram of the Laplacian pyramid. The Laplacian pyramid image is shown in Figure 1 in normalized grayscale because detailed information in the original Laplacian pyramid images is difficult to see visually.  
Figure 1: Laplacian pyramid block diagram.