Lower limb malformation detection and analysis method

Through the automatic force line labeling method based on contour information, the existing lower limb deformity detection method relies on manual operation and ignores the influence of soft tissues, achieving more accurate lower limb force analysis and consistency of detection results.

CN119741266AActive Publication Date: 2025-04-01GUANGZHOU INSTITUTE OF TECHNOLOY XIDIAN UNIVERSITY +1
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411777269.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-01
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The existing methods for detecting lower limb deformity rely on manual operation and are susceptible to human factors, resulting in subjective errors in the measurement results and ignore the impact of muscles, ligaments and other soft tissues on the stress of the lower limbs.

Method used

An automatic force line labeling method based on contour information is adopted, through segmented shooting and splicing of the entire film of the lower limb, image enhancement and segmentation are performed, bone edge information is extracted, robust mechanical axis is calculated, lower limb stress is analyzed, and deformity detection is performed.

Benefits of technology

It realizes a more accurate reflection of the physiological structure and stress of the lower limbs, reduces artificial errors, improves the consistency and efficiency of detection, and can automatically detect the prosthesis and adapt to the diversity of deformed pictures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741266A_ABST
    Figure CN119741266A_ABST
Patent Text Reader

Abstract

The invention discloses a lower limb malformation analysis method, which comprises the following steps of S1, acquiring lower limb pictures shot by an X-ray machine and splicing the lower limb pictures to acquire a lower limb full picture; s2, performing morphological processing according to the color information, and repairing the character area to weaken the watermark; s3, enhancing the image contrast; s4, segmenting the enhanced picture to remove muscular tissues, and retaining bones; s5, performing coarse positioning on the segmented image, obtaining a key part bounding box, and judging whether a prosthesis is implanted or not; s6, extracting internal edge information of the bounding box, obtaining a closed contour, and constructing an edge set expressing skeleton features; s7, according to the edge set, the mechanical axis is calculated, the skeleton radian is calculated, the lower limb malformation state is analyzed, and the stress situation is visualized. Compared with a method based on the lower limb force line, stress analysis is conducted through the skeleton radian, the real stress situation is better met, and the lower limb mechanical axis can be automatically marked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical technology, and in particular to a method for detecting and analyzing lower limb deformities. Background Art

[0002] Lower limb deformity is a common orthopedic disease in clinical practice. This deformity may be congenital, existing at birth, or acquired, such as due to disease, injury or bad living habits. Lower limb deformity can affect a person's walking ability, posture, comfort and overall health. In actual production, full-length lower limb films are usually used to evaluate the patient's lower limb force alignment, which plays an important role in orthopedic surgical planning, lower limb deformity correction, joint replacement and the diagnosis and treatment of diseases related to lower limb force alignment.

[0003] The most commonly used method for measuring lower limb force lines and angles in clinical practice still relies on manual operation by doctors. Doctors need to manually mark specific anatomical points on X-ray films, such as the center of the hip joint, the center of the knee joint, and the center of the ankle joint, and then connect these points to draw the lower limb force lines, and then measure various key angles (such as hip, knee, ankle angle, femoral angle, tibial angle, etc.). Although these operations are not complicated, the process is cumbersome and time-consuming, and requires high operational proficiency, attention, and psychological state of the doctor. Therefore, it is easily affected by human factors, resulting in subjective errors in the measurement results. Automatic and intelligent lower limb deformity detection is of great significance. It automatically identifies key anatomical points and force lines, calculates related angles, improves the consistency of analysis, and provides advice to doctors, thereby improving the efficiency of the diagnosis and treatment process.

[0004] Existing methods usually determine the force lines of the lower limbs based on key point positioning, among which the regression method directly predicts the coordinates of the key points. This method usually uses a deep learning model to classify pixels in the input image and learn the mapping from the image to the key point coordinates, but the performance is poor when the key point position is blurred or occluded. The heat map method predicts the probability distribution of each key point, that is, predicts the probability of each pixel position in the image being a key point. The final key point position is usually the point with the highest probability on the heat map, which helps to deal with occlusion and blur, but the computational cost is higher.

