A method, system and storage medium for measuring the horizontal length of a human body
Through computer vision and image processing technology, accurately measuring the horizontal fingers of the human body is solved, and the inaccuracy and differences of existing acupoint positioning methods are achieved, and the personalization, precision and automation and intelligence of acupoint treatment are achieved.
Patent Information
- Application Number
- CN202310779968.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2043-06-28
AI Technical Summary
There are inaccuracies and differences in the existing traditional Chinese medicine acupoint positioning methods, especially the lack of accurate measurement tools for finger homogeneous inch method, resulting in large positioning errors.
Computer vision and image processing technology are used to obtain hand images, detect key points of knuckles, extract pixel information on the edge of the hand, traverse along the horizontal direction to find the coordinates of pixel points outside the middle finger, calculate the distance of the finger, and determine the size of the horizontal finger of the human body.
It has achieved personalized and precise acupoint positioning, improved the standardization and efficacy of acupoint treatment, and laid the foundation for the automation and intelligence of traditional Chinese medicine acupoint therapy.
Smart Images

Figure CN116864079B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of measuring the horizontal finger length of a human body, and in particular to a method, a system and a storage medium for measuring the horizontal finger length of a human body. Background Art
[0002] Acupoints are the key points in traditional Chinese medicine where the qi of the internal organs and meridians of the human body is infused into the body surface. They are also one of the important parts of TCM treatment. Through acupoint therapy such as acupuncture or moxibustion, the meridian qi can be stimulated, the internal organs can be harmonized, and the effect of preventing and treating certain diseases can be achieved. The accuracy of acupoint positioning is directly related to the efficacy of acupoint therapy.
[0003] Finger-body measurement is one of the commonly used methods for acupoint location in traditional Chinese medicine. When using the finger-body measurement method for location in clinical practice, due to the lack of measurement tools, doctors usually use their own finger size to slightly expand and contract based on subjective experience for comparison and location. Therefore, the location error is large for patients with different body shapes, and there are also differences in the treatment of the same patient by different doctors.
[0004] In order to solve the inaccuracy and variability problems in acupoint positioning, some researchers have proposed using elastic tape rulers to achieve personalized measurement of different body shapes and sizes. However, this method has measurement errors caused by differences in the elastic coefficients of different elastic tapes, and the same elastic tape may have measurement errors due to changes in the elastic coefficient due to wear and tear. Summary of the invention
[0005] The present invention provides a method, system and storage medium for measuring the horizontal length of human fingers. The method measures the horizontal length of human fingers through computer vision and image processing technology, thereby achieving personalized and precise positioning of acupoints for different human bodies, laying a foundation for realizing automation and intelligence of traditional Chinese medicine acupoint therapy.
[0006] Purpose of the invention: To make up for the current lack of same-body-width measurement tools in clinical TCM acupoint treatment, to provide a standardized and reliable same-body-width measurement technology for acupoint positioning, to make TCM acupoint treatment more standardized, to ensure the efficacy of TCM acupoint treatment, and at the same time to digitize the same-body-width measurement of the human body, which can lay the foundation for the research and development of medical robots for acupoint treatment.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] A first aspect of the embodiments of this specification discloses a method for measuring the horizontal length of a human body, comprising the following steps:
[0009] S1. Obtain a hand image;
[0010] S2. Based on the hand image, use the hand knuckle key point detection algorithm to determine the pixel coordinate information of the knuckle key points;
[0011] S3. Based on the pixel coordinate information of the knuckle key points, the knuckle key points are drawn on the hand image to visualize the knuckle key points;
[0012] S4. Based on the hand image, using a differential edge detection algorithm, extracting hand edge pixel information;
[0013] S5. Based on the pixel coordinate information of the key points of the knuckles and the pixel information of the hand edge, the coordinates of the pixel points on the outer side of the middle segment of the finger are found by traversing in the horizontal direction to determine the coordinates of the pixel points on the outer side of the middle segment of the finger;
[0014] S6. Based on the coordinates of the pixel points on the outer side of the middle segment of the finger, the finger-width distance is calculated to determine the horizontal finger-width size of the human body.
[0015] In some embodiments, in S1, a hand image tilt detection and determination algorithm is used to determine whether the hand image is tilted, and if a tilt is detected, the hand image is corrected.
[0016] In some embodiments, based on the pixel coordinate information of the finger joint key points, the horizontal coordinate values of the leftmost and rightmost points are compared. If the horizontal coordinate value of the leftmost point is greater than the horizontal coordinate value of the rightmost point, the hand image is a back of the hand image; if the horizontal coordinate value of the leftmost point is less than the horizontal coordinate value of the rightmost point, the hand image is a palm image; during the traversal, the key points with smaller horizontal coordinate values are traversed along the horizontal negative direction, and the key points with larger horizontal coordinate values are traversed along the horizontal positive direction.
[0017] In some embodiments, the hand edge pixels are traversed to determine whether the traversal is successful. If so, the coordinates of the pixel points on the outer side of the middle segment of the finger are determined. If not, it is determined whether the traversal on one side of the hand is unsuccessful or both sides of the hand are unsuccessful. If both sides of the hand are unsuccessful, the hand image is reacquired. If the traversal on one side of the hand is unsuccessful, the traversal width of the unsuccessful side is expanded to the traversal width of the successful side.
[0018] A second aspect of the embodiments of this specification discloses a human body transverse finger length measurement system, comprising:
[0019] A hand image acquisition module, used for acquiring a hand image;
[0020] A module for determining pixel coordinate information of key points of knuckles, used to determine pixel coordinate information of key points of knuckles based on the hand image and using a hand knuckle key point detection algorithm;
[0021] A knuckle key point visualization module, used for drawing the knuckle key points on the hand image based on the pixel coordinate information of the knuckle key points, so as to visualize the knuckle key points;
[0022] A hand edge pixel information extraction module, used to extract hand edge pixel information based on the hand image using a differential edge detection algorithm;
[0023] A module for determining the coordinates of the pixel points on the outer side of the middle joint of the finger, which is used to find the coordinates of the pixel points on the outer side of the middle joint of the finger by traversing horizontally based on the pixel coordinate information of the key points of the finger joint and the pixel information of the hand edge, and determine the coordinates of the pixel points on the outer side of the middle joint of the finger;
[0024] The human body horizontal finger and body size determination module is used to calculate the finger distance based on the coordinates of the pixel points on the outer side of the middle segment of the finger, and determine the human body horizontal finger and body size.
[0025] In some embodiments, the human body transverse finger length measurement system further includes:
[0026] The processor is respectively connected with the hand image acquisition module, the finger joint key point pixel coordinate information determination module, the finger joint key point visualization module, the hand edge pixel information extraction module, the middle joint outer pixel point coordinate determination module and the human body horizontal finger size determination module;
[0027] a memory connected to the processor and storing a computer program executable on the processor;
[0028] Among them, when the processor executes the computer program, the processor controls the hand image acquisition module, the finger joint key point pixel coordinate information determination module, the finger joint key point visualization module, the hand edge pixel information extraction module, the middle joint outer pixel point coordinate determination module and the human body transverse finger size determination module to work, so as to realize the human body transverse finger size measurement method as described above.
[0029] A third aspect of the embodiments of this specification discloses a computer-readable storage medium, wherein the storage medium stores computer instructions. When a computer reads the computer instructions, the computer executes the human body transverse finger length measurement method as described above.
[0030] In summary, the present invention has at least the following beneficial effects:
[0031] The present invention can make favorable improvements to the current situation of lack of same-body measurement tools and methods in clinical Chinese medicine acupoint treatment. Secondly, the same-body measurement of human transverse fingers is standardized and intelligent, which can improve the standardization and precision of acupoint positioning, ensure the effect of acupoint treatment, and further lay a feasible technical foundation for the research and development of acupoint treatment robots. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the description of the embodiments 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.
[0033] Figure 1 The figure is a schematic diagram of the steps of the method for measuring the horizontal length of a human body involved in the present invention.
[0034] Figure 2 The figure is a schematic diagram of a module of a human body transverse finger length measurement system involved in the present invention.
[0035] Figure 3 It is a schematic diagram of the horizontal and horizontal dimensions of the body involved in the present invention.
[0036] Figure 4 The figure is a schematic diagram of an example of returning key point pixel coordinate information involved in the present invention.
[0037] Figure 5 A schematic diagram for visualizing the key point detection of the hand involved in the present invention.
[0038] Figure 6 It is a schematic diagram of an edge detection image involved in the present invention.
[0039] Figure 7 A schematic diagram of an example of tilted hand image recognition involved in the present invention.
[0040] Figure 8 Schematic diagram of an example of palm detection error involved in the present invention.
[0041] Fig. 9 It is a schematic diagram of the flow chart for detecting both sides of the edge of the middle segment of the palm involved in the present invention.
[0042] Fig.10 It is a schematic diagram of the rotation around different rotation centers involved in the present invention.
[0043] Fig.11 It is a schematic diagram of the minimum circumscribed moment of rotation involved in the present invention.
[0044] Fig.12 It is a schematic diagram of the algorithm flow of traversal detection enhancement robustness involved in the present invention.
[0045] Fig.13 It is a schematic diagram of the overall process of the system involved in the present invention.
[0046] Fig.14 is a schematic diagram of a user interface involved in the present invention. DETAILED DESCRIPTION
[0047] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the embodiments of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0048] The disclosure below provides many different embodiments or examples to implement different structures of the embodiments of the present invention. In order to simplify the disclosure of the embodiments of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the embodiments of the present invention. In addition, the embodiments of the present invention can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed.
[0049] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0050] like Figure 1 As shown, the first aspect of the embodiments of this specification discloses a method for measuring the horizontal and vertical dimensions of a human body, comprising the following steps:
[0051] S1. Obtain a hand image;
[0052] S2. Based on the hand image, use the hand knuckle key point detection algorithm to determine the pixel coordinate information of the knuckle key points;
[0053] S3. Based on the pixel coordinate information of the knuckle key points, the knuckle key points are drawn on the hand image to visualize the knuckle key points;
[0054] S4. Based on the hand image, using a differential edge detection algorithm, extracting hand edge pixel information;
[0055] S5. Based on the pixel coordinate information of the key points of the knuckles and the pixel information of the hand edge, the coordinates of the pixel points on the outer side of the middle segment of the finger are found by traversing in the horizontal direction to determine the coordinates of the pixel points on the outer side of the middle segment of the finger;
[0056] S6. Based on the coordinates of the pixel points on the outer side of the middle segment of the finger, the finger-width distance is calculated to determine the horizontal finger-width size of the human body.
[0057] In some embodiments, in S1, a hand image tilt detection and determination algorithm is used to determine whether the hand image is tilted, and if a tilt is detected, the hand image is corrected.
[0058] In some embodiments, based on the pixel coordinate information of the finger joint key points, the horizontal coordinate values of the leftmost and rightmost points are compared. If the horizontal coordinate value of the leftmost point is greater than the horizontal coordinate value of the rightmost point, the hand image is a back of the hand image; if the horizontal coordinate value of the leftmost point is less than the horizontal coordinate value of the rightmost point, the hand image is a palm image; during the traversal, the key points with smaller horizontal coordinate values are traversed along the horizontal negative direction, and the key points with larger horizontal coordinate values are traversed along the horizontal positive direction.
[0059] In some embodiments, the hand edge pixels are traversed to determine whether the traversal is successful. If so, the coordinates of the pixel points on the outer side of the middle segment of the finger are determined. If not, it is determined whether the traversal on one side of the hand is unsuccessful or both sides of the hand are unsuccessful. If both sides of the hand are unsuccessful, the hand image is reacquired. If the traversal on one side of the hand is unsuccessful, the traversal width of the unsuccessful side is expanded to the traversal width of the successful side.
[0060] like Figure 2 As shown, the second aspect of the embodiment of this specification discloses a human body horizontal finger length measurement system, comprising:
[0061] A hand image acquisition module, used for acquiring a hand image;
[0062] A module for determining pixel coordinate information of key points of knuckles, used to determine pixel coordinate information of key points of knuckles based on the hand image and using a hand knuckle key point detection algorithm;
[0063] A knuckle key point visualization module, used for drawing the knuckle key points on the hand image based on the pixel coordinate information of the knuckle key points, so as to visualize the knuckle key points;
[0064] A hand edge pixel information extraction module, used to extract hand edge pixel information based on the hand image using a differential edge detection algorithm;
[0065] A module for determining the coordinates of the pixel points on the outer side of the middle joint of the finger, which is used to find the coordinates of the pixel points on the outer side of the middle joint of the finger by traversing horizontally based on the pixel coordinate information of the key points of the finger joint and the pixel information of the hand edge, and determine the coordinates of the pixel points on the outer side of the middle joint of the finger;
[0066] The human body horizontal finger and body size determination module is used to calculate the finger distance based on the coordinates of the pixel points on the outer side of the middle segment of the finger, and determine the human body horizontal finger and body size.
[0067] In some embodiments, the human body transverse finger length measurement system further includes:
[0068] The processor is respectively connected with the hand image acquisition module, the finger joint key point pixel coordinate information determination module, the finger joint key point visualization module, the hand edge pixel information extraction module, the middle joint outer pixel point coordinate determination module and the human body horizontal finger size determination module;
[0069] a memory connected to the processor and storing a computer program executable on the processor;
[0070] Among them, when the processor executes the computer program, the processor controls the hand image acquisition module, the finger joint key point pixel coordinate information determination module, the finger joint key point visualization module, the hand edge pixel information extraction module, the middle joint outer pixel point coordinate determination module and the human body transverse finger size determination module to work, so as to realize the human body transverse finger size measurement method as described above.
[0071] A third aspect of the embodiments of this specification discloses a computer-readable storage medium, wherein the storage medium stores computer instructions. When a computer reads the computer instructions, the computer executes the human body transverse finger length measurement method as described above.
[0072] The inventive concept of the present invention is as follows:
[0073] The horizontal finger is the same as the body inch. The patient is asked to put the index finger, middle finger, ring finger and little finger together, with the horizontal line of the middle section of the middle finger as the standard. The horizontal measurement of the four fingers is 3 inches, and the index finger and middle finger together is 1.5 inches, as follows Figure 3 shown.
[0074] like Figure 4 As shown in the figure, the key point pixel coordinate information returned by the hand knuckle key point detection algorithm is used. The algorithm combines the key point pixel coordinate information to draw the key points on the hand image to realize the key point detection visualization and ensure the correct detection, such as Figure 5 As shown. Secondly, the hand image is subjected to a differential edge detection algorithm, as Figure 6 As shown in the figure, the hand edge pixels in the image are extracted. Next, the program combines the key point pixel coordinate information and the hand edge pixel information to find the coordinates of the pixel points on the outside of the middle joint of the finger by traversing horizontally. Finally, the traversed coordinate information is used to calculate the finger distance between the pixel point A (x1, y1) on the outside of the index finger joint and the pixel point B (x2, y2) on the outside of the little finger joint using formula (1), and then the horizontal finger size p of the human body is obtained.
[0075]
[0076] The system can place the hand in any direction when collecting hand images, but when facing an inclined hand image, the coordinate points traversed along the horizontal direction do not refer to the outer coordinates of the mid-section horizontal lines, as shown below Figure 7 Therefore, the system designs a hand image tilt detection and judgment algorithm, which can automatically determine whether the hand image is tilted, and correct the tilted image if tilt is detected.
[0077] First, the position and coordinate information of 21 palm key points are obtained by using the existing palm key point detection algorithm. Figure 5 This is a visualization of the coordinate point information of the palm image output by the algorithm. The numbers in the figure represent the 21 main bone nodes of the hand, including the fingertips and the joints of each phalanx. 6' and 19' are the points detected during the traversal.
[0078] Secondly, the hand image is edge detected. The RGB values of adjacent pixels in the regular area of the image are smooth, but at the edge of the image, the RGB values will show a large mutation. Therefore, the system uses the difference algorithm to detect the edge of the hand image. By traversing each pixel of the image, the difference in the RGB values of the adjacent pixels above, below, left and right is compared. The point with a large difference is the edge pixel, and its RGB value is truncated to (255, 255, 255). The edge detection image is as follows Figure 6 shown.
[0079] After obtaining the pixel coordinate information of the key points of the hand and the edge pixels of the palm based on the above steps, the next step is to traverse each pixel point horizontally outward along the index finger joint point 6 and the little finger joint point 19 to find the edge pixel with an RGB value of (255, 255, 255), and obtain the coordinate information of its pixel point. This method can obtain the coordinate information of the outer side of the middle section of the index finger and little finger, so as to calculate the pixel distance of 3 inches later. The calculation method of 1.5 inches and 1 inch can also be realized in the same way.
[0080] Considering that the palm image has two types: the back image and the palm image, in order to avoid the following Figure 7 and Figure 8 In the case of the wrong traversal direction shown in the figure, the system has designed a traversal retrieval algorithm corresponding to the palm and back of the hand images. The algorithm first compares the X-axis pixel coordinate values X6 and X19 of key points 6 and 19. If X6 is greater than X19, the image can be judged as a back of the hand image. If X6 is less than X19, the image can be judged as a palm image. Before traversal, compare the sizes of the two horizontal coordinate values of X6 and X19. During the traversal, the key points with smaller horizontal coordinate values are traversed along the negative direction of the X-axis, while the key points with larger horizontal coordinate values are traversed along the positive direction of the X-axis. The specific steps of the algorithm are as follows: Fig. 9 As shown, the algorithm can achieve correct detection of hand images in both palm and back of hand situations.
[0081] Subsequently, in order to avoid detection errors in edge detection, the pixel points traversed when traversing to find the coordinates of the palm edge points are not the palm edge pixels, but the image edge pixels. Therefore, the algorithm's design for traversal along the horizontal direction is not to traverse the entire image area, but only to traverse the hand area, which may result in the situation where no edge points are detected in the hand area. Therefore, the system has designed an algorithm to determine whether the detection is successful, which is divided into three situations: successful detection on both sides, successful detection on one side, and unsuccessful detection on both sides. If both sides are detected successfully, it is determined that the detection is successfully completed; if one side is detected successfully, the algorithm sets the expansion width of the side that has not been traversed and detected to the value of the other side detected plus or minus 30 pixels offset. For example, the undetected expansion width of the little finger is the index finger expansion width minus 30 pixels, and the undetected expansion width of the index finger is the little finger expansion width plus 30 pixels. If both sides are undetected, the detection fails, and the user is prompted to re-import a new hand image. The specific algorithm flow is as follows Fig.12 shown.
[0082] At the same time, the system also takes into account the situation where the captured image is a tilted palm. To avoid detection errors caused by this situation, the system designs a tilt detection correction algorithm. The algorithm substitutes the coordinate point information (X12, Y12) and (X0, Y0) of key point 12 and key point 0 into formula (2) to calculate the slope K between the two points. The slope K can be further used according to formula (3) to obtain the angle θ of the hand image tilt. The next step is to determine the rotation center point of the image rotation by testing the rotation around key point 0, key point 12 and the midpoint between the two points, such as Fig.10 As shown in the figure, it can be concluded that the hand area of the image is largely cropped when rotating around key point 0 and key point 12. In contrast, the image rotated around the midpoint of the two key points has less impact on the hand area, but it is still cropped. To solve this problem, the system designs an algorithm to automatically update the image screen. According to the coordinates of the four vertices A, B, C, and D of the image, the coordinates of the points A′, B′, C′, and D′ after rotation are calculated using formula (4), so that the minimum circumscribed moment of the rotated image can be obtained as follows: Fig.11 As shown, when the image screen is rotated, the image can be set to the minimum circumscribed moment to avoid the image being cropped after rotation.
[0083]
[0084] θ=arctanK(3)
[0085]
[0086] Finally, after obtaining the coordinate information of the pixel point on the outer side of the middle segment of the finger based on the above process operation, the algorithm uses formula (1) to calculate the Euclidean distance between the two points, thereby calculating the size of the human finger.
[0087] In summary, Fig.13 The overall algorithm flow chart of the system is shown in Figure 2. Fig.14 This is the system user interface diagram. Users only need to import the hand image and then click the finger size detection button. The program can automatically detect and calculate the finger size, output the calculated value, and display the visual detection image on the interface to let users know the detection effect. Figure 5-Figure 8 , Fig.10 , Fig.11 , Fig.14 All of them are screenshots of the system user interface and are for illustration only, only to facilitate understanding of the technical solution of the present invention.
[0088] The above-described embodiments are used to illustrate the present invention, not to limit the present invention, so changes in the exemplified values or replacement of equivalent elements should still fall within the scope of the present invention.
[0089] From the above detailed description, it can be understood by those skilled in the art that the present invention can indeed achieve the aforementioned objectives and is in compliance with the provisions of the Patent Law.
[0090] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0091] It should be noted that the above description of the relevant process is only for example and explanation, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to the process under the guidance of this specification. However, these modifications and changes are still within the scope of this specification.
[0092] The basic concepts have been described above. Obviously, for those of ordinary skill in the art who have read this application, the above invention disclosure is only for example and does not constitute a limitation of this application. Although not explicitly stated here, those of ordinary skill in the art may make various modifications, improvements and amendments to this application. Such modifications, improvements and amendments are suggested in this application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of this application.
[0093] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.
[0094] In addition, it will be appreciated by those skilled in the art that various aspects of the present application may be illustrated and described by a number of patentable categories or situations, including any new and useful combination of processes, machines, products or substances, or any new and useful improvements thereto. Therefore, various aspects of the present application may be implemented entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may all be referred to as "units", "modules" or "systems". In addition, various aspects of the present application may take the form of a computer program product embodied in one or more computer-readable media, wherein computer-readable program code is contained therein.
[0095] The computer program code required for the operation of each part of the application can be written in any one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc., such as C programming language, VisualBasic, Fortran2103, Perl, COBOL2102, PHP, ABAP, such as Python, Ruby and Groovy dynamic programming language or other programming languages. The program code can be run completely on the user's computer, or run on the user's computer as an independent software package, or run partly on the user's computer and partly on the remote computer, or run completely on the remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as software as a service (SaaS).
[0096] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this application, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this application. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this application. For example, although the implementation of the various components described above can be embodied in a hardware device, it can also be implemented as a pure software solution, for example, installation on an existing server or mobile device.
[0097] Similarly, it should be noted that in order to simplify the description disclosed in this application and thus help understand one or more embodiments of the invention, in the above description of the embodiments of the application, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this method of the application should not be interpreted as reflecting the intention that the claimed object requires more features than those explicitly stated in each claim. On the contrary, the subject of the invention should have fewer features than the above single embodiment.
Claims
1. A method for measuring the horizontal dimensions of a human body, characterized in that: The steps include: S1. Obtain a hand image; S2. Based on the hand image, use the hand knuckle key point detection algorithm to determine the pixel coordinate information of the knuckle key points; S3. Based on the pixel coordinate information of the knuckle key points, the knuckle key points are drawn on the hand image to visualize the knuckle key points; S4. Based on the hand image, using a differential edge detection algorithm, extracting hand edge pixel information; S5. Based on the pixel coordinate information of the key points of the knuckles and the pixel information of the hand edge, the coordinates of the pixel points on the outer side of the middle segment of the finger are found by traversing in the horizontal direction to determine the coordinates of the pixel points on the outer side of the middle segment of the finger; S6. Based on the coordinates of the pixel points on the outer side of the middle segment of the finger, calculate the finger-inch distance and determine the horizontal finger-inch size of the human body; In S1, a hand image tilt detection and determination algorithm is used to determine whether the hand image is tilted, and if tilt is detected, the hand image is corrected; Based on the pixel coordinate information of the knuckle key points, the horizontal coordinate values of the leftmost and rightmost points are compared. If the horizontal coordinate value of the leftmost point is greater than the horizontal coordinate value of the rightmost point, the hand image is a back of hand image; if the horizontal coordinate value of the leftmost point is less than the horizontal coordinate value of the rightmost point, the hand image is a palm image; during the traversal, the key points with smaller horizontal coordinate values are traversed in the horizontal negative direction, and the key points with larger horizontal coordinate values are traversed in the horizontal positive direction; Traverse the hand edge pixels to determine whether the traversal is successful. If so, determine the coordinates of the pixel points on the outer side of the middle segment of the finger; if not, determine whether the traversal on one side of the hand is unsuccessful or both sides of the hand are unsuccessful. If the traversal on both sides of the hand is unsuccessful, reacquire the hand image. If the traversal on one side of the hand is unsuccessful, expand the traversal width of the unsuccessful side to the traversal width of the successful side. The coordinate information traversed is used to calculate the finger distance between the pixel point A (x1, y1) on the outside of the index finger joint and the pixel point B (x2, y2) on the outside of the little finger joint using formula (1), and then the horizontal finger-to-body size p is obtained; Substitute the coordinate point information (X12, Y12) and (X0, Y0) of key point 12 and key point 0 into formula (2) to calculate the slope K between the two points. The angle θ of the hand image tilt can be further calculated from the slope K according to formula (3). Next, determine the rotation center point of the image. Rotate around key point 0, key point 12 and the midpoint between the two points by testing. According to the coordinates of the four vertices A, B, C, D of the image, use formula (4) to calculate the coordinates of the points A′, B′, C′, and D′ after rotation. Thus, the minimum circumscribed moment of the rotated image can be obtained. When rotating, the image curtain is set to the minimum circumscribed moment. θ = arctanK; (3) x'=(x-x0)×cosθ-(y-y0)×sinθ+x0 y'=(x-x0)×sinθ+(y-y0)×cosθ+y0; (4) (x, y): coordinates of any point; (x0, y0): coordinates of the midpoint of rotation; (x', y'): coordinates of any point after rotation; θ: rotation angle, counterclockwise is positive and clockwise is negative; Finally, based on the coordinate information of the pixel points on the outer side of the middle segment of the finger, the algorithm uses formula (1) to calculate the Euclidean distance between the two points, thereby calculating the size of the human finger.
2. A human body horizontal finger length measurement system, characterized in that: include: A hand image acquisition module, used for acquiring a hand image; A module for determining pixel coordinate information of key points of knuckles, used to determine pixel coordinate information of key points of knuckles based on the hand image and using a hand knuckle key point detection algorithm; A knuckle key point visualization module, used for drawing the knuckle key points on the hand image based on the pixel coordinate information of the knuckle key points, so as to visualize the knuckle key points; A hand edge pixel information extraction module, used to extract hand edge pixel information based on the hand image using a differential edge detection algorithm; A module for determining the coordinates of the pixel points on the outer side of the middle joint of the finger, which is used to find the coordinates of the pixel points on the outer side of the middle joint of the finger by traversing horizontally based on the pixel coordinate information of the key points of the finger joint and the pixel information of the hand edge, and determine the coordinates of the pixel points on the outer side of the middle joint of the finger; A human body horizontal finger and body size determination module, used to calculate the finger-width distance based on the coordinates of the pixel points on the outer side of the middle segment of the finger, and determine the human body horizontal finger and body size; The processor is respectively connected with the hand image acquisition module, the finger joint key point pixel coordinate information determination module, the finger joint key point visualization module, the hand edge pixel information extraction module, the middle joint outer pixel point coordinate determination module and the human body horizontal finger size determination module; A memory is connected to the processor and stores a computer program that can be run on the processor; wherein, when the processor executes the computer program, the processor controls the hand image acquisition module, the finger joint key point pixel coordinate information determination module, the finger joint key point visualization module, the hand edge pixel information extraction module, the middle joint outer pixel point coordinate determination module and the human body transverse finger size determination module to work, so as to implement the human body transverse finger size measurement method as claimed in claim 1.
3. A computer-readable storage medium, characterized in that: The storage medium stores computer instructions. When a computer reads the computer instructions, the computer executes the method for measuring the horizontal finger length of a human body as claimed in claim 1.
Citation Information
Patent Citations
Palm vein image region-of-interest extraction method and device
CN113963158A
Multi-method fusion hand acupuncture point positioning method and system and electronic equipment
CN115953375A