## 2 Materials and Methods
### The Design of a Restoration Task Method for Finger Vein Image Enhancement and Denoising  
In order to address other problems experienced in finger vein recognition, such as low contrast of finger vein feature information and various noises present in the image due to physical and electromagnetic interference, several traditional finger vein image enhancements and denoising algorithms were selected as restoration tasks. The algorithms mainly include:  
1. **Mean Filter**. The Mean Filter is used to smooth out the noise that exists in an image. It is based on the principle that the pixel at the centre is the average of all surrounding pixels. The calculation formula is shown in Equation (16): \[g(x,y)=\ \frac{1}{M}\underset{f}{\sum}f(x,y)\] (16) among them, \((x,y)\) is the current pixel, and \(M\) is the total number of pixels in the template including the current pixel.
2. **Laplacian Filter**. The Laplacian Filter is used to enhance areas of the image where there is a sudden change in grey level and to attenuate areas where the grey level changes slowly. The Laplacian Filter for image enhancement is calculated as in Equation (17) as: \[g(x,y)=f(x,y)+c\Big{[}\
abla^{2}f(x,y)\Big{]}\] (17)Among them, \(f(x,y)\) is the input image, \(g(x,y)\) is the enhanced image; The value of \(c\) depends on the centre factor of the mask. \(\
abla^{2}f(x,y)\) is the Laplacian operator, which is defined as: \[\
abla^{2}f(x,y)=\frac{\partial^{2}f(x,y)}{\partial x^{2}}+\frac{\partial^{2} f(x,y)}{\partial y^{2}}\] (18)
3. **Contrast Limited Adaptive Histogram Equalization (CLAHE)**. CLAHE [31] method is an improvement on the traditional adaptive histogram equalization (AHE) method. AHE can highlight detailed information about an image when there are areas in the image that are significantly brighter or darker than other areas. However, AHE makes the image noisier, and CLAHE can solve this problem by limiting the contrast in each pixel region.
4. **Multi-Scale Retinex (MSR)**. MSR [32] can effectively solve the problem of low image contrast due to uneven IR illumination. the formula for MSR is shown in Equation (19): \[r(x,y)=[W_{k}\{logf(x,y)-\log[F_{k}(x,y)*f(x,y)]\}]\] (19) Among them, \(f(x,y)\) is the original image of the input, \(F_{k}(x,y)\) is the enhanced image of each scale, \(W_{k}\) is the weight corresponding to each scale, and the sum of the weights of each scale must be 1.  
The Design of an Adaptive Selection Method for Finger Vein Image Restoration Tasks Based on Deep Reinforcement Learning  
In practical application situations, captured low-quality finger vein images may have multiple image problems, and it is not desirable to consider only one image problem and perform restoration. For this reason, we introduce DRL to the finger vein restoration task for the first time, viewing the restoration task as a sequential action of restoring images and the low-quality finger vein images as states. DRL is used to train the agent to select restoration behaviors based on the state of the image. The method can gradually restore the image, combining different restoration methods into the best means of restoration. If there are multiple image problems, the agent selects the restoration behaviors consecutively. In this section, we describe in detail the design ideas and the network structure of the DRL-FVRestore method proposed in this paper.