[0005] For example, the existing Chinese patent technology CN112348892A point positioning method and related devices and equipment improve the accuracy of target point detection by combining coarse positioning heat map and fine positioning heat map, but generating and analyzing coarse positioning and fine positioning heat map may require higher computing resources, especially when processing high-resolution images. The accuracy of the fine positioning heat map is highly dependent on the accuracy of the coarse positioning heat map. If the coarse positioning is inaccurate, the improvement of the fine positioning is limited.

[0006] Existing Chinese patent technology CN113907774A is a method and device for measuring lower limb force lines. The full-length film of the lower limb is cut into independent images of the hip joint, knee joint and ankle joint. The corresponding key point model is used to extract key points from the hip joint, knee joint and ankle joint images respectively, including the center point of the femoral head, the center point of the intercondylar notch of the knee joint and the center point of the tibial plateau. The mechanical axis of the femur is determined according to the center point of the femoral head and the center point of the intercondylar notch of the knee joint, the mechanical axis of the tibia is determined according to the center point of the intercondylar notch of the knee joint and the center point of the tibial plateau, the first angle and the second angle are determined according to the anatomical axis of the femur and the anatomical axis of the tibia, and the lower limb force line is determined according to the center point of the femur and the center point of the ankle joint, so as to realize automatic calculation of the lower limb force line and angle.

[0007] CN114581469A uses straight line detection to determine the contour, ignoring the curvature of the bone itself, and the method of cropping the area is to manually set the cropping length in advance, which cannot adapt to the diversity of deformed images.

[0008] The above scheme simplifies the limbs into points and lines. Although it can reflect the force line situation of the lower limbs to a certain extent, it ignores the contribution of muscles, ligaments and other soft tissues, which actually have an important influence on the stability and force distribution of the lower limbs. There is a difference between the above assumptions and the actual force situation of the lower limbs. To solve the above problems, the present invention proposes a lower limb deformity detection method with improved lower limb force lines, which realizes automatic force line annotation of the entire X-ray lower limb film and deformity detection tasks. Summary of the invention

[0009] The purpose of the present invention is to provide an analysis method for lower limb deformity in order to solve the above-mentioned problems. The mechanical axis is automatically marked based on contour information to make up for the defect that the current automatic extraction method of the mechanical axis based on the key point detection algorithm cannot truly reflect the stress condition of the lower limb under special bone morphology and loses information, thereby solving the problems mentioned in the background technology.

[0010] In order to solve the above problems, the present invention provides a technical solution:

[0011] A method for detecting and analyzing lower limb deformity comprises the following steps:

[0012] S1. Use an X-ray machine to take segmented photos of different parts of the lower limbs to obtain images that include the morphology of the lower limbs, and then stitch them together to obtain the entire lower limb film;

[0013] S2, repair the text area of ​​the whole film according to the color to weaken the watermark;

[0014] S3, converting into a binary image, and enhancing the image contrast of the repaired image;

[0015] S4, segmenting the enhanced image, removing the muscles in the whole image and retaining the bones;

[0016] S5, roughly positioning the segmented image, obtaining the key part bounding box, and determining whether the prosthesis is implanted;

[0017] S6, extracting edge information from the bounding box area and constructing an edge set expressing bone features;

[0018] S7. Calculate the robust mechanical axis based on the bone edge set, analyze the force conditions of the lower limbs, and perform deformity detection.

[0019] Preferably, the specific steps of determining whether a prosthesis is implanted in the lower limb in step S5 include:

[0020] S51, inputting the result of the rough positioning as ROI, setting a key part set for storing key parts representing local features of the bone;

[0021] S52, dividing each key part into two subsets according to the position of each key part in the lower limb area, and calculating the mean value of the pixel intensity in each bounding box according to the starting point and the ending point of each bounding box;

