A method and system for vein feature extraction
By enhancing vein texture features using the Hessian matrix and Gaussian second-order partial derivatives, and combining multi-scale response and local histogram equalization, the problems of low contrast and noise interference in vein images are solved, achieving reliable extraction and accurate recognition of vein features. This approach is suitable for real-time processing and resource-constrained devices.
Patent Information
- Application Number
- CN202510786530.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2026-07-28
- Estimated Expiration
- 2045-06-12
AI Technical Summary
Existing vein image extraction technologies suffer from low contrast and severe noise interference due to factors such as changes in ambient lighting, finger placement, and finger disturbance, making it difficult to extract reliable vein information. Furthermore, they are computationally complex and unsuitable for real-time processing or resource-constrained devices.
Hessian matrix and Gaussian second-order partial derivative are used to enhance vein texture features. The principal curvature information of the image is enhanced by gamma, and multi-scale response and local histogram equalization are combined to enhance and binarize the vein texture features, suppress background noise interference, and improve the distinguishability and recognition accuracy of vein images.
It effectively enhances the contrast and recognition accuracy of vein images, reduces the impact of environmental factors, improves the robustness and generalization ability of the model, and is suitable for real-time processing and resource-constrained devices.
Smart Images

Figure CN120746949B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for extracting vein features, and also to a system for implementing the method, belonging to the field of biometric identification technology. Background Technology
[0002] With the rapid development of computer and information technology, the importance of information security in various fields has become increasingly prominent. In applications such as finance, security, and online transactions, accurate identity verification is a crucial means of ensuring information and property security. Compared to traditional authentication methods based on passwords or documents, biometric identification technologies that utilize inherent human characteristics such as facial features and fingerprints, along with finger vein recognition, have become widely used in daily life due to their uniqueness, immutability, and portability.
[0003] Compared to first-generation biometric technologies such as facial recognition and fingerprint recognition, finger vein-based identity authentication technology has attracted increasing attention from researchers and institutions in recent years. Because finger veins are located beneath the epidermis, the information is protected by the skin tissue, making them less susceptible to damage or contamination from external factors and difficult to steal, thus possessing inherent anti-counterfeiting advantages. Compared to fingerprint and facial recognition technologies, its security level and anti-counterfeiting capabilities are higher, making it one of the research hotspots in the field of biometric identification. Deoxyhemoglobin in veins can absorb light radiation with wavelengths of 760–850 nm, therefore, acquiring vein images typically requires infrared equipment. Vein images are easily affected by changes in ambient lighting, finger placement, and finger movement, often resulting in low contrast and poor feature extraction. While many technologies exist for vein image enhancement, extracting reliable vein information in real-world applications remains a significant challenge.
[0004] Chinese patent application CN117437665A discloses a method for extracting finger vein features. This solution involves installing an infrared camera inside a door handle or car handle to capture images of the user's finger veins and perform identity matching, determining whether the acquired vein feature information matches stored vein feature information. While this method allows users to easily view finger vein features and achieves high recognition efficiency, it relies on a large amount of labeled data and model parameter optimization, resulting in high computational complexity and making it unsuitable for real-time processing or resource-constrained devices. Summary of the Invention
[0005] The primary technical problem to be solved by this invention is to provide a method for extracting vein features.
[0006] Another technical problem to be solved by the present invention is to provide a system for vein feature extraction.
[0007] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution:
[0008] According to a first aspect of the present invention, a method for vein feature extraction is provided, comprising the following steps:
[0009] S1: Acquire vein images;
[0010] S2: Preprocess the vein image to obtain the gamma-enhanced image V. G ;
[0011] S3: Set the scale factor σ = [σ1, σ2, σ3, ...] and the sliding window W = [W1, W2, W3, ...];
[0012] S4: Enhance vein texture features and extract gamma-enhanced image V based on the Hessian matrix and Gaussian second-order partial derivatives. G Principal curvature information V Hi ;
[0013] S5: Take the gamma-enhanced image V G Principal curvature information V Hi The minimum value is obtained by calculating the Hessian matrix-enhanced image V based on the multi-scale response. Hmax ;
[0014] S6: Enhance image V using the Hessian matrix Hmax Local histogram equalization is performed to further enhance vein texture features, resulting in a locally histogram equalized enhanced image V. LHE ;
[0015] S7: Select the average grayscale value as the global threshold for binarization to enhance the local histogram equalization of the image V. LHE Binarization and morphological processing are performed to obtain vein images with enhanced texture features.
[0016] Preferably, in step S4, Gaussian smoothing is used to reduce the interference of high-frequency noise and stabilize the calculation of the principal curvature.
[0017] A preferred approach is to control the smoothing scale by adjusting the standard deviation of the Gaussian kernel, which can then be used to accommodate blood vessels of different widths.
[0018] Preferably, the extraction of principal curvature information from the gamma-enhanced image includes the following steps:
[0019] S41: Calculate the Hessian matrix for each pixel using the following formula:
[0020]
[0021] Where H is the Hessian matrix; x is the horizontal coordinate of the image; y is the vertical coordinate of the image; VG Enhance the image with gamma; The second-order partial derivative of the gamma-enhanced image in the x-direction; The second-order partial derivative of the gamma-enhanced image in the y-direction; The mixed partial derivatives of the gamma-enhanced image in the x and y directions;
[0022] S42: The minimum and maximum principal curvatures are calculated using the following formula:
[0023]
[0024] Where λ1 is the minimum principal curvature and λ2 is the maximum principal curvature.
[0025] Preferably, after step S42, the following is also included:
[0026] S43: The principal curvature is smoothed using a Gaussian function. The formula for the second-order partial derivative of Gaussian is:
[0027]
[0028] Where σ is the scale factor; x is the horizontal coordinate of the image; y is the vertical coordinate of the image; G xx G is the second-order partial derivative of the Gaussian function with respect to x; yy G is the second-order partial derivative of the Gaussian function with respect to y; xy Let be the second mixed partial derivative of the Gaussian function with respect to x and y; e is the base of the natural logarithm.
[0029] Preferably, in step S5, multi-scale Hessian calculations are used to detect veins at different scales, thereby enhancing the complete venous network structure.
[0030] Preferably, the minimum principal curvature of the principal curvature information is used to highlight the vein features at the current smooth scale to highlight the vascular structure.
[0031] Among these, the Hessian matrix-enhanced image V is obtained more preferably based on the multi-scale response. Hmax It includes the following steps:
[0032] S51: Obtain principal curvature information V Hi The minimum principal curvature is taken as a characteristic at a certain scale, and the response formula at this scale is:
[0033]
[0034] S52: Repeat step S51 to obtain principal curvature information at a set of scales, extract the minimum principal curvature values at different scales, and obtain the final multi-scale response V. Mul The final formula for the multiscale response is:
[0035] V Mul =min(V Hi )
[0036] S53: Normalize the image using the following formula to obtain the Hessian matrix-enhanced image V. Hmax :
[0037]
[0038] Preferably, in step S6, the Hessian matrix is enhanced in the image V. Hmax Local histogram equalization is performed to obtain the locally histogram equalized enhanced image V. LHE It includes the following steps:
[0039] S61: The adaptively changing equalization window W is obtained through the following formula. HE :
[0040]
[0041] Where x is the horizontal coordinate of the image; y is the vertical coordinate of the image; w min Minimum window; w max β is the maximum window size; β is a parameter that adjusts the degree of nonlinearity, and β < 1 will enhance the discrimination of high grayscale areas, while β > 1 will enhance the discrimination of low grayscale areas.
[0042] S62: Based on the grayscale histogram, the probability density function for each region is defined by the following formula:
[0043]
[0044] Where k is the gray level; N(k) is the number of pixels at that gray level;
[0045] S63: The cumulative distribution function C(k) is obtained through the following formula:
[0046]
[0047] Where k is the current gray level; j is the index for traversing gray levels, from the minimum gray level 0 to the current gray level k; P(j) is the probability of gray level j appearing.
[0048] S64: Histogram equalization mapping is performed using the following formula to obtain the locally histogram equalized enhanced image V. LHE :
[0049]
[0050] Where, round means rounding down.
[0051] According to a second aspect of the present invention, a system for vein feature extraction is provided, comprising a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program that, when executed by the processor, causes the processor to implement the above-described method.
[0052] Compared with existing technologies, this invention first utilizes the Hessian matrix to calculate the principal curvature information of the image to enhance vein texture features and improve image contrast. Subsequently, a local histogram correction method is introduced to equalize the local grayscale distribution of the image, further enhancing vein texture features. This invention effectively suppresses background noise interference, reduces the impact of environmental factors on vein recognition, thereby improving the discriminability and recognition accuracy of vein images, and enhancing the robustness and generalization ability of the model. Attached Figure Description
[0053] Figure 1 This is a flowchart of a method for vein feature extraction in the first embodiment of the present invention;
[0054] Figure 2 This is the initial vein image acquired in the first embodiment of the present invention;
[0055] Figure 3 In the first embodiment of the present invention, the gamma-enhanced image is obtained after preprocessing the initial vein image;
[0056] Figure 4 This is a schematic diagram of a Hessian matrix-enhanced image in the first embodiment of the present invention;
[0057] Figure 5 This is a schematic diagram of local histogram equalization enhancement of an image in the first embodiment of the present invention;
[0058] Figure 6 This is a schematic diagram of the effect after binarization processing in the first embodiment of the present invention;
[0059] Figure 7 This is a schematic diagram of a system for extracting vein features according to a second embodiment of the present invention. Detailed Implementation
[0060] The technical content of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0061] First Embodiment
[0062] like Figure 1 As shown, the first embodiment of the present invention provides a method for vein feature extraction, which includes at least the following steps:
[0063] S1: Acquire vein images.
[0064] S2: Preprocess the vein image to obtain the gamma-enhanced image V. G .
[0065] S3: Set the scale factor σ = [σ1, σ2, σ3, ...] and the sliding window W = [W1, W2, W3, ...].
[0066] S4: Extract the gamma-enhanced image V based on the Hessian matrix and the second-order partial derivative of Gaussian. G Principal curvature information V Hi V Hi The expression is: V Hi =f(V G ,σ i W i ), i = 1, 2, 3, ...
[0067] S5: Take the gamma-enhanced image V G Principal curvature information V Hi The minimum value is obtained by calculating the Hessian matrix-enhanced image V based on the multi-scale response. Hmax .
[0068] S6: Enhance image V using the Hessian matrix Hmax Local histogram equalization is performed to obtain the locally histogram equalized enhanced image V. LHE .
[0069] S7: Select the average grayscale value as the global threshold for binarization to enhance the local histogram equalization of the image V. LHE Binarization and morphological processing are performed to obtain vein images with enhanced texture features, which are used to accurately extract vein texture features.
[0070] In one embodiment of the present invention, step S4, which extracts the principal curvature information of the gamma-enhanced image, includes the following steps:
[0071] S41: Calculate the Hessian matrix for each pixel using the following formula:
[0072]
[0073] Where H is the Hessian matrix; x is the horizontal coordinate of the image; y is the vertical coordinate of the image; V G Enhance the image with gamma; The second-order partial derivative of the gamma-enhanced image in the x-direction; The second-order partial derivative of the gamma-enhanced image in the y-direction; The mixed partial derivatives of the gamma-enhanced image in the x and y directions.
[0074] S42: The minimum and maximum principal curvatures are calculated using the following formula:
[0075]
[0076] Where λ1 is the minimum principal curvature and λ2 is the maximum principal curvature. The eigenvalues λ1 and λ2 of the Hessian matrix represent the curvature of a local region of the image in two orthogonal directions. Positive values indicate that there is a convexity (local curvature facing outward) in this direction, which is common at edges, corners or the outer edge of blood vessels. Negative values indicate that there is a depression (local curvature facing inward) in this direction, which is common on the inner side of blood vessels or in concave areas.
[0077] S43: The principal curvature is smoothed using a Gaussian function. The formula for the second-order partial derivative of Gaussian is:
[0078]
[0079] Where σ is the scale factor; x is the horizontal coordinate of the image; y is the vertical coordinate of the image; G xx G is the second-order partial derivative of the Gaussian function with respect to x; yy G is the second-order partial derivative of the Gaussian function with respect to y; xy is the second mixed partial derivative of the Gaussian function with respect to x and y; e is the base of the natural logarithm, approximately equal to 2.71828.
[0080] In vein image processing, extracting principal curvature information usually requires calculating the second derivative of the image. However, directly calculating the second derivative of a discrete image is easily affected by noise. Gaussian smoothing can reduce the interference of high-frequency noise, making the principal curvature calculation more stable.
[0081] The width of veins varies considerably, and the principal curvature characteristics differ between small and large vessels. By adjusting the standard deviation of the Gaussian kernel, the smoothing scale can be controlled, thus adapting to vessels of different widths: smaller kernels are suitable for detecting fine vessels, while larger kernels are suitable for detecting large vessels.
[0082] Therefore, a method based on Gaussian second derivative templates for convolution calculation is adopted to smooth noise and obtain stable curvature information. Multi-scale Hessian calculation is used to detect veins at different scales, enhancing the complete venous network structure.
[0083] In one embodiment of the present invention, in step S5, the Hessian matrix-enhanced image V is obtained based on the multi-scale response. Hmax It includes the following steps:
[0084] S51: Obtain principal curvature information V HiThe minimum principal curvature is taken as a characteristic at a certain scale, and the response formula at this scale is:
[0085]
[0086] In vein image processing, different values of 'i' correspond to different scales. Due to the large diameter of blood vessels, some local changes in vein structures are relatively gentle, making the maximum principal curvature insufficient to fully highlight the vascular structure, only highlighting the vessel outline. Therefore, enhancing with the maximum principal curvature may not be able to extract vein features. In contrast, the minimum principal curvature can more stably reflect the difference between the vein region and the background.
[0087] Therefore, take V. Hi The minimum principal curvature is used as the vein feature at this smooth scale. The vein feature has a valley shape, that is, the minimum principal curvature at the feature is less than the minimum principal curvature at the non-vein feature, and the minimum principal curvature will not be greater than 0. Therefore, the smaller the minimum principal curvature, the more obvious the vein feature.
[0088] S52: Repeat step S51 to obtain principal curvature information at a set of scales, extract the minimum principal curvature values at different scales, and obtain the final multi-scale response V. Mul The final formula for the multiscale response is:
[0089] V Mul =min(V Hi )
[0090] S53: Normalize the image using the following formula to obtain the Hessian matrix-enhanced image V. Hmax :
[0091]
[0092] In one embodiment of the present invention, step S6 involves enhancing the Hessian matrix image V. Hmax Local histogram equalization is performed to obtain the locally histogram equalized enhanced image V. LHE It includes the following steps:
[0093] S61: The adaptively changing equalization window W is obtained through the following formula. HE :
[0094]
[0095] Where x is the horizontal coordinate of the image; y is the vertical coordinate of the image; w min Minimum window; w max β is the maximum window size; β is a parameter that adjusts the degree of nonlinearity, and β < 1 will enhance the discrimination of high grayscale areas, while β > 1 will enhance the discrimination of low grayscale areas.
[0096] S62: Based on the grayscale histogram, the probability density function for each region is defined by the following formula:
[0097]
[0098] Where k is the gray level; N(k) is the number of pixels at that gray level.
[0099] S63: The cumulative distribution function C(k) is obtained through the following formula:
[0100]
[0101] Where k is the current gray level; j is the index for traversing gray levels, from the minimum gray level 0 to the current gray level k; P(j) is the probability of gray level j appearing.
[0102] The cumulative distribution function represents the proportion of pixels in a local region that are less than or equal to a certain gray value.
[0103] S64: Histogram equalization mapping is performed using the following formula to obtain the locally histogram equalized enhanced image V. LHE :
[0104]
[0105] Where, round means rounding down.
[0106] The specific steps of the above method will be explained in detail below:
[0107] First, obtain vein images. (Reference) Figure 2 The acquisition of vein images utilizes near-infrared imaging technology to convert the vascular structure inside the finger into a visible grayscale image. Because deoxyhemoglobin in veins has a higher absorption rate for light with wavelengths of 760–850 nm, when a near-infrared light source illuminates the finger, the vascular area will appear as dark streaks with lower grayscale in the image due to the greater light absorption, while the surrounding tissue will appear as a relatively bright background. To ensure the quality of acquired images, strict control is required in several aspects, including hardware configuration, operating procedures, and environmental control. On the hardware side, a near-infrared camera with a resolution of at least 300 dpi must be used, paired with a ring light source with a wavelength of 850 nm to ensure uniform and stable illumination, avoiding bright or dark patches or reflective noise in the image due to uneven light source intensity. During operation, the finger must be perpendicularly placed against the acquisition window using mechanical clamps or fixing devices to ensure consistent position and angle for each acquisition, reducing image distortion or blurring caused by finger movement, tilting, or rotation. Regarding the environment, interference from natural light and other non-infrared light sources must be shielded. Typically, a black light shield is used to cover the acquisition area, while indoor temperature and humidity are controlled to prevent environmental factors from affecting blood distribution in the finger and image contrast.
[0108] However, due to limitations in hardware performance, individual differences, and operational errors, raw vein images often suffer from several problems: First, low contrast, with little grayscale difference between veins and background, blurred vessel edges, and difficulty in distinguishing branching structures, especially for users with darker skin or thicker skin, where vein signals may be severely weakened; second, noise interference, including electronic noise from the sensor itself, motion artifacts caused by slight finger tremors, and structural noise from skin texture and hair, which can obscure the true morphology of blood vessels; and third, uneven illumination, even with a ring light source, can still result in areas that are too bright or too dark due to finger placement angles or uneven skin surfaces, affecting subsequent feature analysis. Therefore, image quality screening is necessary after acquisition. Low-contrast or high-noise samples are removed by calculating grayscale variance, entropy, and other indicators to ensure that images entering subsequent processing have clear vessel outlines and distinguishable details, laying the foundation for subsequent preprocessing and feature extraction.
[0109] Secondly, preprocessing and gamma enhancement were performed, and the results are referenced. Figure 3 The core objective of the preprocessing stage is to clean the image and enhance its initial contrast, providing high-quality input for subsequent feature extraction. This stage mainly includes two key steps: noise reduction and gamma correction. First, for salt-and-pepper noise and Gaussian noise in the original image, median and bilateral filters are used for graded noise reduction. The median filter, by replacing each pixel with the median of its neighborhood, can effectively remove isolated black and white noise while preserving the edges of blood vessels, avoiding the edge blurring problem caused by traditional Gaussian filtering. The bilateral filter further combines the spatial distance and grayscale difference of pixels to smooth noise while protecting the boundary between blood vessels and the background, ensuring the accuracy of subsequent curvature calculation.
[0110] Building upon noise reduction, gamma correction is used to non-linearly adjust the grayscale distribution of the image to enhance the contrast of the vein region. Since vein images are typically dark overall, details in low-grayscale areas (blood vessels) are compressed. Gamma correction introduces a correction factor less than 1 (e.g., 0.5–0.8) to stretch low grayscale values and compress high grayscale values, thereby increasing the grayscale difference between the blood vessels and the background. For example, a vein region originally concentrated in the 50–100 grayscale range can be expanded to 80–150 after gamma correction, while the grayscale change in the background region is smaller, making the outline and branches of the blood vessels clearer. This non-linear enhancement effectively improves the visual effect of the image while avoiding background overexposure or noise amplification problems caused by linear stretching.
[0111] The preprocessed image must meet certain quality standards, such as a significantly improved peak signal-to-noise ratio (PSNR), a structural similarity (SSIM) greater than 0.9, and a gray-level variance greater than 200, ensuring effective noise suppression, sharp vessel edges, and rich details. Through this step, the vascular structure in the image is transformed from blurry dark lines into tubular structures with obvious gray-level differences, providing clear gray-level gradient information for subsequent feature analysis based on principal curvature, significantly improving the processing effect and stability of subsequent steps.
[0112] Next, we set the scale factor and sliding window. The diameter of veins ranges from 0.1 to 1 mm, corresponding to a width of 3 to 30 pixels in the image. Different vessel diameters require different "observation scales" to accurately capture their morphological features. To accommodate this scale diversity, a set of scale factors (e.g., σ = 1.0, 1.5, ..., 4.0) covering different vessel widths needs to be set. Each scale factor corresponds to the standard deviation of a Gaussian kernel, determining the degree of Gaussian smoothing and the range of local feature detection. Small scale factors (e.g., σ = 1.0) correspond to smaller Gaussian kernels, suitable for detecting local details of thin vessels, as they are more sensitive to rapid changes in grayscale (e.g., the edges and branches of thin vessels); large scale factors (e.g., σ = 4.0) correspond to larger Gaussian kernels, capable of capturing the overall trend of thicker vessels and reducing interference caused by local noise.
[0113] Complementing the scale factor is a sliding window mechanism. The window size is determined according to the "3σ criterion," meaning the window radius is three times the scale factor. This ensures the Gaussian kernel covers a high energy range and avoids edge effects. For example, the window size is 7×7 when σ = 1.0 and 25×25 when σ = 4.0. The window slides across the image in 1-pixel increments, analyzing the grayscale features of its neighborhood pixel by pixel. The advantage of multi-scale detection is its ability to cover blood vessels of varying thicknesses: thin blood vessels stand out at small scales due to drastic changes in local curvature, while thick blood vessels are clearly visible at large scales due to overall concavity. This avoids the missed detection problems caused by single-scale detection (e.g., thin blood vessels are smoothed out at large scales, and thick blood vessels are underreacted at small scales).
[0114] In practical applications, the number and interval of scale factors need to be rationally designed based on the statistical distribution of blood vessel diameters. Logarithmic intervals (e.g., increasing by 0.5 each time) are typically used to ensure uniform detection sensitivity for blood vessels of different widths. Although multi-scale processing increases computational load, by preprocessing Gaussian kernel templates and utilizing hardware acceleration (e.g., GPUs), the scale setting time for a single image can be controlled within real-time processing limits, ensuring the engineering practicality of this invention. This step provides the foundation for subsequent multi-scale principal curvature analysis, enabling this invention to comprehensively capture the entire vascular network from extremely fine branches to robust trunks, significantly improving the completeness and robustness of feature extraction.
[0115] Next, multi-scale principal curvature information is extracted. Principal curvature analysis distinguishes blood vessels from the background by the curvature of the local gray-level surface in the image. In differential geometry, principal curvature describes the curvature of a surface in two orthogonal directions. For vein images, the blood vessel region forms a "valley"-shaped concave structure because the gray level decreases from the periphery to the center. Its minimum principal curvature (corresponding to the direction with the gentlest gray-level change) is negative and has a large absolute value, while the principal curvature of the background region is close to zero or positive (convex structure). To accurately calculate the principal curvature, the image needs to be Gaussian smoothed first to reduce the interference of noise on the calculation of the second derivative. The degree of smoothing is determined by the previously set scale factor. Small scales correspond to slight smoothing, preserving the local details of fine blood vessels; large scales correspond to deep smoothing, highlighting the overall trend of thick blood vessels.
[0116] For each scale of smoothed image, the second-order partial derivative of the Hessian matrix is calculated pixel-by-pixel. Two principal curvatures are obtained through eigenvalue decomposition. The minimum principal curvature λ1 is selected as the feature quantity because it more stably reflects the difference between blood vessels and the background. The minimum principal curvature of the vein region is significantly smaller than that of the background and will not be greater than 0. The larger its absolute value, the more obvious the vascular features. The significance of multi-scale computation lies in the fact that blood vessels of different thicknesses have the strongest curvature response at specific scales: thin blood vessels have a smaller minimum principal curvature at small scales due to severe local concavity, while thick blood vessels have a smaller minimum principal curvature at large scales due to the wider overall concavity range. By performing parallel computation of curvature information at seven scales, this invention can comprehensively capture the "valley" features of blood vessels of different widths, avoiding information loss at a single scale.
[0117] Experiments show that the mean minimum principal curvature of the vein region is significantly lower than that of the background region, and their distributions do not overlap, providing a reliable basis for subsequent feature enhancement. This step not only achieves a quantitative description of the vascular structure but also lays the foundation for generating Hessian-enhanced images through multi-scale fusion preprocessing. This enables the invention to effectively handle complex situations such as uneven vascular thickness and noise interference, improving the accuracy and robustness of feature extraction.
[0118] Next, generate the Hessian matrix-enhanced image, referring to... Figure 4After acquiring multi-scale principal curvature information, a Hessian-enhanced image needs to be generated using a fusion strategy to integrate vascular signals at different scales, suppress noise, and improve overall contrast. Single-scale response maps have significant limitations: while small-scale images can highlight fine vessels, they are easily affected by noise, resulting in numerous artifacts; while large-scale images can clearly display thick vessels, fine branches may disappear due to excessive smoothing. To address this issue, a "minimum fusion" strategy is adopted: for each pixel, the absolute value of the minimum principal curvature response value at all scales is taken (since the minimum principal curvature of the vein region is negative, taking the absolute value results in a high response in the vascular region). The core logic of this strategy is that each vessel has the strongest response (largest absolute value) at its optimal scale, while its response is weaker (smaller absolute value) at other scales, but still higher than the background area. Taking the minimum value preserves vascular signals at all scales while suppressing low responses caused by noise.
[0119] The fused image needs to be normalized to map pixel values to a standard grayscale range of 0–255, eliminating amplitude differences between different scales and ensuring consistency in subsequent processing. The normalized Hessian-enhanced image shows significant visual improvement: the grayscale value of the vein region is significantly higher than the background, the blood vessel outline is clear, the branching structure is complete, and the number of noise points is greatly reduced. For example, the blurred blood vessel branches after preprocessing become sharp and distinguishable in the enhanced image; both thin blood vessels with a diameter of 1 pixel and thick blood vessels with a diameter of 20 pixels are clearly displayed, and the grayscale difference between the blood vessels and the background increases from 20 before preprocessing to over 80.
[0120] This step, through multi-scale information fusion, effectively solves the limitation of single-scale detection, enabling the invention to simultaneously capture blood vessels of varying thicknesses. This enhances the integrity and contrast of the venous network, providing high-quality input images for subsequent local histogram correction. Experimental data show that the Hessian-enhanced image exhibits significantly improved structural similarity (SSIM) and peak signal-to-noise ratio (PSNR) compared to the preprocessed image, significantly improving image quality and laying a solid foundation for subsequent feature extraction.
[0121] Next, local histogram equalization is performed on the Hessian matrix-enhanced image, referring to... Figure 5Local histogram correction achieves differentiated enhancement of vascular and background regions by adaptively adjusting the processing window size for each pixel. Traditional global histogram equalization amplifies background noise, while local methods dynamically adjust the window based on the grayscale distribution of the enhanced image according to Hessian: small windows (e.g., 3×3–7×7) are used in vascular regions (low grayscale, high curvature response) to focus on enhancing the texture details of subtle branches; large windows (e.g., 11×15–15×15) are used in background regions (high grayscale, low curvature response) to smooth irrelevant noise such as skin texture, preventing excessive noise amplification. The window size adjustment is achieved through a non-linear function, ensuring a smooth transition at the boundary between vessels and background, avoiding blockage effects caused by abrupt window changes.
[0122] Within each local window, the original grayscale values are mapped to equalized grayscale values by statistically analyzing the grayscale histogram and calculating the cumulative distribution function (CDF), thereby enhancing local contrast. Specifically, for low-grayscale pixels in the blood vessel region, their grayscale values are stretched to a wider range after mapping, highlighting subtle differences within the blood vessels; for high-grayscale pixels in the background region, their grayscale distribution is compressed after mapping, reducing interference from irrelevant textures. This site-specific enhancement strategy effectively improves the distinguishability of blood vessels while suppressing background noise, making it particularly suitable for complex scenes in vein images where blood vessels and skin textures intertwine.
[0123] Compared to global equalization, local histogram correction offers significant advantages. Local methods effectively reduce background interference while preserving vascular details. For example, wrinkles in the palm might be misidentified as blood vessels after global processing, while local correction, through large-window smoothing, preserves the natural transitions of the texture and avoids artifacts. This step further optimizes the local grayscale distribution of the image, making the vascular structure more prominent and providing ideal input for subsequent binarization processing.
[0124] Next, the locally histogram equalization enhanced image is binarized and morphologically processed to obtain the final enhanced result, as shown in the reference. Figure 6 The goal of binarization and morphological processing is to extract a complete and continuous vascular skeleton through thresholding and structural optimization. First, a global thresholding method is used to binarize the image after local histogram correction. The average grayscale value of the image is selected as the threshold, with pixels below the threshold set to black (vessels) and pixels above the threshold set to white (background). The rationale for this method is that after multiple enhancement steps, the overall grayscale of the vein region is significantly lower than that of the background, the average threshold can effectively distinguish between the two, and the calculation is simple and efficient, making it suitable for real-time processing scenarios.
[0125] The binarized image may contain isolated noise points (such as small white patches) and broken blood vessels (such as gaps caused by noise or acquisition errors), requiring optimization through morphological operations: Opening operations (erosion followed by dilation) are used to remove isolated noise points. The erosion operation eliminates noise points with areas smaller than the structuring element by setting the pixel value to the minimum of its neighborhood, while the dilation operation restores the original width of the blood vessels, preventing them from becoming thinner. Closing operations (dilation followed by erosion) are used to connect broken blood vessel branches. The dilation operation fills small gaps, and the erosion operation removes excess pixels introduced by the dilation, ensuring the continuity and accuracy of the blood vessels. The structuring element is usually chosen as a rhombus or a circle, with the rhombus element being more sensitive to obliquely distributed blood vessels and better preserving their geometric features.
[0126] The final binarized image must meet strict quality standards: the number of connected vascular regions must match the actual anatomical structure, there should be no large areas of isolated noise, and the vessel edges should be smooth without jagged artifacts. For example, the main branches of the finger veins should be completely connected, vessels with a diameter of 2 pixels or more should be unbroken, and noise with an area of less than 10 pixels should be completely removed. The processing effect of this step directly affects the accuracy of subsequent feature recognition. Through this step, the present invention extracts a concise and clear vascular structure from complex grayscale images, providing efficient and reliable input features for biometric recognition. This enables the entire methodology to have a complete closed-loop capability from image preprocessing to feature extraction, significantly improving the practicality and robustness of the vein recognition system.
[0127] Second Embodiment
[0128] Based on the above method, the second embodiment of the present invention provides a system for vein feature extraction.
[0129] like Figure 7 As shown, the system includes one or more processors and a memory. The memory is coupled to the processor and stores one or more programs that, when executed by the processor, cause the processor to implement the vein feature extraction method described in the above embodiments.
[0130] The processor controls the overall operation of the system to complete all or part of the steps described above. This processor can be a central processing unit (CPU), graphics processing unit (GPU), field-programmable gate array (FPGA), application-specific integrated circuit (ASIC), digital signal processing (DSP) chip, etc. The memory stores various types of data to support the operation of the system. This data may include, for example, instructions for any application or method operating on the system, as well as application-related data. The memory can be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, etc.
[0131] In one exemplary embodiment, the system may be implemented by a computer chip or physical entity, or by a product with certain functions, to perform the methods described above and achieve the same technical effects as those methods described above. A typical embodiment is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interface device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0132] In another exemplary embodiment, the present invention also provides a computer-readable storage medium including program instructions that, when executed by a processor, implement the steps of the method in any of the above embodiments. For example, the computer-readable storage medium may be the memory including the program instructions described above, which can be executed by a processor to complete the above method and achieve the same technical effects as the above method.
[0133] It should be noted that the above embodiments are merely illustrative examples. The technical solutions of each embodiment can be combined, and all are within the protection scope of this invention.
[0134] The method and system for vein feature extraction provided by this invention have been described in detail above. Any obvious modifications made by those skilled in the art without departing from the essence of this invention will constitute an infringement of the patent rights of this invention and will incur corresponding legal liability.
Claims
1. A method for extracting vein features, characterized in that... include: S1: Acquire vein images; S2: Preprocess the vein image to obtain a gamma-enhanced image. ; S3: Set the scaling factor and sliding window ; S4: Enhance vein texture features and extract gamma-enhanced images based on the Hessian matrix and Gaussian second-order partial derivatives. Principal curvature information , where subscript For the first Group scale factor and group number of the sliding window. , This represents the total number of scale factors; S5: Obtain gamma-enhanced image Principal curvature information The minimum value is obtained, and the Hessian matrix-enhanced image is obtained based on the multi-scale response. ; The Hessian matrix enhancement image obtained based on multi-scale response It includes the following steps: S51: Retrieve principal curvature information The minimum principal curvature is used as a feature at a certain scale, and the response formula for each pixel at this scale is: S52: Repeat step S51 to obtain a set of principal curvature information for each pixel at different scales. Extract the minimum principal curvature values at different scales to obtain the final multi-scale response of each pixel. The final formula for the multi-scale response of each pixel is: S53: Normalize the image using the following formula to obtain the Hessian matrix enhanced image. : ; in, It represents the minimum value of the multi-scale response of all pixels in the entire image; This represents the maximum value of the multi-scale response values of all pixels in the entire image; S6: Image enhancement using the Hessian matrix Local histogram equalization is performed to further enhance vein texture features, resulting in a locally histogram equalized enhanced image. ; S7: Select the average grayscale value as the global threshold for binarization to enhance the image through local histogram equalization. Binarization and morphological processing are performed to obtain vein images with enhanced texture features.
2. The method as described in claim 1, characterized in that... In step S4, Gaussian smoothing is used to reduce high-frequency noise interference and stabilize the calculation of principal curvature.
3. The method as described in claim 2, characterized in that... By adjusting the standard deviation of the Gaussian kernel, the smoothing scale is controlled to accommodate blood vessels of different widths.
4. The method as described in claim 3, characterized in that... Extracting the principal curvature information of the gamma-enhanced image includes the following steps: S41: Calculate the Hessian matrix for each pixel using the following formula: Where H is the Hessian matrix; The horizontal coordinates of the image; The vertical coordinates of the image; Enhance the image with gamma; Gamma-enhanced images in Second-order partial derivatives in the direction; Gamma-enhanced images in Second-order partial derivatives in the direction; Gamma-enhanced images in direction and Mixed partial derivatives in direction; S42: The minimum and maximum principal curvatures are calculated using the following formula: in, The minimum principal curvature; This represents the maximum principal curvature.
5. The method as described in claim 4, characterized in that... The process further includes the following after step S42: S43: The principal curvature is smoothed using a Gaussian function. The formula for the second-order partial derivative of Gaussian is: in, Scale factor; The horizontal coordinates of the image; The vertical coordinates of the image; Gaussian function pairs The second-order partial derivative; Gaussian function pairs The second-order partial derivative; Gaussian function pairs and The second-order mixed partial derivative; It is the base of the natural logarithm.
6. The method as described in claim 1, characterized in that... In step S5, multi-scale Hessian calculations are used to detect veins at different scales, thereby enhancing the complete venous network structure.
7. The method as described in claim 6, characterized in that... The minimum principal curvature of the principal curvature information is used to highlight the vein features at the current smooth scale, thus highlighting the vascular structure.
8. The method as described in claim 1, characterized in that... The Hessian matrix enhancement image in step S6 Perform local histogram equalization to obtain a locally histogram equalized enhanced image. It includes the following steps: S61: The adaptively changing equalization window is obtained through the following formula. : in, The horizontal coordinates of the image; The vertical coordinates of the image; Minimum window; Maximum window; The parameters for adjusting the degree of nonlinearity, and It will enhance the distinguishability of high grayscale areas. It will enhance the distinguishability of low grayscale areas; S62: Based on the grayscale histogram, the probability density function for each region is defined by the following formula: Where k is the gray level; This represents the number of pixels at that grayscale level. S63: The cumulative distribution function is obtained through the following formula. : in, The current grayscale level; To iterate through the gray levels, from the minimum gray level 0 to the current gray level. ; grayscale The probability of occurrence; S64: Histogram equalization mapping is performed using the following formula to obtain a locally histogram equalized enhanced image. : Where, round means rounding down.
9. A system for extracting vein features, characterized in that... It includes a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program that, when executed by the processor, causes the processor to implement the method described in any one of claims 1 to 8.