Methods, apparatus, computer devices, and storage media for hip angle measurement
By performing two rotations on the femoral image in a three-dimensional coordinate system and fitting the point cloud data, the problem of large measurement error of hip joint angle is solved, and the accurate quantification of hip joint angle is achieved, supporting the accurate diagnosis and treatment of FAI.
Patent Information
- Application Number
- CN202211079211.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-09-05
AI Technical Summary
Existing technologies for hip joint angle measurement suffer from significant errors, primarily because CT images cannot be easily repositioned and rely on the doctor's experience, leading to inaccurate measurement results.
By acquiring femoral images, the femoral midline is rotated twice in a three-dimensional coordinate system to rotate the femoral image to a standard position. The center point of the femoral head and the midline are located using point cloud data spherical fitting. The image is then rotated using a mathematical transformation matrix, and finally the hip joint angle is quantified.
This improves the accuracy of hip joint angle measurement, ensuring the precision of hip joint angle measurement and supporting accurate diagnosis and treatment of FAI.
Smart Images

Figure CN115511793B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, and storage medium for measuring hip joint angle. Background Technology
[0002] Femoroacetabular impingement (FAI) is a morphological variation of the acetabulum and proximal femur, affecting the fit between the acetabulum and femoral head, leading to intra-articular lesions and symptoms. FAI can be diagnosed and treated based on measurements of intermediate values such as the CE angle or α angle of the hip joint. This involves comparing the CE angle or α angle with normal values to determine the diagnosis of FAI, the location of the hip joint deformity, and to perform surgical resection. Currently, the CE angle or α angle of the hip joint is mainly measured manually by specialists using CT images. However, CT images cannot be easily repositioned, and manual measurement relies heavily on the doctor's experience, making the results prone to error. Summary of the Invention
[0003] Based on this, a method, apparatus, computer device, and storage medium for measuring hip joint angle are provided to improve the problem of large errors in hip joint angle measurement in the prior art.
[0004] On the one hand, a method for measuring hip joint angle is provided, the method comprising:
[0005] Acquire a femoral image, and obtain the femoral midline based on the femoral image, wherein the femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline;
[0006] The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline.
[0007] The first rotation axis is projected onto the second coordinate plane to obtain the second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis.
[0008] The femoral junction coordinates are obtained from the second rotation image, and the hip joint angle is obtained from the femoral junction coordinates and the second rotation axis.
[0009] In one embodiment, the femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image. The first rotated image includes a first rotation midline, comprising: establishing a first rotation axis through the coordinates of the femoral head center point, such that the first rotation axis is perpendicular to the first coordinate plane; and rotating the femoral image according to the first rotation axis and the first rotation angle to obtain the first rotated image.
[0010] In one embodiment, the first rotation axis is projected onto a second coordinate plane to obtain a second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain a second rotation image. The second rotation image includes a second rotation axis, which includes: establishing a second rotation axis through the coordinates of the femoral head center point, such that the second rotation axis is perpendicular to the second coordinate plane; and rotating the first rotation image according to the second rotation axis and the second rotation angle to obtain the second rotation image.
[0011] In one embodiment, obtaining the femoral junction coordinates based on the second rotated image, and obtaining the hip joint angle based on the femoral junction coordinates and the second rotation axis, includes: cropping the second rotated image according to the measured angle parameters to obtain various cross-sectional views, wherein each cross-sectional view includes the corresponding femoral junction coordinates; and obtaining the corresponding hip joint angle based on each of the femoral junction coordinates and the second rotation axis.
[0012] In one embodiment, after rotating the femoral image according to the first rotation axis and the first rotation angle to obtain the first rotated image, and before projecting the first rotation axis onto the second coordinate plane, the method further includes: obtaining a first transformation matrix according to the first rotation axis and the first rotation angle, so that the femoral image is rotated according to the first transformation matrix; and obtaining first endpoint coordinates according to the first transformation matrix and the coordinates of the endpoints of the axis.
[0013] In one embodiment, after rotating the first rotated image according to the second rotation axis and the second rotation angle to obtain the second rotated image, and before obtaining the femoral cross point coordinates according to the second rotated image, the method further includes: obtaining a second transformation matrix according to the second rotation axis and the second rotation angle, so that the first rotated image is rotated according to the second transformation matrix; and obtaining the second endpoint coordinates according to the second transformation matrix and the first endpoint coordinates.
[0014] In one embodiment, obtaining the corresponding hip joint angle based on the coordinates of each femoral intersection point and the second rotation axis includes: calculating a first length between the coordinates of each femoral intersection point and the coordinates of the center point of the femoral head, a second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and a third length between the coordinates of the center point of the femoral head and the coordinates of the second endpoint; and obtaining the corresponding hip joint angle based on the first length, the second length, and the third length.
[0015] On the other hand, a device for measuring hip joint angle is provided, the device comprising:
[0016] An image preprocessing module is used to acquire a femoral image and obtain the femoral midline based on the femoral image, wherein the femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline;
[0017] A first projection module is used to project the femoral midline onto a first coordinate plane to obtain a first rotation angle, and rotate the femoral image according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes a first rotation midline;
[0018] The second projection module is used to project the first rotation axis onto the second coordinate plane to obtain a second rotation angle, and rotate the first rotation image according to the second rotation angle to obtain a second rotation image, wherein the second rotation image includes the second rotation axis;
[0019] An angle calculation module is used to obtain the coordinates of the femoral intersection point based on the second rotated image, and to obtain the hip joint angle based on the coordinates of the femoral intersection point and the second rotation axis.
[0020] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0021] Acquire a femoral image, and obtain the femoral midline based on the femoral image, wherein the femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline;
[0022] The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline.
[0023] The first rotation axis is projected onto the second coordinate plane to obtain the second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis.
[0024] The femoral junction coordinates are obtained from the second rotation image, and the hip joint angle is obtained from the femoral junction coordinates and the second rotation axis.
[0025] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0026] Acquire a femoral image, and obtain the femoral midline based on the femoral image, wherein the femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline;
[0027] The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline.
[0028] The first rotation axis is projected onto the second coordinate plane to obtain the second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis.
[0029] The femoral junction coordinates are obtained from the second rotation image, and the hip joint angle is obtained from the femoral junction coordinates and the second rotation axis.
[0030] The aforementioned method, apparatus, computer equipment, and storage medium for measuring hip joint angles obtain a first rotation angle by projecting the femoral midline onto a first coordinate plane, rotating the femoral image for the first time based on the first rotation angle, then projecting the rotated first rotation midline onto a second coordinate plane to obtain a second rotation angle, and rotating the femoral image for the second time based on the second rotation angle, thereby rotating the femoral image to a standard position. The hip joint angle is then calculated based on the femoral image in the standard position, thereby quantifying the hip joint angle and improving the accuracy of hip joint angle measurement. Attached Figure Description
[0031] Figure 1 This is a diagram illustrating the application environment of a hip joint angle measurement method in one embodiment.
[0032] Figure 2 This is a flowchart illustrating a method for measuring hip joint angle in one embodiment;
[0033] Figure 3 This is a schematic diagram of the process for obtaining the first rotated image in one embodiment;
[0034] Figure 4 This is a schematic diagram of the process for obtaining the second rotated image in one embodiment;
[0035] Figure 5 This is a flowchart illustrating the process of obtaining hip joint angles in various cross-sectional views in one embodiment;
[0036] Figure 6 This is a schematic diagram of the process for obtaining the coordinates of the first endpoint in one embodiment;
[0037] Figure 7 This is a schematic diagram of the process for obtaining the coordinates of the second endpoint in one embodiment;
[0038] Figure 8 This is a flowchart illustrating the process of obtaining hip joint angles in various cross-sectional views in another embodiment;
[0039] Figure 9 This is a schematic diagram of the first rotation angle in the coordinate plane in one embodiment;
[0040] Figure 10 This is a schematic diagram of the second rotation angle in the coordinate plane in one embodiment;
[0041] Figure 11 This is a structural block diagram of a device for measuring hip joint angle in one embodiment;
[0042] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] In the three-dimensional coordinate system involved in the embodiments of this application, the x-axis direction refers to the direction perpendicular to the sagittal section and parallel to the transverse section and coronal section; the y-axis direction refers to the direction perpendicular to the coronal section and parallel to the sagittal section and transverse section; and the z-axis direction refers to the direction perpendicular to the transverse section and parallel to the sagittal section and coronal section.
[0045] Since the embodiments of this application involve a large number of technical terms, for ease of understanding, the relevant terms and concepts that may be involved in the embodiments of this application will be introduced below.
[0046] 1. Hip joint angle
[0047] Hip joint angles, including the CE angle and α angle, are indicators used for the diagnosis and treatment of FAI. According to the definitions of the CE angle and α angle, the CE angle and α angle are complementary.
[0048] 2. CE angle
[0049] The CE angle, or Wiberg central-edge angle, is the angle between the perpendicular line from the center of the femoral head and the outer edge of the acetabulum. The CE angle can be used to evaluate the relationship between the femoral head and the acetabulum.
[0050] 3. Angle α
[0051] The α angle refers to the angle between the line connecting the center point of the femoral head and the point where the femoral head and neck meet, and the midline of the femur. When the α angle is greater than 50°, FAI can be considered.
[0052] 4. Femoral midline
[0053] The femoral midline refers to the midline between the femoral head and neck, which can be determined by the center of the femoral head and specific points on the femoral neck.
[0054] 5. Cross section
[0055] A cross-section is one of the planes in the anatomical coordinate system. It is parallel to the ground and separates the human body image vertically in tomographic scan data.
[0056] 6. Sagittal plane
[0057] The sagittal plane is one of the planes in the anatomical coordinate system. It is perpendicular to the ground and separates the human body image from left to right in tomographic scan data.
[0058] 7. Coronal plane
[0059] The coronal plane is one of the planes in the anatomical coordinate system. It is perpendicular to the ground and separates the human body image from front to back in tomographic scan data.
[0060] The method for measuring hip joint angle provided in this application can be applied to, for example... Figure 1 The application environment shown is illustrated. Terminal 102 and server 104 communicate via a network. This application can be used in the diagnosis and treatment of femoral head injury (FAI) by rotating the femoral image twice in a three-dimensional coordinate system, adjusting the coordinates of the femoral midline and the center point of the femoral head, to bring the image to a standard position. This quantifies the hip joint angle and improves the accuracy of hip joint angle measurement. Terminal 102 can be, but is not limited to, various personal computers or laptops, and server 104 can be a standalone server or a server cluster consisting of multiple servers.
[0061] In one embodiment, such as Figure 2As shown, a method for measuring hip joint angle is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0062] Step 201: Obtain a femoral image and obtain the femoral midline based on the femoral image. The femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline.
[0063] Step 202: Project the femoral midline onto the first coordinate plane to obtain a first rotation angle. Rotate the femoral image according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline.
[0064] Step 203: Project the first rotation axis onto the second coordinate plane to obtain the second rotation angle, and rotate the first rotation image according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis;
[0065] Step 204: Obtain the coordinates of the femoral intersection point based on the second rotation image, and obtain the hip joint angle based on the coordinates of the femoral intersection point and the second rotation axis.
[0066] The hip joint angle refers to the CE angle or α angle of the hip joint. According to the definition of the CE angle or α angle, it is necessary to obtain the coordinates of the femoral head center point and the location of the femoral midline before measuring the hip joint angle. In step 201, it is illustrated by example that a femoral image is acquired and the femoral midline is obtained from the femoral image. The femoral midline includes the coordinates of the femoral head center point and the coordinates of the midline endpoint. For example, the hip joint image can be acquired by equipment such as computed tomography (CT) or magnetic resonance imaging (MRI), and the hip joint image can be segmented by manual annotation to obtain the segmented femoral image. At the same time, due to the anisotropic nature of the tomographic image, isotropic preprocessing can be performed on the femoral image to facilitate subsequent processing. Based on the geometric characteristics of a straight line between two points, the location of the femoral midline can be determined using the center point of the femoral head and the other endpoint on the femoral midline. Since the shape of the femoral head surface approximates a sphere, the acquired femoral image can be converted into a point cloud for spherical fitting. The coordinates of the femoral head center point can be obtained from the spherical fitting result. The coordinates of the other endpoint on the femoral midline, i.e., the midline endpoint coordinates, can be determined by extracting a portion of the femoral neck point cloud data and calculating the average coordinates of these portions. Determining the coordinates of the femoral head center point and the location of the femoral midline through spherical fitting avoids errors from manual positioning and further improves the accuracy of the femoral head center point and femoral midline location.
[0067] To quantify the hip joint angle, the obtained femoral image needs to be rotated to a standard position, which includes two rotations. In step 202, for example, the femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to this first rotation angle to obtain a first rotated image. This first rotated image includes the first rotation midline. For instance, the femoral image's position in the three-dimensional coordinate system is not fixed, which makes it difficult to accurately diagnose and treat FAI based on the measurement results when measuring the hip joint angle of the femoral image. Therefore, each femoral image needs to be rotated to a standard position. This standard position can be the position where the femoral midline is parallel to the XOY and YOZ planes in the three-dimensional coordinate system. In the first rotation, the femoral midline is made parallel to the YOZ plane. Specifically, the femoral midline can be projected onto the XOY plane. Assume the homogeneous coordinates of the femoral head center point are A(x...). a ,y a ,z a ,1), the homogeneous coordinates of the endpoints of the central axis are B(x b ,y b ,z b ,1), then the femoral midline is projected onto the first coordinate plane, i.e., the plane XOY, as follows. Figure 9 As shown, the corresponding A'(x) will be obtained. a ,y a ) and B'(x b ,y b The first rotation angle can be obtained through the following mathematical expression: The femoral image is rotated for the first time based on θ1. Given an arbitrary axis passing through the origin... The mathematical expression for rotating by any angle θ is:
[0068]
[0069] in, Let be a unit vector. The translation matrix for translating x units along the X-axis, y units along the Y-axis, and z units along the Z-axis is:
[0070]
[0071] When performing the first rotation on the femoral image, we can use a straight line passing through point A and parallel to the Z-axis as the first rotation axis. Then, the coordinates of point A remain unchanged after the rotation, and the vector of the first rotation axis is... The transformation matrix for rotation is:
[0072]
[0073] Based on the transformation matrix described above, the coordinates of the first endpoint B1(x) obtained after rotation of point B are... b1 ,y b1 ,z b1 The mathematical expression for ,1) is: B1=T1B.
[0074] After the first rotation, the first rotation axis is determined to be AB1. A second rotation is then performed based on AB1. In step 203, for example, the first rotation axis is projected onto a second coordinate plane to obtain a second rotation angle. The first rotation image is then rotated according to this second rotation angle to obtain a second rotation image. The second rotation image includes the second rotation axis. For instance, based on the rotation result described above, the first rotation axis, AB1, can be projected onto the YOZ plane. Figure 10 As shown, this yields A(y). a ,z a ) and B" (y b1 ,z b1 The second rotation angle can be obtained through the following mathematical expression: Based on θ2, the first rotated image is rotated a second time. Similarly, using the straight line passing through point A and parallel to the X-axis as the rotation axis, and through the same calculation algorithm as the first rotation, the transformation matrix T2 for the second rotation can be obtained. Then, B1 is rotated to obtain B2(x). b2 ,y b2 ,z b2 The mathematical expression for ,1) is: B2=T2B1=T2T1B.
[0075] The second rotation axis is obtained by means of the above method, which is parallel to the planes XOY and YOZ, i.e., the standard position of the femoral image. The hip joint angle can then be quantified based on this standard position. In step 204, for example, the femoral intersection coordinates are obtained from the second rotation image, and the hip joint angle is obtained from the femoral intersection coordinates and the second rotation axis. For instance, the femoral intersection coordinates refer to the coordinates of the intersection of the bone at the femoral head-neck junction. From a certain cross-section of the femoral image, it is the coordinates of the intersection of the spherical cross-section of the femoral head (after spherical fitting) and the femoral surface. According to this definition, the femoral intersection coordinates C(x) can be obtained through an image algorithm. c ,y c Then the mathematical expression for angle α is: in, These represent the lengths of line segments AC, AB2, and B2C, respectively. In some implementations, to improve the accuracy of hip joint angle measurement, a cross-section of the second rotated image can be obtained every 5 degrees, and the hip joint angle can be measured.
[0076] The above method first changes the manual measurement of the femoral center point coordinates and femoral midline to a point cloud data spherical fitting method for positioning. Secondly, the femoral image is rotated to a standard position through two rotations to quantify the hip joint angle, thereby improving the measurement accuracy.
[0077] In one embodiment, such as Figure 3 As shown, the femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image. The first rotated image includes a first rotation midline, comprising:
[0078] Step 301: Establish a first rotation axis using the coordinates of the femoral head center point, so that the first rotation axis is perpendicular to the first coordinate plane;
[0079] Step 302: Rotate the femoral image according to the first rotation axis and the first rotation angle to obtain the first rotated image.
[0080] In step 301, it is exemplarily explained that a first rotation axis is established using the coordinates of the femoral head center point, such that the first rotation axis is perpendicular to the first coordinate plane. For example, the two rotations of the femoral image are performed using a rotation axis established with the coordinates of the femoral head center point as the center. In the first rotation, the femoral midline is projected onto the first coordinate plane. The first rotation axis can then be an axis passing through the coordinates of the femoral head center point and perpendicular to the first coordinate plane. For instance, in the first rotation, the femoral midline is made parallel to the plane YOZ. Specifically, the femoral midline can be projected onto the plane XOY. Assuming the homogeneous coordinates of the femoral head center point are A(x... a ,y a ,z a If ,1), then the vector of the first rotation axis is .
[0081] In step 302, it is exemplarily explained that the femoral image is rotated according to the first rotation axis and the first rotation angle to obtain a first rotated image. For example, the mathematical expression of the rotation matrix for the first rotation angle θ1 is:
[0082]
[0083] The translation matrix for translating x units along the X-axis, y units along the Y-axis, and z units along the Z-axis is:
[0084]
[0085] The transformation matrix of the rotation is:
[0086]
[0087] Based on the transformation matrix described above, the coordinates of the first endpoint B1(x) obtained after rotation of point B are... b1 ,y b1 ,z b1 The mathematical expression for ,1) is: B1=T1B.
[0088] In one embodiment, such as Figure 4 As shown, the first rotation axis is projected onto the second coordinate plane to obtain a second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain a second rotation image. The second rotation image includes the second rotation axis, which includes:
[0089] Step 401: Establish a second rotation axis using the coordinates of the femoral head center point, so that the second rotation axis is perpendicular to the second coordinate plane;
[0090] Step 402: Rotate the first rotated image according to the second rotation axis and the second rotation angle to obtain the second rotated image.
[0091] In step 401, it is exemplarily explained that a second rotation axis is established through the coordinates of the femoral head center point so that the second rotation axis is perpendicular to the second coordinate plane. For example, the purpose of the second rotation of the femoral image is to make the femoral midline parallel to the plane XOY. Therefore, a second rotation axis perpendicular to the plane YOZ can be established through the femoral center point A.
[0092] In step 402, it is exemplarily explained that the first rotated image is rotated according to the second rotation axis and the second rotation angle to obtain the second rotated image. For example, the first rotation axis, i.e., AB1, can be projected onto the plane YOZ to obtain A(y). a ,z a ) and B" (y b1 ,z b1 The second rotation angle can be obtained through the following mathematical expression: The transformation matrix for the second rotation of the first rotated image based on θ2 is:
[0093]
[0094] In one embodiment, such as Figure 5 As shown, the coordinates of the femoral intersection point are obtained based on the second rotation image, and the hip joint angle is obtained based on the coordinates of the femoral intersection point and the second rotation axis, including:
[0095] Step 501: The second rotated image is cropped according to the measured angle parameters to obtain various cross-sectional views, wherein each cross-sectional view includes the corresponding femoral junction coordinates;
[0096] Step 502: Obtain the corresponding hip joint angles based on the coordinates of each femoral intersection point and the second rotation axis.
[0097] In steps 501 to 502, it is exemplarily explained that the second rotated image is cropped according to the measurement angle parameters to obtain various cross-sectional views. Each cross-sectional view includes the corresponding femoral junction coordinates. Based on the femoral junction coordinates and the second rotation axis, the corresponding hip joint angle is obtained. For example, the femoral image obtained by CT or other equipment is a three-dimensional image. When measuring the hip joint angle, it is necessary to obtain the cross-sectional view of the femoral image. In this embodiment, it is necessary to obtain the cross-sectional view of the second rotated image. At the same time, in order to improve the accuracy of FAI diagnosis and treatment, the cross-sectional view of the second rotated image can be cropped according to the preset measurement angle parameters. In some implementations, the measurement angle parameter can be set to 5°. Then, a cross-sectional view of the second rotated image is obtained every 5° for measurement. Since the second rotation axis of each obtained cross-sectional view is unchanged, the corresponding hip joint angle of each cross-sectional view can be obtained by obtaining the femoral junction coordinates of each cross-sectional view through the image algorithm. Since the second rotated image is a standard position image obtained after rotation, the doctor can determine the specific location of the hip joint deformity part based on the hip joint angle of each cross-sectional view and perform a dermabrasion surgery.
[0098] In one embodiment, such as Figure 6 As shown, after rotating the femoral image according to the first rotation axis and the first rotation angle to obtain the first rotated image, and before projecting the first rotation axis onto the second coordinate plane, the process further includes:
[0099] Step 601: Obtain a first transformation matrix based on the first rotation axis and the first rotation angle, so that the femoral image is rotated according to the first transformation matrix;
[0100] Step 602: Obtain the coordinates of the first endpoint based on the first transformation matrix and the coordinates of the endpoints of the central axis.
[0101] In steps 601 to 602, it is exemplarily explained that the coordinates of the first endpoint are obtained based on the first rotated image and the coordinates of the endpoint of the femoral head. For example, in the first rotation, the femoral midline is made parallel to the plane YOZ. Specifically, the femoral midline can be projected onto the plane XOY. Assume the homogeneous coordinates of the center point of the femoral head are A(x). a ,y a ,z a ,1), the homogeneous coordinates of the endpoints of the central axis are B(x b ,y b ,z b If ,1), then the vector of the first rotation axis is The mathematical expression for the rotation matrix of the first rotation angle θ1 is:
[0102]
[0103] The translation matrix for translating x units along the X-axis, y units along the Y-axis, and z units along the Z-axis is:
[0104]
[0105] The first transformation matrix of the rotation is:
[0106]
[0107] Based on the first transformation matrix described above, the coordinates of the first endpoint B1(x) obtained after rotation of point B are... b1 ,y b1 ,z b1 The mathematical expression for ,1) is: B1=T1B.
[0108] In one embodiment, such as Figure 7 As shown, after rotating the first rotation image according to the second rotation axis and the second rotation angle to obtain the second rotation image, and before obtaining the coordinates of the femoral cross point from the second rotation image, the process further includes:
[0109] Step 701: Obtain a second transformation matrix based on the second rotation axis and the second rotation angle, so that the first rotated image is rotated according to the second transformation matrix;
[0110] Step 702: Obtain the coordinates of the second endpoint based on the second transformation matrix and the coordinates of the first endpoint.
[0111] In steps 701 to 702, it is exemplarily explained that a second transformation matrix is obtained based on a second rotation angle and a second rotation axis; the second endpoint coordinates are obtained based on the second transformation matrix and the first endpoint coordinates, for example, by projecting the first rotation axis, AB1, onto the YOZ plane to obtain A(y a ,z a ) and B" (y b1 ,z b1 The second rotation angle can be obtained through the following mathematical expression: Based on θ2, a second rotation is performed on the first rotated image. Similarly, using the straight line passing through point A and parallel to the X-axis as the rotation axis, the second transformation matrix for the second rotation can be obtained through the same calculation algorithm as the first rotation.
[0112]
[0113] Then B1 is rotated to obtain B2(x) b2 ,yb2 ,z b2 The mathematical expression for ,1) is: B2=T2B1=T2T1B.
[0114] In one embodiment, such as Figure 8 As shown, based on the coordinates of each femoral intersection point and the second rotational axis, the corresponding hip joint angles are obtained, including:
[0115] Step 801: Calculate the first length between the coordinates of each femoral intersection point and the coordinates of the center point of the femoral head, the second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and the third length between the coordinates of the center point of the femoral head and the second endpoint.
[0116] Step 802: Obtain the corresponding hip joint angle based on the first length, the second length, and the third length.
[0117] In steps 801 to 802, it is exemplarily explained that the first length between the coordinates of each femoral intersection point and the coordinates of the femoral head center point, the second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and the third length between the coordinates of the femoral head center point and the coordinates of the second endpoint are calculated respectively. Based on the first length, the second length, and the third length, the corresponding hip joint angle is obtained. For example, according to the definition of femoral intersection point coordinates, the coordinates of each femoral intersection point can be obtained through image algorithms. Connecting the coordinates of the femoral intersection points, the coordinates of the femoral head center point, and the coordinates of the second endpoint forms triangle AB2C. Then, angle α is angle B2AC. Therefore, the mathematical expression for angle α is: in, Let A be the length of line segments AC, AB2, and B2C, respectively. For example, in a certain cross-section, the coordinates of the center point of the femoral head are A(x). a ,y a The coordinates of the second endpoint are B2(x). b2 ,y b2 The coordinates of the femoral junction are C(x). C ,y C ),but
[0118] It should be understood that, although Figure 1-8 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-8At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0119] In one embodiment, such as Figure 11 As shown, a device for measuring hip joint angles is provided, comprising: an image preprocessing module, a first projection module, a second projection module, and an angle calculation module, wherein:
[0120] The image preprocessing module is used to acquire a femoral image and obtain the femoral midline based on the femoral image. The femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline.
[0121] The first projection module is used to project the femoral midline onto the first coordinate plane to obtain a first rotation angle, and rotate the femoral image according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline;
[0122] The second projection module is used to project the first rotation axis onto the second coordinate plane to obtain the second rotation angle, and rotate the first rotation image according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis;
[0123] An angle calculation module is used to obtain the coordinates of the femoral intersection point based on the second rotation image, and to obtain the hip joint angle based on the coordinates of the femoral intersection point and the second rotation axis.
[0124] Optionally, the first projection module is further configured to establish a first rotation axis through the coordinates of the femoral head center point, so that the first rotation axis is perpendicular to the first coordinate plane; and to rotate the femoral image according to the first rotation axis and the first rotation angle to obtain a first rotated image.
[0125] Optionally, the second projection module is further configured to establish a second rotation axis through the coordinates of the femoral head center point, so that the second rotation axis is perpendicular to the second coordinate plane; and to rotate the first rotation image according to the second rotation axis and the second rotation angle to obtain the second rotation image.
[0126] Optionally, the angle calculation module is also used to crop the second rotation image according to the measured angle parameters to obtain various cross-sectional views, wherein each cross-sectional view includes the corresponding femoral junction coordinates; and to obtain the corresponding hip joint angle based on the coordinates of each femoral junction and the second rotation axis.
[0127] Optionally, the first projection module is further configured to obtain a first transformation matrix based on the first rotation axis and the first rotation angle, so that the femoral image is rotated according to the first transformation matrix; and to obtain the first endpoint coordinates based on the first transformation matrix and the coordinates of the midline endpoint.
[0128] Optionally, the second projection module is further configured to obtain a second transformation matrix based on the second rotation axis and the second rotation angle, so that the first rotated image is rotated according to the second transformation matrix; and to obtain the second endpoint coordinates based on the second transformation matrix and the first endpoint coordinates.
[0129] Optionally, the second projection module is also used to calculate the first length between the coordinates of each femoral intersection point and the coordinates of the center point of the femoral head, the second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and the third length between the coordinates of the center point of the femoral head and the coordinates of the second endpoint; and to obtain the corresponding hip joint angle based on the first length, the second length, and the third length.
[0130] Specific limitations regarding the device for measuring hip joint angles can be found in the limitations of the method for measuring hip joint angles described above, and will not be repeated here. Each module in the aforementioned device for measuring hip joint angles can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0131] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data related to hip joint angle measurements. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for hip joint angle measurement.
[0132] Those skilled in the art will understand that Figure 12The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0134] Obtain a femoral image and obtain the femoral midline based on the femoral image. The femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline.
[0135] The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline.
[0136] The first rotation axis is projected onto the second coordinate plane to obtain the second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis.
[0137] The coordinates of the femoral intersection are obtained from the second rotation image, and the hip joint angle is obtained from the coordinates of the femoral intersection and the second rotation axis.
[0138] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0139] A first rotation axis is established using the coordinates of the femoral head center point, such that the first rotation axis is perpendicular to the first coordinate plane; the femoral image is rotated according to the first rotation axis and the first rotation angle to obtain a first rotated image.
[0140] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0141] A second rotation axis is established using the coordinates of the femoral head center point, such that the second rotation axis is perpendicular to the second coordinate plane; the first rotation image is rotated according to the second rotation axis and the second rotation angle to obtain the second rotation image.
[0142] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0143] The second rotation image is cropped according to the measured angle parameters to obtain various cross-sectional views, each of which includes the corresponding femoral junction coordinates; the corresponding hip joint angle is obtained based on the coordinates of each femoral junction and the second rotation axis.
[0144] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0145] A first transformation matrix is obtained based on the first rotation axis and the first rotation angle, so that the femoral image is rotated according to the first transformation matrix; the first endpoint coordinates are obtained based on the first transformation matrix and the coordinates of the midline endpoint.
[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0147] A second transformation matrix is obtained based on the second rotation axis and the second rotation angle, so that the first rotated image is rotated according to the second transformation matrix; the second endpoint coordinates are obtained based on the second transformation matrix and the first endpoint coordinates.
[0148] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0149] Calculate the first length between the coordinates of each femoral intersection point and the coordinates of the center point of the femoral head, the second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and the third length between the coordinates of the center point of the femoral head and the second endpoint; obtain the corresponding hip joint angle based on the first length, the second length, and the third length.
[0150] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0151] Obtain a femoral image and obtain the femoral midline based on the femoral image. The femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline.
[0152] The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline.
[0153] The first rotation axis is projected onto the second coordinate plane to obtain the second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis.
[0154] The coordinates of the femoral intersection are obtained from the second rotation image, and the hip joint angle is obtained from the coordinates of the femoral intersection and the second rotation axis.
[0155] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0156] A first rotation axis is established using the coordinates of the femoral head center point, such that the first rotation axis is perpendicular to the first coordinate plane; the femoral image is rotated according to the first rotation axis and the first rotation angle to obtain a first rotated image.
[0157] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0158] A second rotation axis is established using the coordinates of the femoral head center point, such that the second rotation axis is perpendicular to the second coordinate plane; the first rotation image is rotated according to the second rotation axis and the second rotation angle to obtain the second rotation image.
[0159] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0160] The second rotation image is cropped according to the measured angle parameters to obtain various cross-sectional views, each of which includes the corresponding femoral junction coordinates; the corresponding hip joint angle is obtained based on the coordinates of each femoral junction and the second rotation axis.
[0161] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0162] A first transformation matrix is obtained based on the first rotation axis and the first rotation angle, so that the femoral image is rotated according to the first transformation matrix; the first endpoint coordinates are obtained based on the first transformation matrix and the coordinates of the midline endpoint.
[0163] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0164] A second transformation matrix is obtained based on the second rotation axis and the second rotation angle, so that the first rotated image is rotated according to the second transformation matrix; the second endpoint coordinates are obtained based on the second transformation matrix and the first endpoint coordinates.
[0165] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0166] Calculate the first length between the coordinates of each femoral intersection point and the coordinates of the center point of the femoral head, the second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and the third length between the coordinates of the center point of the femoral head and the second endpoint; obtain the corresponding hip joint angle based on the first length, the second length, and the third length.
[0167] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0168] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0169] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for measuring hip joint angle, characterized in that, include: A femoral image is acquired, and the femoral midline is obtained based on the femoral image, wherein the femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline; the femoral image is a three-dimensional image. The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes the first rotation midline. The first rotation axis is projected onto the second coordinate plane to obtain the second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain the second rotation image, wherein the second rotation image includes the second rotation axis. The femoral junction coordinates are obtained based on the second rotation image, and the hip joint angle is obtained based on the femoral junction coordinates and the second rotation axis. The step of obtaining the femoral junction coordinates based on the second rotated image, and obtaining the hip joint angle based on the femoral junction coordinates and the second rotation axis, includes: The second rotated image is cropped according to the measured angle parameters to obtain various cross-sectional views, wherein each cross-sectional view includes the corresponding femoral junction coordinates; Based on the coordinates of each of the femoral junctions and the second rotation axis, the hip joint angles corresponding to each of the cross-sectional views are obtained.
2. The method for measuring hip joint angle as described in claim 1, characterized in that, The femoral midline is projected onto a first coordinate plane to obtain a first rotation angle. The femoral image is then rotated according to the first rotation angle to obtain a first rotated image. The first rotated image includes a first rotation midline, comprising: A first axis of rotation is established using the coordinates of the femoral head center point, such that the first axis of rotation is perpendicular to the first coordinate plane; The femoral image is rotated according to the first rotation axis and the first rotation angle to obtain the first rotated image.
3. The method for measuring hip joint angle as described in claim 1, characterized in that, The first rotation axis is projected onto the second coordinate plane to obtain a second rotation angle. The first rotation image is then rotated according to the second rotation angle to obtain a second rotation image, wherein the second rotation image includes a second rotation axis, comprising: A second rotation axis is established using the coordinates of the femoral head center point, such that the second rotation axis is perpendicular to the second coordinate plane; The first rotated image is rotated according to the second rotation axis and the second rotation angle to obtain the second rotated image.
4. The method for measuring hip joint angle as described in claim 2, characterized in that, After rotating the femoral image according to the first rotation axis and the first rotation angle to obtain the first rotated image, and before projecting the first rotation axis onto the second coordinate plane, the method further includes: A first transformation matrix is obtained based on the first rotation axis and the first rotation angle, so that the femoral image is rotated according to the first transformation matrix; The coordinates of the first endpoint are obtained based on the first transformation matrix and the coordinates of the endpoints of the central axis.
5. The method for measuring hip joint angle as described in claim 3, characterized in that, After rotating the first rotation image according to the second rotation axis and the second rotation angle to obtain the second rotation image, and before obtaining the femoral cross-section coordinates according to the second rotation image, the method further includes: A second transformation matrix is obtained based on the second rotation axis and the second rotation angle, so that the first rotated image is rotated according to the second transformation matrix; The coordinates of the second endpoint are obtained based on the second transformation matrix and the coordinates of the first endpoint.
6. The method for measuring hip joint angle as described in claim 1, characterized in that, Based on the coordinates of each of the femoral junctions and the second rotational axis, the corresponding hip joint angles are obtained, including: The first length between the coordinates of each femoral intersection point and the coordinates of the center point of the femoral head, the second length between the coordinates of each femoral intersection point and the coordinates of the second endpoint, and the third length between the coordinates of the center point of the femoral head and the second endpoint are calculated respectively. The corresponding hip joint angle is obtained based on the first length, the second length, and the third length.
7. A device for measuring hip joint angle, characterized in that, include: An image preprocessing module is used to acquire a femoral image and obtain the femoral midline based on the femoral image, wherein the femoral midline includes the coordinates of the center point of the femoral head and the coordinates of the endpoints of the midline; the femoral image is a three-dimensional image. A first projection module is used to project the femoral midline onto a first coordinate plane to obtain a first rotation angle, and rotate the femoral image according to the first rotation angle to obtain a first rotated image, wherein the first rotated image includes a first rotation midline; The second projection module is used to project the first rotation axis onto the second coordinate plane to obtain a second rotation angle, and rotate the first rotation image according to the second rotation angle to obtain a second rotation image, wherein the second rotation image includes the second rotation axis; An angle calculation module is used to obtain the femoral intersection coordinates based on the second rotated image, and to obtain the hip joint angle based on the femoral intersection coordinates and the second rotation axis. The step of obtaining the femoral intersection coordinates based on the second rotated image and obtaining the hip joint angle based on the femoral intersection coordinates and the second rotation axis includes: cropping the second rotated image according to measured angle parameters to obtain various cross-sectional views, wherein each cross-sectional view includes corresponding femoral intersection coordinates; and obtaining the hip joint angle corresponding to each cross-sectional view based on each femoral intersection coordinate and the second rotation axis.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Three-dimensional gesture posture prediction method based on two-dimensional image
CN110147767A
Adult hip joint angle acquisition method based on DR image
CN112617870A