[0022] S53. Compare the intensity difference of the corresponding areas on the left and right sides, and use the threshold α to determine whether the current part is implanted with a prosthesis. If it is less than the threshold, it is considered that the left and right parts are in the same state. Otherwise, it is considered that the patient has been implanted with a prosthesis. Further compare it with the pixel mean of the non-critical part area. If it is less than the threshold, it is considered that the patient has not been implanted with a prosthesis.

[0023] Preferably, the processing and analysis of the skeleton edge set in step S7 comprises the following steps:

[0024] S71. Use the Canny operator for edge detection and use cv2.findContours to obtain bone contour information. For the two key parts at the top, i.e., the femoral area, count the pixel intensity in the x direction, and take the second highest peak and valley as the edge point of the greater trochanter. Similarly, take the first peak and valley as the starting point, count the pixel intensity in the y direction, take the first peak and valley as the end point, traverse the points on the contour, draw a vertical line along the contour, take the midpoint as the boundary, accumulate the intersection points of the vertical lines and take the average value as the key force point of the femoral head.

[0025] S72, for the key parts in the middle, i.e., the tibia and femur regions, distinguish the tibia and femur according to the size of the contour y coordinate, calculate the contour perimeter for the femur ROI, and then reduce it as the threshold for the next step, use a polygon to approximate the contour, compare the contour points with the real line according to the set threshold, and the screening standard is the percentage threshold of the contour perimeter;

[0026] S73. Further subdivide the contour into three irregular curved edges by endpoints, among which the lower edge of the femur and the upper edge of the tibia are used as a pair of matching edges. Sample along the y-axis direction and take the midpoints of the intersections of the edges and the straight lines to obtain the contact surface between the tibia and the femur. Connect the center point of the femoral head and the knee joint to obtain the mechanical axis of the femur. Similarly, connect the center of the talus and the center of the knee joint to obtain the mechanical axis of the tibia. Connect the center point of the femoral head and the center point of the ankle joint to obtain the mechanical axis of the lower limb.

[0027] Preferably, the method for generating a force curve for lower limb force analysis comprises the following steps:

[0028] A1. Calculate the shortest distance d from the center of gravity of the key part to the boundary. Draw a horizontal line along the x-axis at a distance d from the center of gravity to obtain two intersection points (x 11 ,y1),(x 21 ,y1), and the midpoint coordinates Calculate the angle between the midpoint and the center of gravity and the contact surface to reflect the degree of inclination of the bone at both ends. Determine the number of interpolation nodes n based on the degree of inclination and the age of the patient.

[0029] A2. Take the y coordinate of the center of gravity of the key part as the starting point and find the intersection point with the edges on both sides along the x direction, recorded as x 01 ,x 02 , then traverse along the y direction to obtain the coordinate sets of both sides {(x 11 ,y1),(x 21 ,y1),…,(x n1 ,y n ),(x n2 ,y n )}, for each pair of matching points (xi1,yi), (xi2,yi), calculate the midpoint, the coordinates of the midpoint are The interpolation node set is The curve C(y) describing the morphological characteristics of the bone is generated using the cubic spline interpolation method;

[0030] A3. Along the generated curve C(y), for each y coordinate, draw a perpendicular line to the curve. The direction of the perpendicular line is obtained by calculating the slope of the tangent line C'(y) at each point of the curve: A series of arrows are generated to describe the force conditions at various parts of the bones.

[0031] The beneficial effects of the present invention are:

[0032] 1. Use curves instead of lower limb force lines for deformity detection. Force analysis can more accurately reflect the physiological structure of the lower limbs and better simulate the force conditions in various parts of the lower limbs.

[0033] 2. Use YOLO for coarse positioning of key parts instead of key point detection, which reduces the manpower and time cost of fine labeling required for pixel-level key point detection.

