# Image Interpolation Based on Spiking Neural Network Model
## 2 Image Interpolation  
Image interpolation can be expressed as the calculation of unknown pixels with the help of the known pixels. When the \(M\times N\)-sized \(I_{L}\) (low resolution) image is interpolated to the 2 \(\times\) 2 size as in Figure 2a, a \(2M\times 2N\)-sized \(I_{H}\) (high resolution) image will be obtained. While creating the \(I_{H}\) image, the image in Figure 2b is first created by the process shown in Equation (1).  
\[I_{H}(2i-1,2j-1)=I_{L}(i,j) \tag{1}\]  
Figure 2: Example of edge-based interpolation. (**a**) 3 \(\times\) 3 low-resolution image \(I_{L}\); (**b**) 6 \(\times\) 6 high-resolution image \(I_{H}\) with known pixels of \(I_{L}\); (**c**) pixels with diagonal neighborhoods in \(I_{H}\); (**d**) pixels with linear neighborhoods in \(I_{H}\).  
In general, in edge-based techniques [12; 14], after detecting the edges and their directions, the values of the pixels located in the \(I_{H}(2i,\,2j)\) position indicated by the diagonal arrows in Figure 2c are calculated first. This calculation generally depends on whether the \(I_{L}(i,j)\) pixel is an edge pixel with a diagonal angle. The value of the \(I_{H}(2i,\,2j)\) pixel (if \(I_{L}(i,j)\) is an edge pixel with a diagonal angle) is calculated with the help of the known blue-colored pixels adjacent to it. After calculating the diagonally angled pixels, in the second step, calculations are performed for the pixels indicated by the horizontal and vertical arrows in Figure 2d. If a pixel is in the position \(I_{H}(2i,\,2j+1)\) and \(I_{L}(i,j)\) has a horizontally oriented edge, this pixel is assigned a value using its neighbors on the horizontal plane. Similarly, if a pixel is at the position \(I_{H}(2i+1,\,2j)\) and \(I_{L}(i,j)\) has a vertically oriented edge, the value of the pixel \(I_{H}(2i+1,\,2j)\) is calculated using its neighbors on the vertical plane. Finally, pixels that are not marked as edges are generally assigned using bicubic interpolation. Thus, the values of all pixels in the \(I_{H}\) image are determined.  
In almost all interpolation studies examined, it is seen that the interpolation process has been carried out to increase the image to a 2 \(\times\) 2 size. In these studies, experimental results have been obtained by comparing \(I_{org}\) (original image) to the \(I_{H}\) image constructed by first downsampling the \(I_{org}\) by \(\frac{1}{2}\times\frac{1}{2}\) and then upsampling it to a 2 \(\times\) 2 size again. To compare the success of the proposed method in this study, the images used in recent studies are first made \(1/2\times 1/2\) by downsampling. Although the nearest, bilinear, and bicubic techniques can be used for downsampling, in this study, the direct extraction method is used because it is known to both preserve the original pixels of the image and increase success [14]. When shrinking an image by direct extraction, double-index rows and double-index columns in the image are deleted. Thus, the \(M\times N\)-sized \(I_{L}\) image is obtained directly from the \(2M\times 2N\)-sized \(I_{org}\) image. Then, the methods to be tested are applied to the \(I_{L}\) image, and an \(I_{H}\) image of a \(2M\times 2N\) size is obtained. Finally, the success of the tested method is measured by comparing the \(I_{org}\) and \(I_{H}\) images.