Method for acquiring tangent points of curve contour of human body target area
By adopting cubic B-spline interpolation method and direction vector translation strategy in human body image processing, the problem of inaccurate tangent point extraction of human contour curves in the prior art is solved, and high-precision and high-efficiency tangent point extraction is achieved, which is suitable for real-time applications.
Patent Information
- Application Number
- CN202411917037.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The prior art is difficult to accurately obtain the curve tangent point of the human body contour, and there are problems such as noise interference, unstable local curvature calculation, lack of global feature considerations and low computing efficiency.
By collecting human images, preprocessing and feature point extraction, the contour points are processed using cubic B-spline interpolation method to obtain the B-spline curve, and the curve contour tangent points of the target area of the human body are accurately extracted through the translation and gradual search strategies of the direction vector.
It realizes the precise extraction of the tangent point of the human body contour curve, avoids noise interference, improves processing accuracy and calculation efficiency, and is suitable for real-time processing applications.
Smart Images

Figure CN119785434A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of human posture assessment in computer vision, and in particular to a method for obtaining contour tangent points of a curve in a target area of a human body. Background Art
[0002] With the development of artificial intelligence technology, human posture assessment based on computer vision has been widely used in the fields of medical rehabilitation, sports training, posture correction, etc. For example, in the field of sports rehabilitation, it is necessary to accurately evaluate the changes in the patient's posture curve; for example, indicators such as the thoracic kyphosis angle, lumbar lordosis, and pelvic inclination. These characteristics are often reflected in the curve changes of the human body contour. In sports training, the athlete's posture has an important impact on sports performance. The coach needs to analyze the athlete's body shape, including the back curve, waist curvature and other characteristics, to optimize the training plan. In medical diagnosis, doctors need to make a preliminary diagnosis by observing the patient's posture characteristics. For example, the back contour of scoliosis patients often presents asymmetrical curve characteristics.
[0003] At present, the mainstream human posture assessment method is mainly based on skeletal key point detection technology, which analyzes human posture by identifying the position of human joints. Traditional key point detection methods are difficult to evaluate the curve characteristics of the human body. For example, in scenarios such as scoliosis assessment, hunchback degree analysis, and body curve analysis, it is impossible to accurately describe the continuous changes of the human body contour by relying solely on discrete key points. In recent years, human body contours have been extracted through image processing methods, but there are the following problems when obtaining the characteristic points of the contour curve (such as tangent points): 1. The data after contour extraction often contains noise, and directly calculating the tangent points is likely to give erroneous results; 2. The local curvature calculation method is easily affected by data fluctuations, and it is difficult to obtain a stable tangent point position; 3. Individual local extreme points are usually used as target tangent points, and there is a lack of consideration of global contour features, resulting in low accuracy of the results; 4. The calculation efficiency is low, and it is difficult to meet the needs of real-time processing. Summary of the invention
[0004] In order to solve the problems existing in the prior art, the present invention provides a method for obtaining the contour tangent points of a curve of a target area of a human body. The method acquires a contour image by collecting a target human image and performing preprocessing; extracts the coordinates of feature points in the contour image to acquire a target search area; uses a cubic B-spline interpolation method to process the contour points of the target search area to obtain a B-spline curve; obtains joint points near the target search area as the first calibration point and the second calibration point, and obtains the direction vector of the line between the first calibration point and the second calibration point; translates the B-spline curve of the target search area to obtain the candidate tangent points of all contour curves in the target search area; obtains the candidate tangent points corresponding to the coordinate centers of the multiple candidate tangent points as the curve contour tangent points of the target area of the human body. The method proposed by the present invention is simple to implement and has high computational efficiency. It can realize the accurate extraction of the tangent points of the human body contour curve and is suitable for real-time processing applications.
[0005] The present invention adopts the following technical solution, a method for obtaining the contour tangent point of a curve of a target area of a human body, comprising:
[0006] Collecting and preprocessing the target human body image to obtain the target human body contour image;
[0007] Extracting feature point coordinates in the contour image, and acquiring a target search area in the contour image according to the feature point coordinates;
[0008] The contour points of the target search area are processed by using a cubic B-spline interpolation method to obtain a B-spline curve of the target search area;
[0009] Acquire joint points near the target search area, select two joint points as a first calibration point and a second calibration point, and acquire a direction vector of a line between the first calibration point and the second calibration point;
[0010] According to the direction vector, a translation is performed in the direction of the B-spline curve of the target search area to obtain a plurality of tangent points to be selected on the B-spline curve;
[0011] The candidate tangent points corresponding to the coordinate centers of the plurality of candidate tangent points are obtained as the curve contour tangent points of the human body target area.
[0012] Furthermore, the target human body image is collected and preprocessed to obtain a contour image of the target human body, including:
[0013] A mask extraction algorithm based on a deep learning model is used to obtain the target contour image in the human body image.
[0014] Furthermore, the coordinates of feature points in the contour image are extracted, and the target search area in the contour image is obtained according to the coordinates of the feature points, specifically:
[0015] Extracting the coordinates of characteristic pixel points in the target contour image;
[0016] An area consisting of characteristic pixel points of a set proportion whose coordinates are close to the center of the target contour image is selected as the target search area in the target contour image.
[0017] Furthermore, after obtaining the B-spline curve of the target search area, the method further includes: performing first-order derivative on each contour point on the B-spline curve.
[0018] Further, according to the direction vector, a translation is performed in the direction of the B-spline curve of the target search area to obtain multiple tangent points to be selected on the B-spline curve, specifically:
[0019] The direction vector is translated toward the direction of the B-spline curve with a set step size;
[0020] Obtaining the distance from each contour point on the B-spline curve to the direction vector;
[0021] When the distance is less than the first threshold, the angle between the tangent line of the corresponding contour point on the B-spline curve and the direction vector is calculated, and if the angle is less than the second threshold, the contour point is used as a candidate tangent point of the contour curve;
[0022] Each contour point on the B-spline curve is traversed in turn to obtain all the tangent points to be selected.
[0023] The beneficial effects of the present invention are as follows: the present invention avoids noise interference at the beginning and end of the contour and improves processing accuracy by selective area processing; adopts B-spline interpolation to smooth the curve and effectively eliminates the noise influence of discrete point data; based on the progressive search strategy of the direction vector, ensures the global optimality of the tangent point; through the cluster analysis method, effectively avoids the interference of local extreme value points; the algorithm is simple to implement and has high computational efficiency, and is suitable for real-time processing applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] 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 labor.
[0025] Figure 1 A schematic flow chart of a method for obtaining contour tangent points of a curve of a target area of a human body according to an embodiment of the present invention;
[0026] Figure 2 The figure is a schematic diagram of translation of a direction vector according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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.
[0028] A flow chart of a method for obtaining a curve contour tangent point of a human target area according to an embodiment of the present invention is shown in FIG. Figure 1 As shown, including:
[0029] Collecting and preprocessing the target human body image to obtain the target human body contour image;
[0030] In the embodiment of the present invention, a mask extraction algorithm based on a deep learning model is used to obtain a target contour image in a human body image.
[0031] Extracting feature point coordinates in the contour image, and acquiring a target search area in the contour image according to the feature point coordinates; specifically:
[0032] Extracting the coordinates of characteristic pixel points in the target contour image;
[0033] An area consisting of characteristic pixel points of a set proportion whose coordinates are close to the center of the target contour image is selected as the target search area in the target contour image.
[0034] The contour points of the target search area are processed by using a cubic B-spline interpolation method to obtain a B-spline curve of the target search area;
[0035] In the embodiment of the present invention, after the B-spline curve of the target search area is obtained, the method further includes: performing a first-order derivative on each contour point on the B-spline curve to determine a tangent line of each contour point.
[0036] Acquire joint points near the target search area, select two joint points as a first calibration point and a second calibration point, and acquire a direction vector of a line between the first calibration point and the second calibration point;
[0037] According to the direction vector, a translation is performed in the direction of the B-spline curve of the target search area to obtain multiple tangent points to be selected on the B-spline curve; specifically:
[0038] The direction vector is translated in the direction of the B-spline curve with a set step size; the distance from each contour point on the B-spline curve to the direction vector is obtained; when the distance is less than a first threshold, the angle between the tangent line of the corresponding contour point on the B-spline curve and the direction vector is calculated, and if the angle is less than a second threshold, the contour point is used as a candidate tangent point of the contour curve; each contour point on the B-spline curve is traversed in turn to obtain all candidate tangent points.
[0039] The candidate tangent points corresponding to the coordinate centers of the plurality of candidate tangent points are obtained as the curve contour tangent points of the human body target area.
[0040] In another specific embodiment of the present invention, the method for obtaining the contour tangent point of the curve of the target area of the human body comprises the following steps:
[0041] Step 1: Collect the required target human body image and pre-process the collected target human body image; this is specifically achieved through the following steps:
[0042] Step 1.1: Based on calling the deep learning model to extract the mask algorithm, obtain the human target contour image;
[0043] Step 1.2: Select a target search area on the human target contour image using the pixel coordinates of the feature points of the human target contour image;
[0044] Step 1.3: Select the middle contour points of the target search area in step 1.2 as the contour processing range. In the embodiment of the present invention, the set ratio of the middle contour points to all contour points in the target search area can be selected as 80%, which can avoid processing the beginning and end parts of the contour. Usually, the beginning and end parts of the contour may contain noise or irrelevant information.
[0045] Step 2: Use the cubic B-spline interpolation method (splprep) to interpolate and smooth the selected contour points of the target search area, remove noise points, and obtain the B-spline curve of the target search area;
[0046] In the embodiment of the present invention, the smoothing factor for controlling the smoothness of the fitting curve is set to 0.5 times the number of contour points in the search area selected in step 1.3.
[0047] Step 3: Take the first-order derivative of all contour points on the B-spline curve of the target search area in step 2 to obtain the direction vector of the tangent direction of each contour point;
[0048] The expression for the first-order derivative is:
[0049] dS_x(u_0) / du=S_x'(u_0)
[0050] dS_y(u_0) / du=S_y'(u_0)
[0051] Among them, S(u_0)=(x_0,y_0), S_x'(u_0) and S_y'(u_0) are the first-order derivatives of the components of the curve in the x and y directions at u_0 respectively.
[0052] Step 4: Determine two calibration points near the contour of the target contour image in step 1, the calibration points include one or both of human bone nodes or pixel extreme value points of the target contour image, calculate the direction vector of the line connecting the two points and normalize it;
[0053] In a specific embodiment of the present invention, when the detection target human body contour is the back area, the calibration points can be selected as shoulder joint points and hip joint points, so as to calculate the direction vectors of the two nodes; when the detection target human body contour is the neck area, the calibration points can be selected as earlobe points and shoulder joint points; when the detection target human body contour is the leg area, the calibration points can be selected as hip joint points and knee joint points, thereby satisfying the tangent point detection of the human body contour curve under different conditions and requirements.
[0054] Step 5: By comparing the direction vectors determined by the two calibration points in step 4 with the direction vectors of each point on the curve in step 3, a progressive search is performed on all contour points on the B-spline curve of the target search area in step 2 to obtain all candidate tangent points on the curve contour of the human target area; Figure 2 As shown, the specific steps include:
[0055] Step 5.1: The straight line between the two calibration points in step 4 is translated toward the direction of the B-spline curve of the target search area in step 2. In the embodiment of the present invention, the set step length of each movement is one step length, and the translation step length is 0.5-1 pixel;
[0056] Step 5.2: Calculate the distance from all contour points on the B-spline curve of the target search area in step 2 to the straight line between the two calibration points after the movement. When this distance is less than the first threshold, the straight line between the two calibration points after the movement is very close to the contour of the target search area, and the contour point corresponding to this distance is the closest point. In the embodiment of the present invention, the first threshold is set to 0.5 pixels;
[0057] Step 5.3: Calculate the direction vector angle between the tangent line of the nearest point in step 5.2 and the straight line between the two calibration points by dot product. When the direction vector angle is less than a set threshold, determine the nearest point as a candidate tangent point, and obtain the position coordinates of the candidate tangent point. In the embodiment of the present invention, the second threshold is set to be less than 0.5°.
[0058] Step 5.4: Continue to translate in the direction of the B-spline curve of the target search area until all contour points on the B-spline curve of the target search area are searched, and the position coordinates of all the tangent points to be selected are obtained.
[0059] Step 6: Analyze the position coordinates of all the candidate tangent points in step 5, and select the candidate tangent points at the midpoint of the area where the tangent points are most concentrated as the tangent points on the final curve contour of the human target area.
[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for obtaining the tangent point of the curve contour of a target area of a human body, characterized in that: include: Collecting and preprocessing the target human body image to obtain the target human body contour image; Extracting feature point coordinates in the contour image, and acquiring a target search area in the contour image according to the feature point coordinates; The contour points of the target search area are processed by using a cubic B-spline interpolation method to obtain a B-spline curve of the target search area; Acquire joint points near the target search area, select two joint points as a first calibration point and a second calibration point, and acquire a direction vector of a line between the first calibration point and the second calibration point; According to the direction vector, a translation is performed in the direction of the B-spline curve of the target search area to obtain a plurality of tangent points to be selected on the B-spline curve; The candidate tangent points corresponding to the coordinate centers of the plurality of candidate tangent points are obtained as the curve contour tangent points of the human body target area.
2. A method for obtaining the tangent point of the curve contour of a human target area according to claim 1, characterized in that: Collect the target human body image and perform preprocessing to obtain the target human body contour image, including: A mask extraction algorithm based on a deep learning model is used to obtain the target contour image in the human body image.
3. A method for obtaining the tangent point of the curve contour of a human target area according to claim 1, characterized in that: Extracting the coordinates of feature points in the contour image, and obtaining the target search area in the contour image according to the coordinates of the feature points, specifically: Extracting the coordinates of characteristic pixel points in the target contour image; An area consisting of characteristic pixel points of a set proportion whose coordinates are close to the center of the target contour image is selected as the target search area in the target contour image.
4. A method for obtaining the tangent point of the curve contour of a human target area according to claim 1, characterized in that: After the B-spline curve of the target search area is obtained, the method further includes: performing first-order derivative on each contour point on the B-spline curve.
5. A method for obtaining the tangent point of the curve contour of a human target area according to claim 1, characterized in that: According to the direction vector, a translation is performed in the direction of the B-spline curve of the target search area to obtain multiple tangent points to be selected on the B-spline curve, specifically: The direction vector is translated toward the direction of the B-spline curve with a set step size; Obtaining the distance from each contour point on the B-spline curve to the direction vector; When the distance is less than the first threshold, the angle between the tangent line of the corresponding contour point on the B-spline curve and the direction vector is calculated, and if the angle is less than the second threshold, the contour point is used as a candidate tangent point of the contour curve; Each contour point on the B-spline curve is traversed in turn to obtain all the tangent points to be selected.
Citation Information
Patent Citations
Intelligent forklift truck local obstacle avoidance path planning method based on circular region of interest
CN108415413A
Human body shape parameter capturing method based on human body contour line
CN110245575A
Shape protrusion recognition method and device and computer device
CN112200738A
Consistency adjustment method and apparatus for global normal vector of medical contour data
WO2022141368A1