Computer-readable storage medium, spinal posture determination method and device
By extracting contour curves from images and dividing the curves according to their discreteness, the problem of low efficiency in spinal pose detection is solved, and fast and accurate spinal pose determination is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
- Filing Date
- 2022-07-22
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, spinal posture detection via image measurement is time-consuming, resulting in low efficiency in spinal posture determination.
By acquiring the contour curve in the target image, the first and second pixel points that meet the preset height conditions are determined. The target curve is truncated based on the degree of discreteness, and the curve is divided into the first curve and the second curve according to the position of the target spine in the curve, thereby determining the spine posture.
It improves the efficiency of spinal posture determination, avoids multiple measurement steps, and can accurately assess spinal posture while reducing radiation damage.
Smart Images

Figure CN117474829B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of spinal detection technology, and in particular to a computer-readable storage medium, a method for determining spinal posture, an apparatus, a computer device, and a computer program product. Background Technology
[0002] With the development of posture detection technology, image measurement is often used to detect the posture of the spine. Image measurement involves using medical imaging equipment to detect the posture of the spine in the area under test.
[0003] However, medical imaging equipment takes a long time to perform posture detection via image measurement, making it difficult to quickly determine the posture of a large number of spinal regions. Therefore, there is a problem of low efficiency in determining spinal posture. Summary of the Invention
[0004] Therefore, it is necessary to provide a computer-readable storage medium, a method for determining spinal posture, an apparatus, a computer device, and a computer program product that can improve the efficiency of spinal posture determination in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0006] A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine;
[0007] Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point;
[0008] Based on the degree of dispersion between the first pixel and each second pixel, a target curve that satisfies the non-discrete condition and includes the first pixel is extracted from the contour curve.
[0009] Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve;
[0010] The posture of the target spine is determined based on the first curve and the second curve.
[0011] Secondly, this application provides a method for determining spinal posture. The method includes:
[0012] A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine;
[0013] Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point;
[0014] Based on the degree of dispersion between the first pixel and each second pixel, a target curve that satisfies the non-discrete condition and includes the first pixel is extracted from the contour curve.
[0015] Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve;
[0016] The posture of the target spine is determined based on the first curve and the second curve.
[0017] Thirdly, this application also provides a spinal posture determination device. The device includes:
[0018] An extraction module is used to acquire a target image obtained by image acquisition of a target part of a target object, and to extract the contour curve corresponding to the target part in the target image; the target part includes the target spine;
[0019] The determining module is used to determine the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point;
[0020] The cropping module is used to extract a target curve from the contour curve that satisfies the non-discrete condition and includes the first pixel, based on the degree of dispersion between the first pixel and each second pixel.
[0021] The segmentation module is used to divide the target curve into a first curve and a second curve based on the position of the target spine in the target curve;
[0022] The determining module is further configured to determine the posture of the target spine based on the first curve and the second curve.
[0023] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0024] A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine;
[0025] Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point;
[0026] Based on the degree of dispersion between the first pixel and each second pixel, a target curve that satisfies the non-discrete condition and includes the first pixel is extracted from the contour curve.
[0027] Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve;
[0028] The posture of the target spine is determined based on the first curve and the second curve.
[0029] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0030] A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine;
[0031] Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point;
[0032] Based on the degree of dispersion between the first pixel and each second pixel, a target curve that satisfies the non-discrete condition and includes the first pixel is extracted from the contour curve.
[0033] Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve;
[0034] The posture of the target spine is determined based on the first curve and the second curve.
[0035] The aforementioned computer-readable storage medium, spinal posture determination method, apparatus, computer equipment, and computer program products rapidly acquire contour curves corresponding to target areas through image acquisition, simplifying the steps of information acquisition for target areas and avoiding damage caused by radioactive detection of target areas. By using preset height conditions, each pixel on the contour curve is distinguished into a first pixel that meets the preset height conditions and a second pixel other than the first pixel, thereby determining the degree of dispersion between the first pixel and each second pixel. In this way, the degree of dispersion can accurately reflect the concentrated distribution of each pixel in the contour curve. By extracting a target curve from the contour curve that meets the non-discrete conditions and includes the first pixel, it is ensured that the pixels constituting the target curve are concentratedly distributed. Based on the position of the target spine in the target curve, a first curve and a second curve located on both sides of the target spine can be determined, avoiding interference from the protruding structure of the target spine on posture determination, and further ensuring that the posture determined based on the first curve and the second curve can accurately simulate the posture determined based on the spinal curvature measuring ruler. This not only avoids the multiple measurement steps in actual operation, but also enables a true assessment of the target spine's posture, greatly improving the efficiency of determining the spine's posture. Attached Figure Description
[0036] Figure 1 This is a diagram illustrating the application environment of a computer-readable storage medium in one embodiment;
[0037] Figure 2 This is a diagram illustrating the application environment of a computer-readable storage medium in another embodiment;
[0038] Figure 3 This is a diagram illustrating the application environment of a computer-readable storage medium in another embodiment;
[0039] Figure 4 This is a schematic diagram of the execution steps of a computer-readable storage medium in one embodiment;
[0040] Figure 5 This is a schematic diagram of the target image in one embodiment;
[0041] Figure 6 This is a schematic diagram of the extraction results in one embodiment;
[0042] Figure 7 This is a schematic diagram of the contour curve in one embodiment;
[0043] Figure 8 This is a schematic diagram of the target curve in one embodiment;
[0044] Figure 9 This is a schematic diagram showing the distribution of the first and second curves in one embodiment;
[0045] Figure 10 This is a schematic diagram of the execution steps on a computer-readable storage medium in another embodiment;
[0046] Figure 11 This is a schematic diagram of the common tangent angle in one embodiment;
[0047] Figure 12 This is a schematic diagram comparing two straight lines used to determine the target spine posture in one embodiment;
[0048] Figure 13 This is a schematic diagram of the execution steps on a computer-readable storage medium in another embodiment;
[0049] Figure 14 This is a structural block diagram of a spinal posture determination device in one embodiment;
[0050] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] 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.
[0052] The computer-readable storage medium provided in the embodiments of this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network, and a data storage system can store data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Both terminal 102 and server 104 are equipped with computer-readable storage media, on which computer programs can be stored. Terminal 102, equipped with computer-readable storage media, can execute the computer program on the computer-readable storage media independently. Alternatively, server 104, equipped with computer-readable storage media, can execute the computer program on the computer-readable storage media independently. Alternatively, terminal 102 and server 104 can work together; for example, terminal 102 acquires an image of a target part of a target object, and server 104, equipped with computer-readable storage media, acquires the target image and executes the computer program. When the computer program is executed, it performs the following steps: acquiring the target image obtained by acquiring an image of the target part of the target object, and extracting the contour curve corresponding to the target part from the target image; the target part includes the target spine. A first pixel point satisfying a preset height condition and a second pixel point other than the first pixel point are identified in the contour curve. Based on the dispersion between the first pixel point and each second pixel point, a target curve satisfying a non-discrete condition and including the first pixel point is extracted from the contour curve. According to the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve. The posture of the target spine is determined based on the first curve and the second curve. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0053] It should be noted that if the computer-readable storage medium is deployed in terminal 102, such as Figure 2 As shown, the terminal could be, for example, a mobile phone with an app (Application) installed. The computer program stored in the app determines the orientation of the target spine. If the computer-readable storage medium is deployed on server 104, such as... Figure 3 As shown, the target image is obtained by acquiring images of the deployment location of the target object using a mobile phone, digital camera or other photographic equipment on the client side. A computer program is stored in a server 104 with a computer-readable storage medium. The computer program is executed by acquiring the target image sent by the client to determine the posture of the target spine.
[0054] In one embodiment, such as Figure 4 As shown, a computer-readable storage medium is provided, on which a computer program is stored. Taking the computer-readable storage medium deployed on a computer device (specifically, the computer device may be terminal 102 or server 104) as an example, when the computer program is executed by an executor, it performs the following steps:
[0055] Step S402: Obtain a target image by acquiring an image of the target part of the target object, and extract the contour curve corresponding to the target part in the target image; the target part includes the target spine.
[0056] The target body part can be the entire back of the target object, or a certain area of the back, without any specific limitation.
[0057] Specifically, a computer program stored on a computer-readable storage medium deployed on a computer device, when executed, acquires a target image of the target body part obtained by image acquisition of the target object in a target forward flexion posture, and determines a target extraction model from multiple preset extraction models based on extraction requirements. The target body part in the target image is extracted using the target extraction model to obtain the extraction result. The contour curve corresponding to the extraction result is then determined.
[0058] The target forward bending posture can be a stereo forward bending posture, a seated stereo forward bending posture, etc., without specific limitations. The extraction model can be an RGB color model (red, green, blue color model), a YCrCb elliptical skin tone model, a YCrCb color space with OTSU thresholding, or an HSV color space H-range filtering method. In YCrCb, Y can represent luminance, Cr reflects the difference between the red portion of the RGB input signal and the luminance value of the RGB signal, and Cb reflects the difference between the blue portion of the RGB input signal and the luminance value of the RGB signal. The YCrCb elliptical skin tone model determines whether the coordinates (Cr, Cb) are within an ellipse. YCrCb color space with OTSU thresholding refers to performing Otsu (self-binary thresholding) processing on Cr within the YCrCb color space. HSV (Hue, Saturation, Value) color space H-range filtering is a method for filtering the hue range within the HSV color space.
[0059] For example, acquiring a target image by photographing the back of the target object in a stereoscopic forward flexion posture (e.g., ...). Figure 5As shown in the image, the back is extracted from the target image using a YCrCb elliptical skin color model. Specifically, the target image is mapped from RGB space to YCrCb space to obtain the coordinates of each pixel value in the CrCb space. It is then determined whether the coordinates of each pixel value are inside an ellipse. Pixels inside the ellipse are designated as skin pixels, and those not inside are designated as non-skin pixels. The grayscale value of skin pixels is set to 1, and the grayscale value of non-skin pixels is set to 0, thus obtaining the extraction result. Figure 6 As shown, the edge extraction result is processed using an edge extraction algorithm to obtain the processed result. The top edge point in the processed result is set as the starting point, and a region growing algorithm is used for filtering to obtain the contour curve. The edge extraction algorithm can be the Sobel algorithm.
[0060] The process of mapping the target image from RGB space to YCrCb space can be achieved based on the following formula:
[0061] Y = 0.2990R + 0.5870G + 0.1140B
[0062] Cb=-0.1687R-0.3313G+0.5000B+128
[0063] Cr=0.5000R-0.4187G-0.0813B+128
[0064] In this diagram, R, G, and B represent the red, green, and blue components of the target image, respectively. Y represents brightness, Cr reflects the difference between the red portion of the RGB input signal and the brightness value of the RGB signal, and Cb reflects the difference between the blue portion of the RGB input signal and the brightness value of the RGB signal.
[0065] It should be noted that the result obtained through the edge extraction algorithm may contain interfering edges, such as... Figure 7 The black lines within the white area shown in the diagram create interfering edges. Therefore, the region growing algorithm can be used to remove these interfering edges, ensuring the effectiveness of the contour curve.
[0066] Step S404: Determine the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point.
[0067] The preset height condition is the condition for the height to reach a preset height. The preset height can be the maximum height, or it can be a first height that is less than the maximum height and the height difference between it and the maximum height is a preset value. The specific setting is not limited.
[0068] Specifically, a computer program stored on a computer-readable storage medium deployed on a computer device, when executed, determines the height information of each pixel in the contour curve and determines the maximum height based on the height information. A preset height condition is determined based on the maximum height. It then determines whether each pixel meets the preset height condition. If there is one pixel that meets the preset height condition, it is directly designated as the first pixel, and all other pixels are designated as second pixels. If there are at least two pixels that meet the preset height condition, the pixel that meets the preset height condition is designated as a pixel to be processed. Alternatively, a pixel can be arbitrarily selected from the multiple pixels to be processed as the first pixel, or the pixel located in the middle of the multiple pixels to be processed can be designated as the first pixel, and all other pixels are designated as second pixels.
[0069] For example, obtain the coordinate information of each pixel, including height information (which can be considered as information on the Y-axis) and displacement information (which can be considered as information on the X-axis). Determine the height information of each pixel in the contour curve, and based on each height information, determine the maximum height. If the preset height condition is that the height reaches the maximum height, determine whether there is only one pixel with the maximum height. If yes (i.e., there is only one pixel with the maximum height), directly use the pixel with the maximum height as the first pixel. If no (i.e., there are at least two pixels with the maximum height), use the pixel with the maximum height as the pixel to be processed, and arbitrarily select one pixel from the multiple pixels to be processed as the first pixel. Use all pixels other than the first pixel as the second pixel.
[0070] Alternatively, if the preset height condition is that the height reaches a first height, the pixel that reaches the first height is selected as the pixel to be processed, and one pixel is randomly selected from multiple pixels to be processed as the first pixel. Pixels other than the first pixel are selected as the second pixels.
[0071] Step S406: Based on the degree of dispersion between the first pixel and each second pixel, extract the target curve from the contour curve that satisfies the non-discrete condition and includes the first pixel.
[0072] The degree of dispersion characterizes whether the individual pixels are concentrated in one area, reflecting the differences between each pixel. The non-discrete condition is to determine whether the degree of dispersion between the individual pixels reaches a preset degree of dispersion. If the preset degree of dispersion is reached, it means that the degree of dispersion of each pixel is low. In this case, the individual pixels are concentrated in one area, and the curvature of the curve formed by the individual pixels is small.
[0073] Specifically, when a computer program stored on a computer-readable storage medium deployed on a computer device is executed, it determines the degree of dispersion between the first pixel and each of the second pixels based on the position information of the first pixel and the second pixel by means of at least one of variance calculation, difference calculation, and standard deviation calculation, and filters each of the second pixels based on the degree of dispersion to obtain a target curve that satisfies the non-discrete condition and includes the first pixel.
[0074] Alternatively, a computer program stored on a computer-readable storage medium deployed on a computer device, when executed, identifies multiple second pixels located to the left of the first pixel as left-side pixels and multiple second pixels located to the right of the first pixel as right-side pixels based on the position information of the first pixel. Based on the positions of each left-side pixel and the first pixel, left-side pixels satisfying non-discrete conditions are identified through at least one of variance calculation, difference calculation, and standard deviation calculation. Similarly, based on the positions of each right-side pixel and the first pixel, right-side pixels satisfying non-discrete conditions are identified through at least one of variance calculation, difference calculation, and standard deviation calculation. A target curve is determined based on the left-side pixels satisfying non-discrete conditions, the right-side pixels satisfying non-discrete conditions, and the first pixel.
[0075] For example, a computer program stored on a computer-readable storage medium deployed on a computer device, when executed, determines multiple current first pixels corresponding to the current iteration. Based on the positions of multiple current second pixels and the first pixel, it performs at least one of variance calculation, difference calculation, and standard deviation calculation to obtain a discrete result. This discrete result characterizes the degree of dispersion of each current second pixel and the first pixel. If the discrete result does not meet the non-discrete condition, the two current second pixels that are farthest apart are deleted from the multiple current second pixels to obtain updated second pixels. The process proceeds to the next iteration, and the updated second pixels are used as the current second pixels for the next iteration. The process returns to the step of performing at least one of variance calculation, difference calculation, and standard deviation calculation based on the positions of multiple current second pixels and the first pixel to obtain a discrete result, continuing until the non-discrete condition is met. The target curve is determined based on the current second pixels and the first pixel that meet the non-discrete condition. Here, the current first pixel represents the first pixel of the current iteration number. The two current second pixels that are farthest apart can be considered as the two pixels with the largest difference between their horizontal coordinates.
[0076] Alternatively, a computer program stored on a computer-readable storage medium deployed on a computer device, when executed, determines the left dynamic endpoint corresponding to the current first iteration. Based on the position of the left dynamic endpoint and the first pixel, it performs at least one of variance calculation, difference calculation, and standard deviation calculation to obtain a left discrete result. This left discrete result characterizes the degree of dispersion between each second pixel located to the left of the first pixel and the first pixel. If the left discrete result does not meet the non-discrete condition, a point that is a preset step size away from the left dynamic endpoint, or a point that is a preset number of second pixels away from the left dynamic endpoint, is used as the updated left dynamic endpoint. The process proceeds to the next round of the first iteration, and the updated left dynamic endpoint is used as the left dynamic endpoint for the next round of the first iteration. The process then returns to the step of performing at least one of variance calculation, difference calculation, and standard deviation calculation based on the position of the left dynamic endpoint and the first pixel to obtain a left discrete result, continuing until the non-discrete condition is met.
[0077] A computer program stored on a computer-readable storage medium deployed on a computer device, when executed, determines the right dynamic endpoint corresponding to the current second iteration. Based on the position of the right dynamic endpoint and the first pixel, it performs at least one of variance calculation, difference calculation, and standard deviation calculation to obtain a right discrete result. This right discrete result characterizes the degree of dispersion between each second pixel located to the right of the first pixel and the first pixel. If the right discrete result does not meet the non-discrete condition, a point that is a preset step size away from the right dynamic endpoint, or a point that is a preset number of second pixels away from the right dynamic endpoint, is used as the updated right dynamic endpoint. The process proceeds to the next round of the second iteration, using the updated right dynamic endpoint as the right dynamic endpoint for the next round of the second iteration. The process then returns to the step of performing at least one of variance calculation, difference calculation, and standard deviation calculation based on the position of the right dynamic endpoint and the first pixel to obtain a right discrete result, continuing until the non-discrete condition is met.
[0078] The target curve is determined based on the left dynamic endpoint, the right dynamic moving point, and the first pixel point that satisfy the non-discrete conditions.
[0079] Step S408: Based on the position of the target spine in the target curve, divide the target curve into a first curve and a second curve.
[0080] Specifically, a computer program stored on a computer-readable storage medium deployed on a computer device, when executed, determines a line segment of the target spine within the target curve based on the position of the target spine within the target curve. This line segment is then extracted from the target curve, dividing the target curve into a first curve and a second curve.
[0081] It should be noted that the length of this line segment represents the width of the target spine. Based on the position of the target spine on the back, this line segment can be considered to be located in the middle of the target curve, and its length is within a preset length. The preset length is determined by the product of the length of the target curve and a preset ratio, which can range from 0.23 to 0.28. Optionally, the line segment is located in the middle of the target curve, and its length is 1 / 4 of the length of the target curve. The target curve is as follows: Figure 8 As shown, the first and second curves obtained after this division are as follows: Figure 9 As shown.
[0082] It should be noted that the target curve can be understood as the top contour curve of the target area. The length of the target curve is determined by the left dynamic endpoint and the right dynamic endpoint. For example, the difference between the horizontal coordinate of the left dynamic endpoint and the horizontal coordinate of the right dynamic endpoint can be used as the length of the target curve.
[0083] Step S410: Determine the posture of the target spine based on the first curve and the second curve.
[0084] The posture of the target spine can be in a normal state, such as a balanced state. Alternatively, the posture of the target spine can be in an abnormal state, such as a scoliosis state.
[0085] Specifically, the computer program stored on a computer-readable storage medium deployed on the computer device, when executed, determines the common tangent of the first curve and the second curve based on the positions of each pixel in the first curve and the positions of each pixel in the second curve, and determines the orientation of the target spine based on the common tangent. If the orientation is normal, no action is taken on the target spine. If the orientation is abnormal, an alarm signal is issued to remind the operator to perform an abnormality detection on the target spine.
[0086] The aforementioned computer-readable storage medium rapidly acquires the contour curve corresponding to the target area through image acquisition, simplifying the information acquisition steps for the target area and avoiding damage caused by radioactive detection of the target area. By setting a preset height condition, each pixel on the contour curve is divided into a first pixel that meets the preset height condition and a second pixel other than the first pixel, thereby determining the degree of dispersion between the first pixel and each second pixel. In this way, the degree of dispersion can accurately reflect the concentrated distribution of each pixel in the contour curve. By extracting the target curve that meets the non-discrete condition and includes the first pixel from the contour curve, it is ensured that the pixels constituting the target curve are concentratedly distributed. Based on the position of the target spine in the target curve, the first curve and the second curve located on both sides of the target spine can be determined, avoiding the interference of the protruding structure of the target spine on the posture determination, and further ensuring that the posture determined based on the first curve and the second curve can accurately simulate the posture determined based on the spine curvature measuring ruler. In this way, not only can multiple measurement steps be avoided in actual operation, but the posture of the target spine can also be realistically evaluated, greatly improving the efficiency of determining the spine posture.
[0087] In one embodiment, such as Figure 10 As shown, when a processor executes a computer program, it also performs the following steps:
[0088] Step S1002: Obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine the first variance value based on the position of the left dynamic endpoint and the first pixel.
[0089] In this context, the left dynamic endpoint of the first iteration in the first round and the right dynamic endpoint of the second iteration in the second round are the two points where the edge of the target part intersects with the contour curve.
[0090] Specifically, the updated left dynamic endpoint corresponding to the first iteration in the previous round is determined from the second pixel, and this updated left dynamic endpoint is used as the left dynamic endpoint corresponding to the current first iteration. Based on the position of the left dynamic endpoint and the first pixel, a first set is determined, and based on the positions of at least two pixels in the first set, variance is calculated to obtain a first variance value.
[0091] The first set consists of pixels between the left dynamic endpoint and the first pixel, or the first set consists of pixels between the left dynamic endpoint and the first pixel, the left dynamic endpoint, and the first pixel, or the first set consists of the left dynamic endpoint and the first pixel, without any specific limitation.
[0092] It should be noted that this first variance value can characterize the degree of dispersion among the pixels in the first set, that is, reflect the degree of concentration of the pixels in the first set.
[0093] Step S1004: If the first variance value does not meet the non-discrete condition, determine the updated left dynamic endpoint from the second pixel based on the preset step size.
[0094] The non-discrete condition can be that the variance value is less than or equal to the variance threshold.
[0095] Specifically, if the first variance value is less than or equal to a variance threshold, it is determined that the first variance value satisfies the non-discrete condition. If the first variance value is greater than the variance threshold, it is determined that the first variance value does not satisfy the non-discrete condition. If the first variance value does not satisfy the non-discrete condition, then the second pixel point, which is a preset step size away from the left dynamic endpoint, is updated as the updated left dynamic endpoint.
[0096] The preset step size is determined based on the distance between the initial left dynamic endpoint and the initial right dynamic endpoint. The initial left dynamic endpoint is the left dynamic endpoint corresponding to the first iteration of the first round, i.e., the left boundary point of the target region. The initial right dynamic endpoint is the right dynamic endpoint of the second iteration of the first round, i.e., the right boundary point of the target region. For example, the preset step size is the product of the distance and a preset ratio, which can be 1 / 30.
[0097] It should be noted that the first iteration is the iterative process between the first pixel and the second pixel located to the left of the first pixel, and the second iteration is the iterative process between the first pixel and the second pixel located to the right of the first pixel.
[0098] Step S1006: Enter the next round of first iteration, and take the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of first iteration. Return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel point and continue to execute until the first variance value meets the non-discrete condition and the first iteration stops.
[0099] Specifically, proceed to the next round of the first iteration, and use the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration. Return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel point, and continue to execute until the first variance value satisfies the non-discrete condition, at which point stop the first iteration, and determine the left moving point endpoint that satisfies the non-discrete condition.
[0100] It should be noted that when the first iteration stops, it reflects that all pixels in the first set at the time the first iteration stops are concentrated.
[0101] Step S1008: Obtain the right dynamic endpoint corresponding to the current second iteration from the second pixel, and determine the second variance value based on the position of the right dynamic endpoint and the first pixel.
[0102] In this context, the left dynamic endpoint of the first iteration in the first round and the right dynamic endpoint of the second iteration in the second round are the two points where the edge of the target part intersects with the contour curve.
[0103] Specifically, the updated right dynamic endpoint corresponding to the previous second iteration is determined from the second pixel, and this updated right dynamic endpoint is used as the right dynamic endpoint corresponding to the current second iteration. Based on the position of the right dynamic endpoint and the position of the first pixel, a second set is determined, and based on the positions of at least two pixels in the second set, variance is calculated to obtain the second variance value.
[0104] The second set consists of pixels between the right dynamic endpoint and the first pixel, or the second set consists of pixels between the right dynamic endpoint and the first pixel, the right dynamic endpoint, and the first pixel, or the second set consists of the right dynamic endpoint and the first pixel, without any specific limitation.
[0105] It should be noted that this second variance value can characterize the degree of dispersion among the pixels in the second set, that is, reflect the degree of concentration of the pixels in the second set.
[0106] Step S1010: If the second variance value does not meet the non-discrete condition, determine the updated right dynamic endpoint from the second pixel based on the preset step size.
[0107] Among them, the non-discrete condition can be that the variance value is less than or equal to the variance threshold.
[0108] Specifically, if the second variance value is less than or equal to the variance threshold, it is determined that the second variance value satisfies the non-discrete condition. If the second variance value is greater than the variance threshold, it is determined that the second variance value does not satisfy the non-discrete condition. If the second variance value does not satisfy the non-discrete condition, then the second pixel point, which is a preset step size away from the right dynamic endpoint, is updated as the updated right dynamic endpoint.
[0109] The preset step size is determined based on the distance between the initial left dynamic endpoint and the initial right dynamic endpoint. The initial left dynamic endpoint is the left dynamic endpoint of the first iteration in the first round, i.e., the left boundary point of the target region. The initial right dynamic endpoint is the right dynamic endpoint of the second iteration in the first round, i.e., the right boundary point of the target region. For example, the preset step size is the product of the distance and a preset ratio, which can be 1 / 30.
[0110] It should be noted that the first iteration is the iterative process between the first pixel and the second pixel located to the left of the first pixel, and the second iteration is the iterative process between the first pixel and the second pixel located to the right of the first pixel.
[0111] Step S1012: Enter the next round of the second iteration, and take the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next round of the second iteration. Return to the step of determining the second variance value based on the position of the right dynamic endpoint and the first pixel point and continue to execute until the second variance value satisfies the non-discrete condition and stop the second iteration.
[0112] Specifically, proceed to the next round of the second iteration, and use the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next round of the second iteration. Return to the step of determining the second variance value based on the position of the right dynamic endpoint and the first pixel point, and continue to execute until the second variance value satisfies the non-discrete condition, at which point stop the first iteration, and determine the right moving point endpoint that satisfies the non-discrete condition.
[0113] It should be noted that when the second iteration stops, it reflects that all pixels in the second set at the time the second iteration stops are concentratedly distributed.
[0114] Step S1014: Based on the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, the contour curve is truncated to obtain the target curve.
[0115] Specifically, the contour curve is truncated using the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, to obtain the target curve including the first pixel.
[0116] It should be noted that the first iteration and the second iteration can be performed simultaneously or sequentially according to a certain iterative order, without any specific limitation.
[0117] In this embodiment, by performing dynamic non-discrete verification on the two endpoints of the contour curve through the first and second iterations, the discreteness of the first set determined by the left dynamic endpoints in each iteration and the discreteness of the second set determined by the right dynamic endpoints in the second iteration can be reflected in real time. Therefore, based on the left and right dynamic endpoints that satisfy the non-discrete condition, a target curve with high effectiveness and reliability can be obtained.
[0118] In one embodiment, when the processor executes the computer program, it further performs the following steps: selecting a predetermined number of left-side intermediate pixels from the contour curve that lie between the left dynamic endpoint and the first pixel; and calculating a first variance value based on the selected predetermined number of left-side intermediate pixels, the positions of the left dynamic endpoint and the first pixel.
[0119] The preset number is less than or equal to the number of pixels between the left dynamic endpoint and the first pixel.
[0120] Specifically, the number of pixels between the left dynamic endpoint and the first pixel is determined and set as a preset quantity. Pixels located between the left dynamic endpoint and the first pixel are designated as left middle pixels. Based on the preset number of left middle pixels, the positions of the left dynamic endpoint and the first pixel, a first variance value is obtained through variance calculation.
[0121] In this embodiment, the left dynamic endpoint, the first pixel, and the left middle pixel are treated as a single data set, ensuring data integrity. By processing this data set through variance calculation, the degree of dispersion among the individual pixels within the data set can be intuitively and accurately reflected.
[0122] In one embodiment, when the processor executes the computer program, it further performs the following steps: selecting a predetermined number of right-side intermediate pixels from the contour curve that lie between the right dynamic endpoint and the first pixel; and calculating a second variance value based on the selected predetermined number of right-side intermediate pixels, the positions of the right dynamic endpoint and the first pixel.
[0123] The preset number is less than or equal to the number of pixels between the right dynamic endpoint and the first pixel.
[0124] Specifically, the number of pixels between the right dynamic endpoint and the first pixel is determined and set as a preset number. Pixels located between the right dynamic endpoint and the first pixel are designated as right middle pixels. Based on the preset number of right middle pixels, the positions of the right dynamic endpoint and the first pixel, a second variance value is obtained through variance calculation.
[0125] In this embodiment, the right dynamic endpoint, the first pixel, and the right middle pixel are treated as a single data set, ensuring data integrity. By processing this data set through variance calculation, the degree of dispersion between individual pixels within the data set can be intuitively and accurately reflected.
[0126] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the first variance value does not meet the non-discrete condition, the pixel located to the right of the left dynamic endpoint and separated from the left dynamic endpoint by a preset step size is taken as the updated left dynamic endpoint.
[0127] The preset step size is determined based on the distance between the initial left dynamic endpoint and the initial right dynamic endpoint. The initial left dynamic endpoint is the left dynamic endpoint of the first iteration in the first round, i.e., the left boundary point of the target region. The initial right dynamic endpoint is the right dynamic endpoint of the second iteration in the first round, i.e., the right boundary point of the target region. For example, the preset step size is the product of the distance and a preset ratio, which can be 1 / 30.
[0128] It should be noted that if the first variance value does not meet the non-discrete condition, the left dynamic endpoint needs to be moved by a preset step size toward the first pixel to obtain the updated left dynamic endpoint.
[0129] In this embodiment, when the first variance value does not meet the non-discrete condition, the left dynamic endpoint is dynamically adjusted to obtain an updated left dynamic endpoint. This ensures that subsequent discreteness checks are performed based on the updated left dynamic endpoint. Thus, the left dynamic endpoint used for the next round of the first iteration can be adjusted in real time and effectively based on the left dynamic endpoint that does not meet the non-discrete condition, ensuring the effectiveness of the first iteration process and improving its reliability.
[0130] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the second variance value does not meet the non-discrete condition, the pixel located to the left of the right dynamic endpoint and separated from the right dynamic endpoint by a preset step size is taken as the updated right dynamic endpoint.
[0131] The preset step size is determined based on the distance between the initial left dynamic endpoint and the initial right dynamic endpoint. The initial left dynamic endpoint is the left dynamic endpoint of the first iteration in the first round, i.e., the left boundary point of the target region. The initial right dynamic endpoint is the right dynamic endpoint of the second iteration in the first round, i.e., the right boundary point of the target region. For example, the preset step size is the product of the distance and a preset ratio, which can be 1 / 30.
[0132] It should be noted that if the second variance value does not meet the non-discrete condition, the right dynamic endpoint needs to be moved by a preset step size toward the first pixel to obtain the updated right dynamic endpoint.
[0133] In this embodiment, when the second variance value does not meet the non-discrete condition, the right-hand dynamic endpoint is dynamically adjusted to obtain an updated right-hand dynamic endpoint. This ensures that subsequent discreteness checks are performed based on the updated right-hand dynamic endpoint. Thus, the right-hand dynamic endpoint used for the next round of the second iteration can be adjusted in real time and effectively based on the right-hand dynamic endpoint that does not meet the non-discrete condition, ensuring the effectiveness of the second iteration process and improving its reliability.
[0134] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the region of the target spine within the target curve; cropping the curves on the left side of the target curve within the region to obtain a first curve; and cropping the curves on the right side of the target curve within the region to obtain a second curve.
[0135] This region typically comprises one-quarter of the target curve's length. The distribution of the first and second curves obtained after cropping is as follows: Figure 9 As shown.
[0136] It should be noted that the spinous process may protrude at the top of the back region, thus interfering with the determination of spinal posture. Therefore, this area is considered an invalid region to avoid errors in posture prediction caused by the protrusion of the spinous process. At the same time, treating this area as an invalid region allows for a more realistic simulation of the measurement principle of an actual scoliosis measuring ruler.
[0137] In this embodiment, by cropping the area of the target spine within the target region, the first curve and the second curve are obtained, which avoids incorrect prediction of the target spine posture due to the spinous process protrusion and ensures the accuracy of posture determination.
[0138] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the common tangent of the first curve and the second curve; and determining the orientation of the target spine based on the slope of the common tangent.
[0139] Specifically, based on the positions of each pixel in the first curve and each pixel in the second curve, the common tangent of the first and second curves is determined, and the slope of the common tangent is also determined. The angle of the common tangent is then determined based on this slope. If the angle is within a threshold range, the posture of the target spine is determined to be normal. If the angle is not within the threshold range, the posture of the target spine is determined to be abnormal, i.e., the target spine is in a scoliotic state.
[0140] The threshold range can be between 0° and 3°. For example, such as Figure 11 As shown, the angle of the common tangent is 7.078°, which determines that the posture of the target spine is abnormal, that is, the target spine is in a lateral curvature state.
[0141] It should be noted that in the existing technology, the straight lines obtained by the left apex of the left back top contour line and the right apex of the right back top contour line are directly embedded into the interior of the back region (e.g., Figure 12 The schematic diagram of curve 1 in case a shown in Figure 1 will cause errors in the measurement of scoliosis. At the same time, different back shapes will also cause the magnitude of this measurement error to vary. In this embodiment, the first and second curves with high non-discreteness are determined through variance, and the common tangent of the first and second curves (e.g., ...) is determined... Figure 12 The diagram of curve 2 in case b shows that the common tangent line does not embed into the back area and can truly simulate the measurement principle of an actual scoliosis measuring ruler, thus greatly ensuring the accuracy of posture determination.
[0142] In this embodiment, by determining the common tangent of the first curve and the second curve, the measurement situation of the actual scoliosis measuring ruler can be realistically simulated, thereby obtaining a real and effective posture assessment result, which greatly improves the accuracy of the target spinal posture determination.
[0143] To provide a clearer understanding of the technical solution of this application, a more detailed embodiment is described below. For example... Figure 13 As shown, specifically as follows: Prepare photographic equipment and use the photographic equipment to acquire images of the target body part in a forward flexion position. Send the images to a server with a computer-readable storage medium, and execute the following steps through a computer program stored in the computer-readable storage medium:
[0144] Step 1: Based on the extraction requirements, determine the target extraction model from multiple preset extraction models. Extract the target region from the target image using the target extraction model to obtain the extraction result. Determine the contour curve corresponding to the extraction result. Under the preset height condition of reaching a first height, select the pixels that reach the first height as the pixels to be processed, and arbitrarily select one pixel from multiple pixels to be processed as the first pixel. Select all pixels other than the first pixel as the second pixel.
[0145] Step 2: Determine the updated left dynamic endpoint corresponding to the previous first iteration from the second pixel, and use the updated left dynamic endpoint corresponding to the previous first iteration as the left dynamic endpoint corresponding to the current first iteration. From the contour curve, select a predetermined number of left middle pixels located between the left dynamic endpoint and the first pixel. Based on the selected predetermined number of left middle pixels, the positions of the left dynamic endpoint and the first pixel, calculate the first variance value. If the first variance value does not meet the non-discrete condition, use the pixel located to the right of the left dynamic endpoint and separated from the left dynamic endpoint by a predetermined step as the updated left dynamic endpoint. Proceed to the next first iteration, and use the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next first iteration. Return to the step of determining the first variance value based on the positions of the left dynamic endpoint and the first pixel and continue execution until the first variance value meets the non-discrete condition and the first iteration stops.
[0146] Step 3: Determine the updated right dynamic endpoint corresponding to the previous second iteration from the second pixel, and use the updated right dynamic endpoint corresponding to the previous second iteration as the right dynamic endpoint corresponding to the current second iteration. From the contour curve, select a predetermined number of right middle pixels located between the right dynamic endpoint and the first pixel. Based on the selected predetermined number of right middle pixels, the positions of the right dynamic endpoint and the first pixel, calculate the second variance value. If the second variance value does not meet the non-discrete condition, use the pixel located to the left of the right dynamic endpoint and separated from the right dynamic endpoint by a predetermined step as the updated right dynamic endpoint. Proceed to the next second iteration, and use the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next second iteration. Return to the step of determining the second variance value based on the positions of the right dynamic endpoint and the first pixel, and continue until the second variance value meets the non-discrete condition and the second iteration stops. Based on the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, truncate the contour curve to obtain the target curve (corresponding to...). Figure 13 The step of "Extracting the top contour curve of the target part" is mentioned.
[0147] Step 4: Determine the region of the target spine within the target curve. Crop the curve to the left of this region to obtain the first curve. Crop the curve to the right of this region to obtain the second curve. Determine the common tangent of the first and second curves. Determine the posture of the target spine based on the slope of this common tangent and display the posture (corresponding to...). Figure 13 The step of "Extracting the top contour curve of the target part" is mentioned.
[0148] In this embodiment, the contour curve corresponding to the target area is quickly acquired through image acquisition, simplifying the information acquisition steps for the target area and avoiding damage caused by radioactive detection of the target area. By using preset height conditions, each pixel on the contour curve is divided into a first pixel that meets the preset height conditions and a second pixel other than the first pixel, thereby determining the degree of dispersion between the first pixel and each second pixel. In this way, the degree of dispersion can accurately reflect the concentrated distribution of each pixel in the contour curve. By extracting the target curve that meets the non-discrete conditions and includes the first pixel from the contour curve, it is ensured that the pixels constituting the target curve are concentratedly distributed. Based on the position of the target spine in the target curve, the first curve and the second curve located on both sides of the target spine can be determined, avoiding the interference of the protruding structure of the target spine on the posture determination, and further ensuring that the posture determined based on the first curve and the second curve can accurately simulate the posture determined based on the spine curvature measuring ruler. In this way, not only can the multiple measurement steps in actual operation be avoided, but the posture of the target spine can also be realistically evaluated, greatly improving the efficiency of determining the spine posture.
[0149] In one embodiment, a method for determining spinal posture is provided. This method, executable by a computer device, includes the following steps: acquiring a target image obtained by image acquisition of a target part of a target object, and extracting a contour curve corresponding to the target part from the target image; the target part includes a target spine. A first pixel point satisfying a preset height condition and second pixels other than the first pixel point are determined from the contour curve. Based on the dispersion between the first pixel point and each second pixel point, a target curve satisfying a non-discrete condition and including the first pixel point is extracted from the contour curve. The target curve is divided into a first curve and a second curve according to the position of the target spine within the target curve. The posture of the target spine is determined based on the first curve and the second curve.
[0150] In one embodiment, extracting a target curve from the contour curve that satisfies the non-discrete condition and includes the first pixel based on the dispersion between the first pixel and each second pixel includes: obtaining the left dynamic endpoint corresponding to the current first iteration from the second pixels; determining a first variance value based on the position of the left dynamic endpoint and the first pixel; if the first variance value does not satisfy the non-discrete condition, determining an updated left dynamic endpoint from the second pixels based on a preset step size; proceeding to the next round of the first iteration, using the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration, and returning to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel to continue execution until the first variance value satisfies the non-discrete condition and the first iteration stops. Obtaining the right dynamic endpoint corresponding to the current second iteration from the second pixels; determining a second variance value based on the position of the right dynamic endpoint and the first pixel; if the second variance value does not satisfy the non-discrete condition, determining an updated right dynamic endpoint from the second pixels based on the preset step size. The process proceeds to the next iteration, using the updated right dynamic endpoint as the next iteration's right dynamic endpoint. The step of determining the second variance value based on the right dynamic endpoint and the position of the first pixel continues until the second variance value satisfies the non-discrete condition, at which point the second iteration stops. Based on the left dynamic endpoint corresponding to the end of the first iteration and the right dynamic endpoint corresponding to the end of the second iteration, the contour curve is truncated to obtain the target curve.
[0151] In one embodiment, determining the first variance value based on the positions of the left dynamic endpoint and the first pixel includes: selecting a predetermined number of left intermediate pixels from the contour curve that are located between the left dynamic endpoint and the first pixel; and calculating the first variance value based on the predetermined number of left intermediate pixels, the positions of the left dynamic endpoint and the first pixel, respectively.
[0152] In one embodiment, determining the second variance value based on the positions of the right dynamic endpoint and the first pixel includes: selecting a predetermined number of right-side intermediate pixels from the contour curve that are located between the right dynamic endpoint and the first pixel; and calculating the second variance value based on the selected predetermined number of right-side intermediate pixels, the positions of the right dynamic endpoint and the first pixel, respectively.
[0153] In one embodiment, determining the updated left dynamic endpoint from the second pixel based on a preset step size when the first variance value does not meet the non-discrete condition includes: taking the pixel located to the right of the left dynamic endpoint and separated from the left dynamic endpoint by a preset step size as the updated left dynamic endpoint when the first variance value does not meet the non-discrete condition.
[0154] In one embodiment, determining the updated right dynamic endpoint from the second pixel based on the preset step size when the second variance value does not meet the non-discrete condition includes: when the second variance value does not meet the non-discrete condition, taking the pixel located to the left of the right dynamic endpoint and separated from the right dynamic endpoint by the preset step size as the updated right dynamic endpoint.
[0155] In one embodiment, dividing the target curve into a first curve and a second curve based on the position of the target spine within the target curve includes: determining the region of the target spine within the target curve; cropping the curve to the left of the region to obtain the first curve; and cropping the curve to the right of the region to obtain the second curve.
[0156] In one embodiment, determining the orientation of the target spine based on the first curve and the second curve includes: determining the common tangent of the first curve and the second curve; and determining the orientation of the target spine based on the slope of the common tangent.
[0157] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0158] Based on the same inventive concept, this application also provides a spinal posture determining device for implementing the spinal posture determining method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more spinal posture determining device embodiments provided below can be found in the limitations of the spinal posture determining method described above, and will not be repeated here.
[0159] In one embodiment, such as Figure 14 As shown, a spinal posture determination device is provided, including: an extraction module 1402, a determination module 1404, a truncating module 1406, and a segmentation module 1408, wherein:
[0160] The extraction module 1402 is used to acquire a target image obtained by image acquisition of the target part of the target object, and extract the contour curve corresponding to the target part in the target image; the target part includes the target spine.
[0161] The determination module 1404 is used to determine the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point.
[0162] The interception module 1406 is used to intercept a target curve from the contour curve that satisfies the non-discrete condition and includes the first pixel, based on the degree of dispersion between the first pixel and each second pixel.
[0163] The segmentation module 1408 is used to divide the target curve into a first curve and a second curve based on the position of the target spine in the target curve.
[0164] The determining module 1404 is also used to determine the posture of the target spine based on the first curve and the second curve.
[0165] In one embodiment, the interception module 1406 is configured to obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine a first variance value based on the position of the left dynamic endpoint and the position of the first pixel. If the first variance value does not meet the non-discrete condition, an updated left dynamic endpoint is determined from the second pixel based on a preset step size. The next round of the first iteration is entered, and the updated left dynamic endpoint is used as the left dynamic endpoint corresponding to the next round of the first iteration. The step of determining the first variance value based on the position of the left dynamic endpoint and the position of the first pixel continues to be executed until the first variance value meets the non-discrete condition and the first iteration stops. The right dynamic endpoint corresponding to the current second iteration is obtained from the second pixel, and a second variance value is determined based on the position of the right dynamic endpoint and the position of the first pixel. If the second variance value does not meet the non-discrete condition, an updated right dynamic endpoint is determined from the second pixel based on the preset step size. The process proceeds to the next iteration, using the updated right dynamic endpoint as the next iteration's right dynamic endpoint. The step of determining the second variance value based on the right dynamic endpoint and the position of the first pixel continues until the second variance value satisfies the non-discrete condition, at which point the second iteration stops. Based on the left dynamic endpoint corresponding to the end of the first iteration and the right dynamic endpoint corresponding to the end of the second iteration, the contour curve is truncated to obtain the target curve.
[0166] In one embodiment, the interception module 1406 is configured to filter out a predetermined number of left-side intermediate pixels located between the left dynamic endpoint and the first pixel from the contour curve. Based on the positions of the selected predetermined number of left-side intermediate pixels, the left dynamic endpoint, and the first pixel, a first variance value is calculated.
[0167] In one embodiment, the interception module 1406 is configured to filter out a predetermined number of right-side intermediate pixels located between the right dynamic endpoint and the first pixel from the contour curve. A second variance value is calculated based on the positions of the selected predetermined number of right-side intermediate pixels, the right dynamic endpoint, and the first pixel.
[0168] In one embodiment, the interception module 1406 is used to take the pixel located to the right of the left dynamic endpoint and separated from the left dynamic endpoint by a preset step size as the updated left dynamic endpoint when the first variance value does not meet the non-discrete condition.
[0169] In one embodiment, the interception module 1406 is used to take the pixel located to the left of the right dynamic endpoint and separated from the right dynamic endpoint by a preset step size as the updated right dynamic endpoint when the second variance value does not meet the non-discrete condition.
[0170] The segmentation module 1408 is used to determine the region of the target spine within the target curve. The curves to the left of this region are cropped to obtain the first curve. The curves to the right of this region are cropped to obtain the second curve.
[0171] The determining module 1404 is also used to determine the common tangent of the first curve and the second curve. The orientation of the target spine is determined based on the slope of the common tangent.
[0172] The modules in the aforementioned spinal posture determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0173] In one embodiment, a computer device is provided, which may be a terminal or a server, and its internal structure diagram may be as follows: Figure 15As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. 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 a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database is used for spinal posture determination data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a spinal posture determination method.
[0174] Those skilled in the art will understand that Figure 15 The 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.
[0175] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0176] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0178] 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, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0179] 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.
[0180] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. 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 application should be determined by the appended claims.
Claims
1. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it performs the following steps: A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine; Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point; Obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine the first variance value based on the position of the left dynamic endpoint and the first pixel; If the first variance value does not meet the non-discrete condition, the updated left dynamic endpoint is determined from the second pixel based on a preset step size; Enter the next round of the first iteration, and take the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration. Return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel point and continue to execute until the first variance value satisfies the non-discrete condition and stop the first iteration. Obtain the right dynamic endpoint corresponding to the current second iteration from the second pixel, and determine the second variance value based on the position of the right dynamic endpoint and the first pixel; If the second variance value does not meet the non-discrete condition, the updated right dynamic endpoint is determined from the second pixel based on the preset step size. Enter the next round of the second iteration, and take the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next round of the second iteration. Return to the step of determining the second variance value based on the position of the right dynamic endpoint and the first pixel point and continue to execute until the second variance value satisfies the non-discrete condition and stop the second iteration. Based on the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, the contour curve is truncated to obtain the target curve; Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve; The posture of the target spine is determined based on the first curve and the second curve.
2. The computer-readable storage medium according to claim 1, wherein when the processor executes the computer program, it further performs the following steps: From the contour curve, select a predetermined number of left middle pixels that are located between the left dynamic endpoint and the first pixel. The first variance value is calculated based on the selected preset number of left middle pixels, the left dynamic endpoint, and the position of the first pixel.
3. The computer-readable storage medium according to claim 1, wherein when the processor executes the computer program, it further performs the following steps: From the contour curve, a predetermined number of right-side middle pixels located between the right-side dynamic endpoint and the first pixel are selected; The second variance value is calculated based on the selected preset number of right-side middle pixels, the position of the right-side dynamic endpoint, and the position of the first pixel.
4. The computer-readable storage medium according to claim 1, wherein when the processor executes the computer program, it further performs the following steps: If the first variance value does not meet the non-discrete condition, the pixel located to the right of the left dynamic endpoint and separated from the left dynamic endpoint by a preset step size is taken as the updated left dynamic endpoint.
5. The computer-readable storage medium according to claim 1, wherein when the processor executes the computer program, it further performs the following steps: If the second variance value does not meet the non-discrete condition, the pixel located to the left of the right dynamic endpoint and separated from the right dynamic endpoint by a preset step size is taken as the updated right dynamic endpoint.
6. The computer-readable storage medium according to any one of claims 1 to 5, wherein when the processor executes the computer program, it further performs the following steps: Determine the region of the target spine within the target curve; The first curve is obtained by cropping the curve that is to the left of the target curve within the region. The second curve is obtained by cropping the curve that is to the right of the target curve within the specified region.
7. The computer-readable storage medium according to any one of claims 1 to 5, wherein when the processor executes the computer program, it further performs the following steps: Determine the common tangent of the first curve and the second curve; The orientation of the target spine is determined based on the slope of the common tangent.
8. A method for determining spinal posture, characterized in that, The method includes: A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine; Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point; Obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine the first variance value based on the position of the left dynamic endpoint and the first pixel; If the first variance value does not meet the non-discrete condition, the updated left dynamic endpoint is determined from the second pixel based on a preset step size; Enter the next round of the first iteration, and take the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration. Return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel point and continue to execute until the first variance value satisfies the non-discrete condition and stop the first iteration. Obtain the right dynamic endpoint corresponding to the current second iteration from the second pixel, and determine the second variance value based on the position of the right dynamic endpoint and the first pixel; If the second variance value does not meet the non-discrete condition, the updated right dynamic endpoint is determined from the second pixel based on the preset step size. Enter the next round of the second iteration, and take the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next round of the second iteration. Return to the step of determining the second variance value based on the position of the right dynamic endpoint and the first pixel point and continue to execute until the second variance value satisfies the non-discrete condition and stop the second iteration. Based on the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, the contour curve is truncated to obtain the target curve; Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve; The posture of the target spine is determined based on the first curve and the second curve.
9. A spinal posture determination device, characterized in that, The device includes: An extraction module is used to acquire a target image obtained by image acquisition of a target part of a target object, and to extract the contour curve corresponding to the target part in the target image; the target part includes the target spine; The determining module is used to determine the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point; The interception module is used to obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine a first variance value based on the position of the left dynamic endpoint and the first pixel; if the first variance value does not meet the non-discrete condition, determine the updated left dynamic endpoint from the second pixel based on a preset step size; enter the next round of the first iteration, and use the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration, and return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel to continue execution until the first variance value meets the non-discrete condition and the first iteration stops; obtain the right dynamic endpoint corresponding to the current second iteration from the second pixel. Based on the positions of the right dynamic endpoint and the first pixel, a second variance value is determined. If the second variance value does not meet the non-discrete condition, an updated right dynamic endpoint is determined from the second pixel based on the preset step size. The next iteration begins, and the updated right dynamic endpoint is used as the right dynamic endpoint for the next iteration. The process of determining the second variance value based on the positions of the right dynamic endpoint and the first pixel continues until the second iteration stops when the second variance value meets the non-discrete condition. Based on the left dynamic endpoint corresponding to the end of the first iteration and the right dynamic endpoint corresponding to the end of the second iteration, the contour curve is truncated to obtain the target curve. The segmentation module is used to divide the target curve into a first curve and a second curve based on the position of the target spine in the target curve; The determining module is further configured to determine the posture of the target spine based on the first curve and the second curve.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it performs the following steps: A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine; Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point; Obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine the first variance value based on the position of the left dynamic endpoint and the first pixel; If the first variance value does not meet the non-discrete condition, the updated left dynamic endpoint is determined from the second pixel based on a preset step size; Enter the next round of the first iteration, and take the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration. Return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel point and continue to execute until the first variance value satisfies the non-discrete condition and stop the first iteration. Obtain the right dynamic endpoint corresponding to the current second iteration from the second pixel, and determine the second variance value based on the position of the right dynamic endpoint and the first pixel; If the second variance value does not meet the non-discrete condition, the updated right dynamic endpoint is determined from the second pixel based on the preset step size. Enter the next round of the second iteration, and take the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next round of the second iteration. Return to the step of determining the second variance value based on the position of the right dynamic endpoint and the first pixel point and continue to execute until the second variance value satisfies the non-discrete condition and stop the second iteration. Based on the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, the contour curve is truncated to obtain the target curve; Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve; The posture of the target spine is determined based on the first curve and the second curve.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it performs the following steps: A target image is obtained by acquiring images of the target part of a target object, and the contour curve corresponding to the target part in the target image is extracted; the target part includes the target spine; Identify the first pixel point in the contour curve that meets the preset height condition, and the second pixel point other than the first pixel point; Obtain the left dynamic endpoint corresponding to the current first iteration from the second pixel, and determine the first variance value based on the position of the left dynamic endpoint and the first pixel; If the first variance value does not meet the non-discrete condition, the updated left dynamic endpoint is determined from the second pixel based on a preset step size; Enter the next round of the first iteration, and take the updated left dynamic endpoint as the left dynamic endpoint corresponding to the next round of the first iteration. Return to the step of determining the first variance value based on the position of the left dynamic endpoint and the first pixel point and continue to execute until the first variance value satisfies the non-discrete condition and stop the first iteration. Obtain the right dynamic endpoint corresponding to the current second iteration from the second pixel, and determine the second variance value based on the position of the right dynamic endpoint and the first pixel; If the second variance value does not meet the non-discrete condition, the updated right dynamic endpoint is determined from the second pixel based on the preset step size. Enter the next round of the second iteration, and take the updated right dynamic endpoint as the right dynamic endpoint corresponding to the next round of the second iteration. Return to the step of determining the second variance value based on the position of the right dynamic endpoint and the first pixel point and continue to execute until the second variance value satisfies the non-discrete condition and stop the second iteration. Based on the left dynamic endpoint corresponding to the first iteration stop and the right dynamic endpoint corresponding to the second iteration stop, the contour curve is truncated to obtain the target curve; Based on the position of the target spine in the target curve, the target curve is divided into a first curve and a second curve; The posture of the target spine is determined based on the first curve and the second curve.