Palm print main line extraction method based on multidirectional filtering and Hough transform
Through multi-directional filtering and Hough transformation technology, the main line of palm lines is extracted and analyzed, and the problems of strong subjectivity and low accuracy in traditional methods are solved, and a higher recognition accuracy is achieved, providing a reliable basis for traditional Chinese medicine diagnosis.
Patent Information
- Application Number
- CN202411558408.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-25
AI Technical Summary
The traditional palm print recognition method has the problems of strong subjectivity and low accuracy, and it is difficult to effectively extract and judge the continuity and fracture of the main line of palm print.
Multi-directional filtering technology and Hough transformation are used, combining ROI cutting, bilateral filtering, LBP filtering, domain denoising, Canny detection and Hough transformation to extract and analyze the main line of the palm print and determine whether the main line is broken.
It improves the accuracy of the main line extraction of palm lines, enhances the accuracy of identification, and provides a more reliable basis for traditional Chinese medicine diagnosis.
Smart Images

Figure CN119516581A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of biometric identification technology, in particular to the field of palmprint identification technology. More specifically, the present invention relates to a palmprint identification method based on texture features, which combines multi-directional filtering technology and Hough transform to extract the main line in the palmprint and determine whether the main line is broken. Background Art
[0002] Palmprint recognition, as an important biometric recognition technology, has attracted widespread attention in recent years. Palmprints not only contain rich individual information, but are also closely related to human health. In traditional Chinese medicine theory, changes in palmprints can reflect the health status of internal organs, so palmprint analysis is of great significance in traditional Chinese medicine diagnosis. Traditional palmprint recognition methods mainly rely on manual observation and empirical judgment. This method has the problems of strong subjectivity and low accuracy, and is easily affected by the individual differences and experience limitations of observers. However, with the rapid development of computer vision and image processing technology, palmprint recognition methods based on image processing have gradually become a research hotspot. These new technologies can automatically extract and analyze palmprint features, significantly improving the accuracy and efficiency of recognition.
[0003] Modern palmprint recognition technology can effectively identify individual palmprint features by preprocessing, feature extraction and pattern classification of palmprint images. This not only improves recognition accuracy, but also demonstrates greater flexibility and adaptability in practical applications. In addition, the advancement of palmprint recognition technology also provides new tools for TCM diagnosis, which can not only help doctors analyze and judge patients' health conditions more scientifically, but also provide strong support for other medical fields. By combining advanced computer vision technology and TCM theory, palmprint recognition technology is expected to become an efficient and reliable diagnostic tool in the future, promoting the modernization of TCM. Summary of the invention
[0004] In view of this, the present invention aims to provide a palmprint main line extraction method based on multi-directional filtering and Hough transform, which is used for extracting and judging the palmprint main line, so as to be applied to TCM diagnosis. On the one hand, it improves the accuracy of palmprint main line extraction, and on the other hand, it provides a more reliable basis for TCM diagnosis.
[0005] Specifically, the present invention provides the following technical solutions:
[0006] S1, performing ROI cropping and bilateral filtering on the existing palmprint dataset image to obtain a preprocessed image;
[0007] S2, performing multi-directional LBP filtering on the pre-processed image, and then extracting the main line features to obtain a merged image;
[0008] S3, performing domain denoising on the merged image to eliminate redundant noise points and obtain a denoised image;
[0009] S4. Apply Canny detection and Hough transform to the denoised image. We identify the detected texture lines by setting the distance threshold to determine whether the texture lines are broken;
[0010] S5. According to the broken conditions of each main line in the image generated by Hough detection, the broken lines are compared in the disease classification catalog, and the corresponding lesions are determined to complete the palm print recognition.
[0011] Preferably, in step S1, a bilateral filter is used to process some noise points in the palmprint image, and the process is performed according to the following expression:
[0012]
[0013] Among them I (p) is the pixel value of the input image at position p, I (q) is the pixel value of the input image at position q, q is a neighbor of p; N (p) is a local neighborhood centered on p; f r is a Gaussian function based on the difference in pixel intensity, g s is a Gaussian function based on spatial distance, W p is a normalization factor that ensures that the sum of all weights is 1.
[0014] Preferably, the multi-directional LBP filter in step S2 applies LBP filtering to four directions to capture more comprehensive texture information, and fuses the obtained images in each direction. The direction matrix and LBP filtering are described as follows:
[0015]
[0016] Among them, a represents from top to bottom, b represents from left to right, c represents from upper left to lower right, d represents from upper right to bottom, and the number 2 represents repeating twice to be sensitive to this direction, the number 1 represents sensitive to this direction, and 0 represents insensitive to this direction;
[0017]
[0018] where g c is the gray value of the center pixel, g p The grayscale value of the pth neighbor pixel, where p ranges from 0 to P-1; the number of neighbor pixels, that is, the number of sampling points is 16, the distance from the center pixel of R to the neighbor pixel is 2, s(x) is a sign function used to compare the grayscale values of the center pixel and the neighbor pixel.
[0019] Preferably, in step S3, multi-domain denoising is used to denoise the noise points existing in the merged image, and the image is scanned from top to bottom and from left to right. If the sum of the pixel values of the point is greater than 8, the pixel value of the point becomes 1, and if the sum of the pixel values of the point is less than 8, the pixel value of the point becomes 0, and this process is repeated until the noise point does not affect the main line.
[0020] Preferably, step S4 performs Canny edge detection and Hough transform on the denoised image to determine whether the main line is broken. The Canny detection and Hough transform are described as follows:
[0021]
[0022] Among them, edge detection requires Gaussian filtering first, σ is the standard deviation, which determines the size and smoothness of the filter;
[0023]
[0024] Where G is the gradient amplitude, indicating the edge strength, and θ is the edge direction. By performing non-maximum suppression on the gradient amplitude and retaining the local maximum value, a refined edge is formed;
[0025] ρ=xcosθ+ysinθ
[0026] Where ρ is the distance from the line to the origin, θ is the angle between the line and the positive x-axis, and (x, y) are the coordinates of the point in image space;
[0027] Based on the above results, the voting process is carried out again, in which for each edge point (x, y) in the image, for each possible angle θ, the corresponding ρ value is calculated, and the count is increased at the corresponding position in the accumulator array A(ρ,θ); according to finding the local maximum values in the accumulator array A(ρ,θ), the (ρ,θ) corresponding to these maximum values represent the straight lines in the image, and then the found (ρ,θ) parameters are used to draw the detected straight lines on the original image; then a distance threshold is applied to the detected texture lines, and a distance threshold is set. If the gap between two texture lines is less than this threshold, then the two texture lines are considered to belong to the same texture line, otherwise they are not the same texture line.
[0028] Compared with the prior art, the present invention extracts and analyzes the main line of the palmprint through multi-directional LBP filtering, Canny edge detection and Hough transform, and determines whether the main line is broken. This solution can not only retain the original features of the palmprint to a large extent, but also improve the accuracy of palmprint recognition. The method in the present invention can more accurately extract the main line of the palmprint and effectively determine the continuity and breakage of the main line. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A flow chart of a palmprint main line extraction method based on multi-directional filtering and Hough transform provided in an embodiment of the present invention.
[0031] Figure 2 This is an example of palmprint comparison during the palmprint main line extraction method processing provided by an embodiment of the present invention.
[0032] Figure 3 It is a schematic diagram of the present invention after LBP filtering feature extraction in four directions.
[0033] Figure 4 This is a schematic diagram of applying Canny detection and Hough transform in the present invention, wherein the left side is the Canny detection result and the right side is the Hough transform result. DETAILED DESCRIPTION
[0034] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be clear that the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Those skilled in the art should know that the following specific embodiments or specific implementations are a series of optimized settings listed by the present invention to further explain the specific content of the invention, and these settings can be combined or used in association with each other, unless the present invention clearly states that some or a specific embodiment or implementation cannot be associated or used together with other embodiments or implementations. At the same time, the following specific embodiments or implementations are only used as the most optimized settings, and are not to be understood as limiting the scope of protection of the present invention.
[0036] In order to further improve the detection accuracy of the main lines of palmprints, the present invention combines the Hough transform, and effectively finds the straight lines in the image by mapping the points in the image space to the lines in the parameter space. In palmprint recognition, the Hough transform is used to detect the main lines in the palmprints and determine whether these main lines are broken. The texture features extracted by the LBP filter enhance the clarity of the main lines, so that the Hough transform can more accurately detect the continuity and breakage of the main lines. Through the combined application of the LBP filter and the Hough transform, the present invention can effectively extract the main lines of the palmprints, and determine whether the main lines are broken according to the set distance threshold, thereby providing a more reliable basis for traditional Chinese medicine diagnosis.
[0037] The present invention pre-processes the obtained palm print image, and the pre-processing mainly includes cutting ROI and bilateral filtering to process noise, and then multi-directional LBP filtering is performed on the pre-processed image, and then the images in four directions are merged, and 16 neighborhood denoising is performed on the filtered image to reduce the influence of small noise on the main line, and finally the image is subjected to Canny edge detection to obtain the outline of the main line, and Hough transformation is performed on this basis, and then the detected straight line segments are analyzed by a set distance threshold, and it is judged whether the shortest distance between adjacent line segments is less than or equal to the threshold, so as to determine whether they belong to the same texture line. Finally, based on these judgment results, it is further analyzed whether there is a break in the entire main line. The results are saved in a JSON document, and the results of each palm print in the obtained JSON document are analyzed for lesions according to the disease classification catalog. On the one hand, the present invention improves the accurate recognition of the palm print main line, and on the other hand, the extraction results of the palm print main line are applied to Chinese medicine auxiliary diagnosis to promote the development of Chinese medicine modernization.
[0038] Figure 1 A flow chart of a palmprint main line extraction method based on multi-directional filtering and Hough transform provided in an embodiment of the present invention, Figure 2 , from left to right, shows an example of palm prints after each processing stage of this embodiment. The method specifically includes the following steps:
[0039] S1. First, use the ROI interception method to obtain the center of the palm, so that the image covers the three main lines and reduces the interference of other noise points. And considering that the intercepted image may be affected by lighting and other fine texture lines, use the bilateral filter to filter the image using the following formula to filter out the noise points near the main line in the image, so that the main line is clearly visible, while retaining the edge information. At the same time, the variance parameters of the spatial domain and intensity domain can also be adjusted to control the degree of smoothing and the effect of edge protection:
[0040]
[0041] In order to achieve better filtering effect and retain edge information, the neighborhood diameter d of the bilateral filter is set to 7 to capture more local information. The color space standard deviation is set to 70 to facilitate the removal of fine textures, and the coordinate space standard deviation is set to 40 to avoid over-smoothing.
[0042] S2. First, consider that in order to capture more information, we start from four directions, namely horizontal direction, vertical direction, upper left to lower right direction, and upper right to lower left direction. Repeat the setting of the part of interest to 2, the part of interest to 1, and the part of no interest to 0, and generate four 5*5 matrices. The description of the matrix is as follows:
[0043]
[0044] LBP filtering is applied to the above directions for feature extraction, according to the number of neighbor pixels P of the LBP filter and the distance R from the center pixel to the neighbor pixel. The number of neighbors P is set to 16 mainly to include more neighbor pixels, so that the extracted information is richer and more accurate. R is set to 2 in order to include more distant neighbor pixels, thereby covering a larger neighborhood range, not limited to the 4 directly adjacent pixels. Thus, four images in different directions are obtained, and then an array with a shape of (208,196,4) is set to store the four LBP images in different directions, and different channels are assigned to them, and then the average value of each pixel in the four channels is calculated along the channel axis to generate a single-channel grayscale image.
[0045]
[0046] where g c is the gray value of the center pixel, g p The grayscale value of the pth neighbor pixel, where p ranges from 0 to P-1; the number of neighbor pixels, that is, the number of sampling points is 16, the distance from the R center pixel to the neighbor pixel is 2, s() This is a sign function used to compare the grayscale values of the center pixel and the neighbor pixel. Figure 3 Examples of the effects of LBP filtering feature extraction in four directions are given.
[0047] S3. Since there is still small noise in the image after feature extraction, the denoising formula of 16 neighborhoods is used as follows to remove the small noise from the image after feature extraction to make the main line clearer.
[0048] g′(i,j)=median[g(i-2,j-2),g(i-2,j-1),g(i-2,j),g(i-2,j+1),g(i-2,j+2) ,g(i-1,j-2),g(i-1,j-1),g(i-1,j),g(i-1,j+1),g(i-1,j+2),g(i,j-2),g(i,j -1),g(i,j),g(i,j+1),g(i,j+2),g(i+1,j-2),g(i+1,j-1),g(i+1,j),g(i+1,j +1), g(i+1,j+2),g(i+2,j-2),g(i+2,j-1),g(i+2,j),g(i+2,j+1),g(i+2,j+2)]
[0049] The median filter is used for 16-neighborhood denoising, mainly because the median filter is very effective in removing salt and pepper noise. If the sum of the pixel values of the point is greater than 8, the pixel value of the point becomes 1, and if the sum of the pixel values of the point is less than 8, the pixel value of the point becomes 0. In the above formula, g represents the value of the pixel before filtering, and g' represents the value of the pixel after filtering.
[0050] S4. In order to obtain the texture line of the image, edge detection is used to obtain the entire contour line, which provides an image for the next step of Hough transform. The specific formula for edge detection is as follows:
[0051]
[0052]
[0053] In the above formula, x and y represent the pixel coordinate position, I represents the gradient component, σ represents the standard deviation of the Gaussian distribution, which determines the size of the filter and the degree of blur, and is set to 5 in this embodiment, G represents the gradient amplitude, and θ represents the gradient direction.
[0054] Then, the Hough transform is applied to the obtained contour line. The formula is as follows, and the distance threshold is used to determine which texture lines are broken, and the result is output.
[0055] ρ=xcosθ+ysinθ
[0056] According to the above calculation, the voting process is performed again, where for each edge point (x, y) in the image, for each possible angle θ, the corresponding ρ value is calculated, and the count is increased at the corresponding position in the accumulator array A(ρ, θ). By setting a 5*5 neighborhood, and choosing a 5*5 neighborhood is mainly to reduce the impact of noise, then traverse the entire accumulator array A(ρ, θ), for each element A(ρ, θ), check whether it is greater than all elements in its neighborhood. If the current element A(ρ, θ) is greater than all elements in its neighborhood, it is marked as a local maximum, and all parameters marked as local maximums (ρ, θ) and their corresponding votes are recorded. The (ρ, θ) corresponding to these maximums represent the straight lines in the image, and then use the found (ρ, θ) parameters to draw the detected texture lines on the original image, and then judge two texture lines in the same direction according to the set distance threshold. If it is less than the set distance threshold, then the two texture lines belong to the same texture line, otherwise they do not belong. Figure 4 An example of comparing the effects of Canny detection and Hough detection transformation is given in.
[0057] S5. Record the results obtained by Hough transform and distance threshold into a JSON document containing the image file name, the unique identifier of the line, the endpoint coordinates of the line segment, the length of the line segment, the total number of lines detected, and the line group ID of the same texture line. Then, classify and count the obtained data according to the disease classification catalog.
[0058] The present invention is described above by way of example in conjunction with the accompanying drawings. It is obvious that the specific implementation of the present invention is not limited to the above-mentioned method. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.
[0059] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0060] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A palmprint main line extraction method based on multi-directional filtering and Hough transform, characterized in that: The method comprises: S1, performing ROI cropping and bilateral filtering on the existing palmprint dataset image to obtain a preprocessed image; S2, performing multi-directional LBP filtering on the pre-processed image, and then extracting the main line features to obtain a merged image; S3, performing domain denoising on the merged image to eliminate redundant noise points and obtain a denoised image; S4, applying Canny detection and Hough transform to the denoised image, identifying the detected texture line through the set distance threshold, so as to determine whether the texture line is broken; S5. Compare the broken conditions of each main line in the image generated by Hough detection in the disease classification catalog to determine the corresponding lesion and complete the palm print recognition.
2. According to claim 1, the palmprint main line extraction method based on multi-directional filtering and Hough transform is characterized in that: In step S1, a bilateral filter is used to process the noise points of the palmprint image, which is performed according to the following expression: Among them I (p) is the pixel value of the input image at position p, I (q) is the pixel value of the input image at position q, q is a neighbor of p; N (p) is a local neighborhood centered on p; f r is a Gaussian function based on the difference in pixel intensity, g s is a Gaussian function based on spatial distance, W p is the normalization factor.
3. The palmprint main line extraction method based on multi-directional filtering and Hough transform according to claim 1 is characterized in that: The multi-directional LBP filter in step S2 applies LBP filtering to four directions to capture more comprehensive texture information and fuses the obtained images in each direction. The direction matrix and LBP filtering are described as follows: Among them, a represents from top to bottom, b represents from left to right, c represents from upper left to lower right, d represents from upper right to bottom, and the number 2 represents repeating twice to be sensitive to this direction, the number 1 represents sensitive to this direction, and 0 represents insensitive to this direction; Where gc is the gray value of the central pixel, gp is the gray value of the pth neighbor pixel, where p represents the number of neighbor pixels, that is, the number of sampling points, and its value range is from 0 to P-1; R is the distance from the central pixel to the neighbor pixel, and the s() function is used to compare the gray values of the central pixel and the neighbor pixel.
4. The palmprint main line extraction method based on multi-directional filtering and Hough transform according to claim 1 is characterized in that: In step S3, multi-domain denoising is used to denoise the noise points in the merged image. The image is scanned from top to bottom and from left to right. If the sum of the pixel values of the point is greater than 8, the pixel value of the point becomes 1. If the sum of the pixel values of the point is less than 8, the pixel value of the point becomes 0. This process is repeated until the noise point does not affect the main line.
5. The palmprint main line extraction method based on multi-directional filtering and Hough transform according to claim 1 is characterized in that: Step S4 performs Canny edge detection and Hough transform on the denoised image to determine whether the main line is broken. The Canny detection and Hough transform are described as follows: Among them, edge detection requires Gaussian filtering first, σ is the standard deviation, which determines the size and smoothness of the filter; Where G is the gradient amplitude, indicating the edge strength, and θ is the edge direction. By performing non-maximum suppression on the gradient amplitude and retaining the local maximum value, a refined edge is formed; ρ=x cosθ+y sinθ Where ρ is the distance from the line to the origin, θ is the angle between the line and the positive x-axis, and (x, y) are the coordinates of the point in image space; Based on the above results, a voting process is performed again, in which for each edge point (x, y) in the image, for each possible angle θ, the corresponding ρ value is calculated, and the count is increased at the corresponding position in the accumulator array A(ρ,θ); by finding local maxima in the accumulator array A(ρ,θ), the (ρ,θ) corresponding to these maxima represent the straight lines in the image, and then the found (ρ,θ) parameters are used to draw the detected straight lines on the original image; then a distance threshold is applied to the detected texture lines, and a distance threshold is set. If the gap between two texture lines is less than this threshold, then the two texture lines are considered to belong to the same texture line, otherwise they are not the same texture line.
6. The palmprint main line extraction method based on multi-directional filtering and Hough transform according to claim 1 is characterized in that: The results obtained through Hough transform are recorded in a JSON document, and then the obtained data is classified and counted according to the disease classification catalog.