[0034] 3. By comparing the mean pixel intensity of the left and right bounding boxes with the difference in other areas, it can automatically detect whether the patient's entire film is implanted with a prosthesis, avoid the impact of foreign objects such as steel nails and steel plates that are obviously different from the bone structure on deformity detection, and help analyze postoperative recovery. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] For ease of explanation, the present invention is described in detail with reference to the following specific implementations and the accompanying drawings.

[0036] Figure 1 It is a schematic diagram of the workflow of the present invention;

[0037] Figure 2 It is a processing flow chart of automatic extraction of mechanical axis and deformity detection of the present invention;

[0038] Figure 3 It is a flow chart of simulation of the force conditions of various parts of the lower limbs of the present invention;

[0039] Figure 4 It is a comparison diagram before and after the image enhancement processing of the present invention;

[0040] Figure 5 The present invention roughly locates the key parts and extracts the edge set schematic diagram;

[0041] Figure 6 It is the backbone central axis sampling curve and force analysis diagram of the present invention;

[0042] Figure 7 It is a calculation and marking diagram of the mechanical axis of the lower limbs obtained by the present invention based on rough positioning. DETAILED DESCRIPTION

[0043] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.

[0044] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. 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.

[0045] like Figure 1-7 As shown, the specific implementation adopts the following technical solutions:

[0046] Embodiment 1:

[0047] S1. Use an X-ray machine to take segmented photos of different parts of the lower limbs to obtain images that include the morphology of the lower limbs, and then stitch them together to obtain the entire lower limb film;

[0048] S2. If the whole film result contains text information of the machine, the text area of ​​the whole film is repaired according to the color to weaken the watermark;

[0049] S3, converting into a binary image, and enhancing the image contrast of the repaired image;

[0050] S4, segmenting the enhanced image, removing the muscles in the whole image and retaining the bones;

[0051] S5, roughly positioning the segmented image, obtaining the key part bounding box, and determining whether the prosthesis is implanted;

[0052] S6, extracting edge information from the bounding box area and constructing an edge set expressing bone features;

[0053] S7. Calculate the robust mechanical axis based on the bone edge set, analyze the force conditions of the lower limbs, and perform deformity detection.

[0054] The method for determining whether a prosthesis is implanted in the lower limb in step S5 is:

[0055] S51, taking the bounding box output by YOLO as the ROI area, and dividing it into two left and right subsets according to the location of the area in the lower limb;

[0056] S52, for each bounding box, counting pixel intensities, when the number of pixels at a certain gray level exceeds a predefined threshold, cutting them, and evenly distributing the excess pixels to other gray levels, and calculating the intensity mean;

[0057] S53. Compare the mean pixel intensity difference of the left and right corresponding areas. If it is less than the threshold, it is considered that both the left and right parts are implanted with prostheses or neither is implanted with prostheses. Otherwise, it is considered that the patient has only one side implanted with prosthesis. Further compare with the pixel mean of non-critical parts. If it is less than the threshold, it is considered that the patient has not been implanted with prosthesis.

[0058] Among them, the specific steps of processing and analyzing the bone edge set in step S7 are:

[0059] S71. Use the Canny operator for edge detection and use cv2.findContours to obtain bone contour information. For the two key parts at the top, i.e., the femoral area, count the pixel intensity in the x direction, and take the second highest peak and valley as the edge point of the greater trochanter. Similarly, take the first peak and valley as the starting point, count the pixel intensity in the y direction and take the first peak and valley as the end point, traverse the points on the contour, draw a vertical line along the contour, take the midpoint as the boundary, accumulate the intersection points of the vertical lines and take the average value as the key force point of the femoral head.

[0060] S72, for the key parts in the middle, i.e., the tibia and femur regions, distinguish the tibia and femur according to the size of the contour y coordinate, for the femur ROI, calculate the contour perimeter, and then reduce it as the threshold for the next step, use a polygon to approximate the contour, compare the contour points with the real line according to the set threshold, and the screening standard is the percentage threshold of the contour perimeter. Points greater than this value are discarded, and points less than this value are retained. The obtained points are the region vertices. If the number of vertices is less than 4, return to adjust the threshold size;

