Palm vein recognition method and device, computer equipment and medium
By using fill lights of different infrared bands to collect palm images in palm vein recognition and perform venous grayscale comparison, the problem of difficult identification of fake palms in the prior art is solved, and the safety of identification is improved.
Patent Information
- Application Number
- CN202411940847.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-15
AI Technical Summary
Existing palm vein recognition technology is difficult to identify palms forged with materials such as silicone or rubber, resulting in lower safety.
The original image of the palm is collected by using fill lights of different infrared bands. By unifying the background brightness and comparing the venous grayscale, we can judge whether the difference in venous grayscale exceeds the preset threshold to determine the authenticity of the palm.
Effectively identifying real living palms and forged palms improves the safety of palm veins identification and prevents malicious forged palms.
Smart Images

Figure CN119832606A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biometric identification technology, and in particular to a palm vein identification method, device, computer equipment and medium. Background Art
[0002] Palm vein recognition is a biometric recognition technology. Palm vein recognition mainly uses the property of human hemoglobin to absorb near-infrared light to collect the vein feature image under the palm skin. Compared with other biometric features such as fingerprints or irises, palm vein biometric features are located under the human skin, are internal features of the human body and are invisible to the naked eye. Therefore, they are difficult to copy and forge. In addition, the collection of palm vein images is generally done through non-contact collection, which is a more hygienic collection method and suitable for use in public places.
[0003] However, there are some cases where black blood-like objects are added to silicone or rubber palms to disguise them as human veins. Existing palm vein recognition technology is difficult to identify such forgeries.
[0004] Currently, no effective solution has been proposed for the problem of low security of palm vein recognition in the existing technology. Summary of the invention
[0005] Based on this, it is necessary to provide a palm vein recognition method, device, computer equipment and medium to address the above technical problems.
[0006] In a first aspect, the present application provides a palm vein recognition method. The method comprises:
[0007] Under the supplementary light of the first infrared lamp, collecting a first original image of the palm to be identified; and,
[0008] Under the supplementary light of the second infrared light, a second original image of the palm to be identified is collected; wherein the infrared bands of the first infrared light and the second infrared light are different;
[0009] The brightness of the background of the first original image and the second original image is unified, and the venous grayscale comparison is performed on the first original image and the second original image after the background brightness is unified. When it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, the palm to be identified is identified as a real living palm.
[0010] In one embodiment, acquiring the first original image and the second original image includes:
[0011] Under the fill light of the first infrared lamp, photograph the palm to be identified at a first moment to obtain a first original image;
[0012] Under the supplementary light of the second infrared lamp, the palm to be identified is photographed at a second moment to obtain a second original image, wherein the first moment and the second moment differ by a preset interval time.
[0013] In one embodiment, unifying the brightness of the backgrounds of the first original image and the second original image includes:
[0014] Determine a first reference background in the first original image and a second reference background in the second original image;
[0015] Based on the first reference background and the second reference background, the brightness of the first original image is adjusted until the difference between the adjusted brightness of the first original image and the brightness of the second original image is less than a preset brightness threshold.
[0016] In one embodiment, adjusting the brightness of the first original image based on the first reference background and the second reference background includes:
[0017] Extracting the grayscale value of each pixel in the first reference background to obtain a first grayscale array, and extracting the grayscale value of each pixel in the second reference background to obtain a second grayscale array;
[0018] The first grayscale array and the second grayscale array are linearly fitted to obtain a linear fitting function, and the pixel values in the first original image are substituted into the linear fitting function to calculate a third image, wherein the difference between the grayscale value of the background of the third image and the grayscale value of the second grayscale array is less than a preset grayscale value threshold.
[0019] In one embodiment, when it is determined that the difference in vein grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, identifying the palm to be identified as a real living palm includes:
[0020] Calculate the grayscale value difference between each pixel point in the vein feature area of the third image and the first original image point by point to obtain a grayscale difference array;
[0021] If the average value of the grayscale difference array is detected to be greater than or equal to the difference of the preset grayscale threshold, the palm to be identified is judged to be a real living palm; if the average value of the grayscale difference array is detected to be less than the grayscale threshold, the palm to be identified is judged to be a fake palm.
[0022] In one embodiment, after determining the first reference background in the first original image and the second reference background in the second original image, the method further includes:
[0023] The grayscale values of each pixel in the first reference background and the second reference background are extracted respectively, and the difference in grayscale values between the pixel points in the first reference background and the second reference background is calculated point by point, and the statistical standard deviation of the difference in grayscale values is calculated. When it is detected that the statistical standard deviation is greater than a preset standard deviation threshold, it is determined that the captured first original image and the second original image are invalid.
[0024] In one embodiment, the wavelength band of the light of the first infrared lamp is 900nm-1000nm, and the wavelength band of the light of the second infrared lamp is 800nm-890nm.
[0025] In a second aspect, the present application also provides a palm vein recognition device. The device comprises:
[0026] An acquisition module is used to collect a first original image of the palm to be identified under the supplementary light of a first infrared lamp; and to collect a second original image of the palm to be identified under the supplementary light of a second infrared lamp; wherein the infrared bands of the first infrared lamp and the second infrared lamp are different;
[0027] The detection module is used to unify the brightness of the background of the first original image and the second original image, perform venous grayscale comparison on the first original image and the second original image after the background brightness is unified, and when it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, identify the palm to be identified as a real living palm.
[0028] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0029] Under the supplementary light of the first infrared lamp, collecting a first original image of the palm to be identified; and,
[0030] Under the supplementary light of the second infrared light, a second original image of the palm to be identified is collected; wherein the infrared bands of the first infrared light and the second infrared light are different;
[0031] The brightness of the background of the first original image and the second original image is unified, and the venous grayscale comparison is performed on the first original image and the second original image after the background brightness is unified. When it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, the palm to be identified is identified as a real living palm.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0033] Under the supplementary light of the first infrared lamp, collecting a first original image of the palm to be identified; and,
[0034] Under the supplementary light of the second infrared light, a second original image of the palm to be identified is collected; wherein the infrared bands of the first infrared light and the second infrared light are different;
[0035] The brightness of the background of the first original image and the second original image is unified, and the venous grayscale comparison is performed on the first original image and the second original image after the background brightness is unified. When it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, the palm to be identified is identified as a real living palm.
[0036] The above-mentioned palm vein recognition method, device, computer equipment and medium first collect the first original image of the palm to be identified under the fill light of the first infrared lamp, and collect the second original image of the palm to be identified under the fill light of the second infrared lamp, wherein the infrared bands of the first infrared lamp and the second infrared lamp are different; then unify the brightness of the background of the first original image and the second original image, perform vein grayscale comparison on the first original image and the second original image after the background brightness is unified, and when it is determined that the difference in vein grayscale between the first original image and the second original image is greater than or equal to the grayscale threshold, the palm to be identified is identified as a real living palm. Through this application, it is possible to accurately detect whether the palm to be identified is a real living palm or a forged palm imitated by silicone, rubber, etc., thereby effectively avoiding the situation where others maliciously forge a palm to deceive palm vein detection, and greatly improving the security of palm vein recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a schematic diagram of a flow chart of a palm vein recognition method in one embodiment;
[0038] Figure 2 A schematic diagram of a palm vein recognition method in a preferred embodiment;
[0039] Figure 3 is a structural block diagram of a palm vein recognition device in one embodiment;
[0040] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] In one embodiment, Figure 1As shown, a palm vein recognition method is provided, comprising the following steps:
[0043] Step S110, collecting a first original image of the palm to be identified under the fill light of a first infrared lamp; and collecting a second original image of the palm to be identified under the fill light of a second infrared lamp; wherein the infrared bands of the first infrared lamp and the second infrared lamp are different.
[0044] Among them, the present application is applied to a device for palm vein recognition. During the vein recognition process, the palm vein recognition device fills the palm to be recognized with light, and then forms an image through the absorption and reflection of the fill light (the fill light is preferably in the infrared band, and in this application, fill light is also performed in the infrared band) by the palm and palm veins. The palm vein recognition device can generate at least two infrared lights of different bands.
[0045] Under the fill light of the first infrared lamp, the first original image of the palm to be identified is collected, wherein, due to the penetration of near infrared into the skin, the light can easily irradiate under the epidermis, and finally form reflected light, which is collected by the image acquisition module to obtain the above-mentioned first original image. Then, after obtaining the first original image, the above-mentioned first infrared lamp is turned off, and the above-mentioned second infrared lamp is turned on, and the palm to be identified is filled with light by the second infrared lamp. Under the fill light of the second infrared lamp, the second original image of the palm to be identified is collected in the same way. In some preferred embodiments, the time interval between the first original image and the second original image should be extremely short, such as the time interval between the first original image and the second original image should be less than 0.1s, so as to ensure that when the palm to be identified is photographed twice, the palm position will not move or shift significantly, which is convenient for subsequent image comparison processing. Furthermore, the first infrared lamp and the second infrared lamp have different infrared bands, and the hemoglobin in the palm veins has different absorption rates for different infrared bands, that is, hemoglobin will present images with different brightness under infrared light of different bands, that is, the first original image and the second original image based on infrared light of different bands have different brightness of the corresponding palm veins.
[0046] Step S120, unifying the brightness of the background of the first original image and the second original image, performing venous grayscale comparison on the first original image and the second original image after the background brightness is unified, and when it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, identifying the palm to be identified as a real living palm.
[0047] Specifically, the brightness of the background of the first original image and the second original image is first unified, that is, the background (i.e., the non-vein part) of the first original image and the second original image is adjusted to the same brightness. The brightness adjustment method is not limited in this embodiment, and the brightness adjustment method includes but is not limited to adjusting the background brightness of the first original image and the second original image to the same preset brightness; or, adjusting the background brightness of the first original image to the same brightness as the background of the second original image, etc. It should be noted that in this embodiment, the background brightness of the first original image and the second original image is unified, which does not mean separating the palm vein area from the non-vein area in the image and only adjusting the brightness of the non-vein area (i.e., the background area), but based on the background brightness of the two images, the overall brightness of the two images is adjusted until the background brightness of the first original image and the second original image is consistent. Wherein, the background of the above image is the non-vein area in the palm area of the original image.
[0048] After unifying the background brightness of the first original image and the second original image, a venous grayscale comparison is performed on the first original image and the second original image after the background brightness is unified. When it is detected that the difference in venous grayscale between the first original image and the second original image after the background brightness is unified is greater than or equal to a preset grayscale threshold, the palm to be identified is identified as a real living palm, that is, the palm is a real palm at this time, not a forged palm. Similarly, if it is detected that the difference in venous grayscale between the first original image and the second original image after the background brightness is unified is less than the above-mentioned grayscale threshold, the palm is judged to be a forged palm. In summary, since the hemoglobin in the vein has different absorption rates for infrared light of different bands, that is, when two beams of infrared light of different wavelengths but the same energy are used to fill in the light of the same object, the image formed for the object will have certain differences in brightness. Therefore, after the brightness is unified, under the fill in light of the first infrared lamp and the second infrared lamp of different bands, the brightness of the venous area in the first original image and the second original image obtained should also be different.
[0049] Furthermore, when it is detected that the difference in vein grayscale between the first original image and the second original image after the background brightness is unified is less than a preset threshold, an alarm may be issued or the palm vein recognition process may be directly terminated, etc. This application does not impose too many restrictions on this.
[0050] Through step S110 to step S120, the palm to be identified is successively illuminated with infrared light of different bands, and then the grayscale of the palm vein area is compared after the same image brightness. If the difference in the palm vein grayscale is large, the palm to be identified is determined to be a real living palm. Through this application, it is possible to effectively identify whether the palm to be identified is a real palm, avoid the situation where a palm is forged with materials such as silicone or rubber to maliciously confuse the palm vein identification result, and effectively improve the security of palm vein identification.
[0051] In some embodiments, the method further comprises:
[0052] Under the fill light of the first infrared lamp, photograph the palm to be identified at a first moment to obtain a first original image;
[0053] Under the supplementary light of the second infrared lamp, the palm to be identified is photographed at a second moment to obtain a second original image, wherein the first moment and the second moment differ by a preset interval time.
[0054] Specifically, the palm to be identified is photographed at a first moment under the fill light of the first infrared lamp to obtain a first original image, and then the first infrared lamp is turned off, the second infrared lamp is turned on, and the palm to be identified is photographed at a second moment under the fill light of the second infrared lamp to obtain a second original image, wherein the first moment and the second moment should differ by a short interval time, and the above interval time can be set by relevant technical personnel, such as 0.1s. Through this embodiment, the palm to be identified is controlled to be photographed at a short time interval, which can effectively ensure that the position, gesture, etc. of the palm to be identified will not move or change significantly during the two shooting processes, thereby facilitating the subsequent palm vein comparison processing based on the first original image and the second original image.
[0055] In some embodiments, the method further comprises:
[0056] Determine a first reference background in the first original image and a second reference background in the second original image;
[0057] Based on the first reference background and the second reference background, the brightness of the first original image is adjusted until the difference between the adjusted brightness of the first original image and the brightness of the second original image is less than a preset brightness threshold.
[0058] Specifically, a first reference background in the first original image and a second reference background in the second original image are determined, wherein the reference background of the original image is a non-vein area in the original image. The present application does not limit the segmentation method between the vein area and the non-vein area, and any existing segmentation method can be used to achieve the division of the vein area and the non-vein area in the original image.
[0059] In some preferred embodiments, part of the non-vein area may also be selected as the area where the reference background is located. This is because in actual applications, the brightness of the non-vein area in the captured original image is basically the same. Considering the calculation speed and efficiency, part of the non-vein area may be selected as the area where the reference background is located. For example, an area of a×b pixels in the non-vein area may be selected, or multiple areas of a×b pixels may be selected, etc. The size of the reference background area may be set by relevant technicians according to actual needs, and the shape of the reference area may also be set according to actual needs. This application includes but is not limited to square, circle, triangle, etc. It should be noted that the position of the first reference background selected in the first original image should be consistent with the position of the second reference background selected in the second original image, or the positions of the two are relatively similar.
[0060] After selecting the first reference background and the second reference background, the brightness of the first original image is adjusted based on the first reference background and the second reference background. There are multiple methods for adjusting the brightness of the first original image in the present application, including but not limited to, when adjusting the brightness in the present embodiment, first perform YUV conversion on the RGB of all pixels in the first reference background and the second reference background, wherein the Y value is the brightness value, or grayscale value. After conversion to YUV form, calculate the average difference between the Y value of each pixel in the first reference background and the Y value of the pixel at the corresponding position in the second reference background, and adjust the brightness of the first original image according to the average difference, that is, add the Y value of each pixel in the first original image to the average difference, so as to complete the adjustment of the brightness of the first original image. After the adjustment is completed, the difference between the brightness of the first original image and the brightness of the second original image is less than the preset brightness threshold on average, that is, the average value of the difference between the Y value of each pixel in the first original image and the Y value of the pixel at the corresponding position in the second original image is less than the preset brightness threshold, that is, the average value of the difference between the Y value of each pixel in the first original image and the Y value of the pixel at the corresponding position in the second original image is less than the preset brightness threshold, and the brightness threshold can be set by relevant technical personnel according to actual needs or simulation results.
[0061] The present application can unify the brightness of the first original image and the second original image.
[0062] In some embodiments, the method further comprises:
[0063] Extracting the grayscale value of each pixel in the first reference background to obtain a first grayscale array, and extracting the grayscale value of each pixel in the second reference background to obtain a second grayscale array;
[0064] The first grayscale array and the second grayscale array are linearly fitted to obtain a linear fitting function, and the pixel values in the first original image are substituted into the linear fitting function to calculate a third image, wherein the difference between the grayscale value of the background of the third image and the grayscale value of the second grayscale array is less than a preset grayscale value threshold.
[0065] Specifically, the present embodiment also provides a method for adjusting the brightness of the first original image, including performing YUV transformation on the pixel points in the first reference background and the second reference background, extracting the grayscale value of each pixel point in the first reference background, that is, the Y value, to obtain a first grayscale array, and similarly, extracting the grayscale value of each pixel point in the second reference background, that is, the Y value, to obtain the above-mentioned second grayscale array. The first grayscale array and the second grayscale array are linearly fitted to obtain a linear fitting function f(x), and the pixel values of all pixels in the first original image are brought into the above linear fitting function to obtain a third image with a new Y value calculated by the linear fitting function f(x) (it can be understood that the above calculation method only calculates the Y value of the pixel, and the U value and V value of each pixel remain unchanged), so that the Y value of the non-vein area of the third image is completely consistent with or very close to the Y value of the non-vein area of the second original image, that is, the difference between the grayscale value of the background of the third image and the grayscale value of the second grayscale array is less than the above grayscale value threshold, which can be set by relevant technical personnel. The above grayscale value threshold can be set by relevant technical personnel according to actual needs.
[0066] Through the present application, the brightness value of the first original image can be quickly converted, and the brightness of the first original image and the second original image can be unified, which is convenient for subsequent brightness comparison calculation of the vein area.
[0067] In some embodiments, the method further comprises:
[0068] Calculate the grayscale value difference between each pixel point in the vein feature area of the third image and the first original image point by point to obtain a grayscale difference array;
[0069] If the average value of the grayscale difference array is detected to be greater than or equal to the difference of the preset grayscale threshold, the palm to be identified is judged to be a real living palm; if the average value of the grayscale difference array is detected to be less than the grayscale threshold, the palm to be identified is judged to be a fake palm.
[0070] Specifically, the difference between the Y values of each pixel in the vein area of the third image and the first original image is calculated point by point to obtain a grayscale difference array K, that is, each value in the grayscale difference array K represents the point-to-point difference between each pixel in the vein area of the third image and the first original image.
[0071] Calculate the average value of the grayscale difference array K. Since the light intensity of the first infrared lamp and the second infrared lamp is the same, it is only necessary to combine the sensitivity of the image sensor (the sensor of the shooting camera) to light of different bands to obtain the theoretical value of the brightness difference of the image under the two bands, that is, the grayscale threshold mentioned above. When it is detected that the average value of the grayscale difference array is greater than or equal to the grayscale threshold, the palm to be identified is judged to be a real living palm. When it is detected that the average value of the grayscale difference array is less than the grayscale threshold, the palm to be identified is judged to be a fake palm.
[0072] In some embodiments, the method further comprises:
[0073] The grayscale values of each pixel in the first reference background and the second reference background are extracted respectively, and the difference in grayscale values between the pixels in the first reference background and the second reference background is calculated point by point, and the statistical standard deviation of the difference in grayscale values is calculated. When it is detected that the statistical standard deviation is greater than a preset standard deviation threshold, the captured first original image and the second original image are judged to be invalid.
[0074] Specifically, the grayscale value of each pixel in the first reference background and the second reference background is extracted, and the difference in grayscale value between the pixels in the first reference background and the second reference background is calculated point by point, that is, the Y value difference is calculated for each pixel. After obtaining the difference in grayscale value, the statistical standard deviation of the grayscale value difference is calculated. If the calculated statistical standard deviation is greater than the preset standard deviation threshold, the data is considered to be wrong. Similarly, if it is detected that the statistical standard deviation is less than or equal to the standard deviation threshold, the data is considered to be valid and the subsequent calculation is continued, wherein the standard deviation threshold can be set by relevant technical personnel according to actual needs. In summary, if the statistical standard deviation of the grayscale value difference is too large, it indicates that the brightness difference between the first reference background and the second reference background at the same position is too large. At this time, if the subsequent calculation process is continued, it may cause the subsequent calculation distortion. Therefore, if the above statistical standard deviation is detected to be too large, the subsequent calculation cannot be performed. Furthermore, if it is detected that the above statistical standard deviation is too large, the first reference background and the second reference background at the same position can be reselected (or the first original image and the second original image can be re-photographed), and the statistical standard deviation of the difference between the grayscale values of each pixel in the first reference background and the second reference background can be recalculated, and the statistical standard deviation is compared with the standard deviation threshold. The above steps are repeated until the statistical standard deviation of the grayscale value difference is less than or equal to the standard deviation threshold. If the number of repetitions of the above steps reaches a preset number threshold (such as 3 times), and the statistical standard deviation of the grayscale value difference has not yet met the requirement, all processes are terminated.
[0075] Through this embodiment, detection can be performed first when the first reference background and the second reference background are obtained. If it is detected that the brightness difference is too large, no subsequent processing is performed to prevent distortion when the brightness of the first original image and the second original image are unified based on the reference background.
[0076] In some embodiments, the method further comprises:
[0077] The light band of the first infrared lamp is 900nm-1000nm, and the light band of the second infrared lamp is 800nm-890nm.
[0078] Specifically, this embodiment provides a light band of a first infrared lamp and a second infrared lamp. It can be understood that the light band of the first infrared lamp and the second infrared lamp in this application is not limited to the above two values, and can also be set to 650nm and 1050nm, etc. It can be understood that all light band values that can make the palm veins show light and dark differences under the irradiation of infrared light of different bands should fall within the protection scope of this application.
[0079] This application also provides a preferred embodiment of palm vein recognition. Figure 2 FIG. 4 is a flow chart of a palm vein recognition method in a preferred embodiment.
[0080] Step S210, fill light to the palm to be identified with a first infrared light to obtain a first original image. Specifically, during the vein recognition process, fill light is applied to the palm to be identified, and then an image is formed through the absorption and reflection of the palm and palm veins in the infrared band.
[0081] Step S220, the palm to be identified is illuminated by a second infrared light to obtain a second original image. Specifically, after obtaining the first original image, the first infrared light is immediately turned off, and the second infrared light is turned on to obtain the second original image. The time interval between the first original image and the second original image should be very short (e.g., 0.1s) to avoid image errors caused by palm movement and gesture changes.
[0082] Step S230, select a reference background. Specifically, the method includes segmenting the palm area in the first original image and the second original image through an image recognition algorithm, and counting the pixel points a in the palm area, and then selecting a reference background area in the original image. The reference background area selects a vein-free area in the palm area, and the area size is set to b=1 / 50a. In other embodiments, two background areas b1 and b2 may also be selected, and b2=b1=1 / 100a. According to the above method, a first reference background of the first original image and a second reference background of the second original image are obtained.
[0083] Step S240, unifying the brightness of the first original image and the second original image. Specifically, it includes first converting all the pixels of the first reference background and the second reference background into YUV format, detecting the grayscale value (i.e., Y value) of each pixel in the first reference background and the second reference background, and calculating the difference of the grayscale value of each pixel point by point, and calculating the statistical standard deviation of the difference of the grayscale value of each pixel. When it is detected that the statistical standard deviation is greater than the preset standard deviation threshold, the first original image and the second original image are considered invalid, and the reference background area is reselected, or the first original image and the second original image are re-photographed. If after repeating three times, the statistical standard deviation of the difference of the grayscale value of the pixel is still calculated to be greater than the standard deviation threshold, the whole process ends. When it is detected that the statistical standard deviation is greater than the standard deviation threshold, the brightness of the first original image and the second original image is further unified, and the Y value of the pixel in the first reference background is linearly fitted with the Y value of the pixel in the second reference background to obtain a linear fitting function f(x). The Y values of all pixels in the first original image are substituted into f(x), and the U value and V value of the pixel remain unchanged to obtain a third image with a new Y value. At this time, the Y value of the non-vein area of the third image is completely consistent with or very close to the Y value of the non-vein area of the second image.
[0084] Step S250, comparing the vein area. Specifically, it includes calculating the difference between the Y value of the vein area of the third image and the first original image to obtain a grayscale difference array K, calculating the average value of the grayscale difference array K, and comparing the average value of K with a preset grayscale threshold. If the grayscale difference is greater than or equal to the grayscale threshold, it is considered that the comparison is passed and the palm to be identified is alive. If the grayscale difference is less than the grayscale threshold, it is considered that the comparison fails and the palm to be identified is a forged palm.
[0085] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0086] Based on the same inventive concept, the embodiment of the present application also provides a palm vein recognition device for implementing the palm vein recognition method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more palm vein recognition device embodiments provided below can refer to the limitations of the palm vein recognition method above, and will not be repeated here.
[0087] In one embodiment, Figure 3 As shown, a palm vein recognition device is provided, including: an acquisition module 31 and a detection module 32, wherein:
[0088] The acquisition module 31 is used to collect a first original image of the palm to be identified under the supplementary light of the first infrared lamp; and to collect a second original image of the palm to be identified under the supplementary light of the second infrared lamp; wherein the infrared bands of the first infrared lamp and the second infrared lamp are different;
[0089] The detection module 32 is used to unify the brightness of the background of the first original image and the second original image, perform venous grayscale comparison on the first original image and the second original image after the background brightness is unified, and when it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, identify the palm to be identified as a real living palm.
[0090] Specifically, the acquisition module 31 collects a first original image of the palm to be identified under the fill light of the first infrared lamp, and collects a second original image of the palm to be identified under the fill light of the second infrared lamp, wherein the infrared bands of the first infrared lamp and the second infrared lamp are different; the acquisition module 31 sends the collected first original image and the second original image to the front side module, and the detection module 32 compares the background brightness of the first original image and the second original image, and performs a venous grayscale comparison on the first original image and the second original image after the background brightness is unified. When it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to the grayscale threshold, the palm to be identified is identified as a real living palm.
[0091] Each module in the palm vein recognition device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0092] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store palm vein recognition related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a palm vein recognition method is implemented.
[0093] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0094] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0095] Under the supplementary light of the first infrared lamp, collecting a first original image of the palm to be identified; and,
[0096] Under the supplementary light of the second infrared light, a second original image of the palm to be identified is collected; wherein the infrared bands of the first infrared light and the second infrared light are different;
[0097] The brightness of the background of the first original image and the second original image is unified, and the venous grayscale comparison is performed on the first original image and the second original image after the background brightness is unified. When it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, the palm to be identified is identified as a real living palm.
[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0099] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0100] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A palm vein recognition method, characterized in that: The method comprises: Under the supplementary light of the first infrared lamp, collecting a first original image of the palm to be identified; and, Under the supplementary light of a second infrared lamp, a second original image of the palm to be identified is collected; wherein the infrared bands of the first infrared lamp and the second infrared lamp are different; The brightness of the background of the first original image and the second original image is unified, and the venous grayscale comparison is performed on the first original image and the second original image after the background brightness is unified. When it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, the palm to be identified is identified as a real living palm.
2. The method according to claim 1, characterized in that Acquiring the first original image and the second original image includes: Under the fill light of the first infrared lamp, photographing the palm to be identified at a first moment to obtain the first original image; Under the supplementary light of the second infrared lamp, the palm to be identified is photographed at a second moment to obtain the second original image, wherein the first moment differs from the second moment by a preset interval time.
3. The method according to claim 1, characterized in that The step of unifying the brightness of the backgrounds of the first original image and the second original image includes: Determining a first reference background in the first original image and a second reference background in the second original image; Based on the first reference background and the second reference background, the brightness of the first original image is adjusted until the difference between the adjusted brightness of the first original image and the brightness of the second original image is less than a preset brightness threshold.
4. The method according to claim 3, characterized in that The adjusting the brightness of the first original image based on the first reference background and the second reference background includes: Extracting the grayscale value of each pixel in the first reference background to obtain a first grayscale array, and extracting the grayscale value of each pixel in the second reference background to obtain a second grayscale array; The first grayscale array and the second grayscale array are linearly fitted to obtain a linear fitting function, and the pixel values in the first original image are substituted into the linear fitting function to calculate a third image, wherein the difference between the grayscale value of the background of the third image and the grayscale value of the second grayscale array is less than a preset grayscale value threshold.
5. The method according to claim 4, characterized in that When it is determined that the difference in vein grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, identifying the palm to be identified as a real living palm includes: Calculating point-by-point the difference in grayscale value between each pixel point in the vein feature area of the third image and the first original image to obtain a grayscale difference array; If it is detected that the average value of the grayscale difference array is greater than or equal to the difference of the preset grayscale threshold, the palm to be identified is judged to be a real living palm; if it is detected that the average value of the grayscale difference array is less than the grayscale threshold, the palm to be identified is judged to be a fake palm.
6. The method according to claim 3, characterized in that After determining the first reference background in the first original image and the second reference background in the second original image, the method further includes: The grayscale values of each pixel in the first reference background and the second reference background are extracted respectively, and the difference in grayscale values between the pixel points in the first reference background and the second reference background is calculated point by point, and the statistical standard deviation of the difference in grayscale values is calculated. When it is detected that the statistical standard deviation is greater than a preset standard deviation threshold, it is determined that the captured first original image and the second original image are invalid.
7. The method according to any one of claims 1 to 6, characterized in that: The wavelength band of the light of the first infrared lamp is 900nm-1000nm, and the wavelength band of the light of the second infrared lamp is 800nm-890nm.
8. A palm vein recognition device, characterized in that: The device comprises: An acquisition module, used to collect a first original image of a palm to be identified under the supplementary light of a first infrared lamp; and to collect a second original image of the palm to be identified under the supplementary light of a second infrared lamp; wherein the infrared bands of the first infrared lamp and the second infrared lamp are different; The detection module is used to unify the brightness of the background of the first original image and the second original image, perform a venous grayscale comparison on the first original image and the second original image after the background brightness is unified, and when it is determined that the difference in venous grayscale between the first original image and the second original image is greater than or equal to a preset grayscale threshold, identify the palm to be identified as a real living palm.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.