[0061] S73. Further subdivide the contour into three irregular curved edges by endpoints, among which the lower edge of the femur and the upper edge of the tibia are used as a pair of matching edges. Sample along the y-axis direction and take the midpoints of the intersections of the edges and the straight lines to obtain the contact surface between the tibia and the femur; connect the center point of the femoral head and the knee joint to obtain the mechanical axis of the femur. Similarly, connect the center of the talus and the center of the knee joint to obtain the mechanical axis of the tibia, and connect the center point of the femoral head and the center point of the ankle joint to obtain the mechanical axis of the lower limb.

[0062] Embodiment 2:

[0063] Step 100: Obtain the full film data of the lower limbs and convert the DICOM format data into PNG format for program reading;

[0064] Step 200: Detect whether the image has a color mark, and use the neighboring information to repair it to reduce the impact of the watermark on subsequent processing;

[0065] Step 300: converting into a binary image, performing local contrast enhancement on the processed image to highlight edge information;

[0066] Step 400: segmenting the enhanced image to obtain an image with the muscle portion removed;

[0067] Step 500: roughly locate the segmented image, obtain the ROI area, and detect whether the prosthesis is implanted;

[0068] Step 600: extract edge information from the key part bounding box and construct a bone edge set;

[0069] Step 700: Calculate the mechanical axis of the lower limb based on the bone edge set, sample the bone shaft as the interpolation point, obtain the bone interpolation curve starting from the center of gravity of the edge part, calculate the curvature of the two end points, and the tangent line at the intersection of the straight line where the center of gravity of the tibia and femur is located and the interpolation curve, so as to analyze the deformity of the lower limb.

[0070] The implementation method is as follows:

[0071] First, pydicom is used to read DICOM data, and the pixel intensity values ​​in different DICOM files are normalized to the range of (0,255). Then, the image is detected to see if there is a color mark, and cv2.inpaint is used to repair it to reduce the impact of the watermark on subsequent analysis. The image is further converted into a binary image, and the processed image is enhanced. The target detection algorithm is used to obtain the rough positioning of the key area, and a closed edge set is constructed for the ROI area to obtain the lower limb mechanical axis annotation.

[0072] Specifically:

[0073] The image contrast enhancement in step 300 includes the following operations:

[0074] 301: Divide the input image into multiple small, overlapping square sub-blocks, and the size of each sub-block can be adjusted according to the resolution of the image and the age of the patient;

[0075] 302: For each sub-block, calculate its pixel grayscale frequency. If the number of pixels at a certain grayscale level exceeds a predefined threshold, crop it and evenly distribute the excess pixels to other grayscale levels. This can avoid over-enhancing the contrast of certain areas, thereby reducing noise amplification.

[0076] 303: converting the distribution of the original gray level into a uniform distribution, so that the contrast of the image is enhanced;

[0077] The mechanical axis marking and deformity analysis of step 700 include the following operations:

[0078] 701: Use the Canny operator for edge detection and cv2.findContours to obtain bone contour information. For the two key parts at the top, i.e. the femoral area, count the pixel intensity in the x direction, and take the second highest peak and valley as the edge point of the greater trochanter. Similarly, take the first peak and valley as the starting point, count the pixel intensity in the y direction and take the first peak and valley as the end point, traverse the points on the contour, draw a vertical line along the contour, take the midpoint as the boundary, accumulate the intersection points of the vertical lines and take the average value as the key force point of the femoral head;

[0079] 702: For the key parts in the middle, i.e., the tibia and femur, the tibia and femur are distinguished according to the size of the contour y coordinate. For the femur ROI, the contour perimeter is calculated and then reduced as the threshold for the next step. The contour is approximated using a polygon. The contour points are compared with the real line according to the set threshold. The screening standard is the percentage threshold of the contour perimeter. Points greater than this value are discarded, and points less than this value are retained. The obtained points are the vertices of the region. If the number of vertices is less than 4, the threshold size is adjusted. The contour is further subdivided into 3 irregular curved edges by the endpoints. The lower edge of the femur and the upper edge of the tibia are used as a pair of matching edges. The midpoints of the intersections of the edges and the straight line are sampled along the y-axis direction to obtain the contact surface between the tibia and the femur.

[0080] 703: Connect the center point of the femoral head with the knee joint to obtain the mechanical axis of the femur. Similarly, connect the center point of the talus with the center point of the knee joint to obtain the mechanical axis of the tibia. Connect the center point of the femoral head with the center point of the ankle joint to obtain the mechanical axis of the lower limb.

[0081] If the angle between the key stress point of the femoral head and the edge of the greater trochanter and the mechanical axis of the femur is within 90°±5°, the angle between the tangent of the mechanical axis of the femur and the stress surface of the knee joint is within 87.5°±2.5°, the angle between the tangent of the mechanical axis of the tibia and the stress surface of the knee joint is within 87.5°±2.5°, and the angle between the tangent of the mechanical axis of the tibia and the stress surface of the ankle joint is within 89°±3°, the lower limb is considered to be within the normal range. Otherwise, the lower limb is considered to have deformity and needs further treatment.

[0082] 704: Calculate the shortest distance d from the center of gravity of the key part to the boundary. Draw a horizontal line along the x-axis at a distance d from the center of gravity to obtain two intersection points (x 11 ,y1),(x 21 ,y1), and the midpoint coordinates Calculate the angle between the midpoint and the center of gravity and the contact surface to reflect the degree of inclination of the bone at both ends. Determine the number of interpolation nodes n based on the degree of inclination and the age of the patient. If the slope does not exist, the end is considered to be perpendicular to the contact surface. Similarly, convert the bone edge set into a left and right edge point set;

[0083] 705: Starting from the y coordinate of the center of gravity of the key part, find the intersection point with the edges on both sides along the x direction, recorded as x 01 ,x 02 , then traverse along the y direction to obtain the coordinate sets of both sides {(x 11 ,y1),(x 21 ,y1),…,(x n1 ,y n ),(x n2 ,y n)}, for each pair of matching points (xi1,yi), (xi2,yi), calculate the midpoint, the coordinates of the midpoint are The interpolation node set is The curve C(y) describing the morphological characteristics of the bone is generated using the cubic spline interpolation method;

[0084] Along the generated curve C(y), for each y coordinate, draw a perpendicular line to the curve. The direction of the perpendicular line is obtained by finding the slope of the tangent line C'(y) at each point of the curve: Generates a series of arrows to describe the forces acting on various parts of the bone.

[0085] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

[0086] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope of the present disclosure is indicated by the following claims.

Claims

1. A method for analyzing lower limb deformity based on contour extraction, characterized in that: The following steps are involved: S1. Use an X-ray machine to take segmented photos of different parts of the lower limbs to obtain images that include the morphology of the lower limbs, and then stitch them together to obtain the entire lower limb film; S2. Repair the text area of ​​the entire film according to the color to reduce the watermark; S3, converting into a binary image, and enhancing the image contrast of the repaired image; S4, segmenting the enhanced image, removing the muscles in the whole image and retaining the bones; S5, roughly positioning the segmented image, obtaining the key part bounding box, and determining whether the prosthesis is implanted; S6, extracting edge information from the bounding box area and constructing an edge set expressing bone features; S7. Calculate the robust mechanical axis based on the bone edge set, analyze the force conditions of the lower limbs, and perform deformity detection.

2. The method for analyzing lower limb deformity based on contour extraction according to claim 1, characterized in that: The specific steps of determining whether a prosthesis is implanted in the lower limb in step S5 include: S51, inputting the result of the rough positioning as ROI, setting a key part set for storing key parts representing local features of the bone; S52, dividing each key part into two subsets according to the position of each key part in the lower limb area, and calculating the mean value of the pixel intensity in each bounding box according to the starting point and the ending point of each bounding box; S53. Compare the intensity difference of the corresponding areas on the left and right sides, and use the threshold α to determine whether the current part is implanted with a prosthesis. If it is less than the threshold, it is considered that the left and right parts are in the same state. Otherwise, it is considered that the patient has been implanted with a prosthesis. Further compare it with the pixel mean of the non-critical part area. If it is less than the threshold, it is considered that the patient has not been implanted with a prosthesis.

3. The method for analyzing lower limb deformity based on contour extraction according to claim 1, characterized in that: The processing and analysis of the skeleton edge set in step S7 specifically includes the following steps: S71. Use the Canny operator for edge detection and use cv2.findContours to obtain bone contour information. For the two key parts at the top, i.e., the femoral area, count the pixel intensity in the x direction, and take the second highest peak and valley as the edge point of the greater trochanter. Similarly, take the first peak and valley as the starting point, count the pixel intensity in the y direction, take the first peak and valley as the end point, traverse the points on the contour, draw a vertical line along the contour, take the midpoint as the boundary, accumulate the intersection points of the vertical lines and take the average value as the key force point of the femoral head. S72, for the key parts in the middle, i.e., the tibia and femur regions, distinguish the tibia and femur according to the size of the contour y coordinate, calculate the contour perimeter for the femur ROI, and then reduce it as the threshold for the next step, use a polygon to approximate the contour, compare the contour points with the real line according to the set threshold, and the screening standard is the percentage threshold of the contour perimeter; S73. Further subdivide the contour into three irregular curved edges by endpoints, among which the lower edge of the femur and the upper edge of the tibia are used as a pair of matching edges. Sample along the y-axis direction and take the midpoints of the intersections of the edges and the straight lines to obtain the contact surface between the tibia and the femur. Connect the center point of the femoral head and the knee joint to obtain the mechanical axis of the femur. Similarly, connect the center of the talus and the center of the knee joint to obtain the mechanical axis of the tibia. Connect the center point of the femoral head and the center point of the ankle joint to obtain the mechanical axis of the lower limb.

4. The method for analyzing lower limb deformity based on contour extraction according to claim 3, characterized in that: It also includes lower limb force analysis, and a method for generating a force curve of the lower limb force analysis includes the following steps: A1. Calculate the shortest distance d from the center of gravity of the key part to the boundary. Draw a horizontal line along the x-axis at a distance d from the center of gravity to obtain two intersection points (x 11 ,y1),(x 21 ,y1), and the midpoint coordinates Calculate the angle between the midpoint and the center of gravity and the contact surface to reflect the degree of inclination of the bone at both ends. Determine the number of interpolation nodes n based on the degree of inclination and the age of the patient. A2. Take the y coordinate of the center of gravity of the key part as the starting point and find the intersection point with the edges on both sides along the x direction, recorded as x 01 ,x 02 , then traverse along the y direction to obtain the coordinate sets of both sides {(x 11 ,y1),(x 21 ,y1),…,(x n1 ,y n ),(x n2 ,y n )}, for each pair of matching points (xi1,yi), (xi2,yi), calculate the midpoint, the coordinates of the midpoint are The interpolation node set is The curve C(y) describing the morphological characteristics of the bone is generated using the cubic spline interpolation method; A3. Along the generated curve C(y), for each y coordinate, draw a perpendicular line to the curve. The direction of the perpendicular line is obtained by calculating the slope of the tangent line C'(y) at each point of the curve: the slope of the perpendicular line = - A series of arrows are generated to describe the force conditions at various parts of the bones.

Citation Information

Patent Citations

  • Point positioning method and related device and equipment

    CN112348892A

  • Method and device for measuring lower limb force line

    CN113907774A

  • Method and device for automatically extracting axes of thighbone and tibia of lower limb and electronic equipment

    CN114581469A

  • Bone age X-ray film RUS bone block near contour point positioning method

    CN111210424A

  • Double-lower-limb load-bearing position force line measurement and diagnosis system and intelligent measurement method

    CN114711796A