Skeleton breakage repair method, sperm morphology analyzer, and storage medium

CN116091384BActive Publication Date: 2026-09-29SHENZHEN REETOO BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111280083.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-09-29
Estimated Expiration
2041-10-29

AI Technical Summary

Benefits of technology

[0013]本申请提供了一种骨架断裂修复方法、精子形态分析仪及存储介质,其中,该方法通过基于骨架图像中第一骨架分支的断裂点,确定断裂点对应的引力,确定在第一骨架分支上与断裂点间隔预设数量像素点的参照点,并根据参照点与断裂点,计算断裂点对应的速度,根据引力和速度,计算断裂点对应的延伸步进,基于延伸步进确定断裂点对应的延伸点,生成从断裂点延伸至延伸点的延伸轨迹,并根据延伸轨迹更新第一骨架分支,将延伸点作为新的断裂点,返回执行基于骨架图像中第一骨架分支的断裂点,确定断裂点对应的引力的步骤,直至最新生成的延伸轨迹覆到第二骨架分支上,完成第一骨架分支至第二骨架分支的骨架修复,因此,也即实现了骨架断裂修复,进而提高了对骨架对应的检测对象进行检测分析的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091384B_ABST
    Figure CN116091384B_ABST
Patent Text Reader

Abstract

The application discloses a skeleton fracture repairing method, a sperm morphology analyzer and a storage medium, and relates to the technical field of image processing, in particular to a skeleton fracture repairing method, a sperm morphology analyzer and a storage medium. The method comprises the following steps: determining the attractive force corresponding to the fracture point of the first skeleton branch in the skeleton image based on the fracture point; determining the reference point spaced apart from the fracture point by a preset number of pixels on the first skeleton branch, and calculating the speed corresponding to the fracture point according to the reference point and the fracture point; calculating the extension step corresponding to the fracture point according to the attractive force and the speed; determining the extension point corresponding to the fracture point based on the extension step, generating the extension trajectory extending from the fracture point to the extension point, taking the extension point as a new fracture point, and repeating the above operation until the newly generated extension trajectory covers the second skeleton branch, and the skeleton repairing from the first skeleton branch to the second skeleton branch is completed, thereby improving the accuracy of detecting and analyzing the detection object corresponding to the skeleton.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image processing technology, and in particular to a method for repairing skeletal fractures, a sperm morphology analyzer, and a storage medium. Background Technology

[0002] In the medical field, the skeleton of a test subject can be extracted, and then morphological and other aspects can be analyzed based on the skeleton. For example, sperm morphology can be detected and identified by extracting the sperm skeleton. However, in practical applications, the extracted skeleton of the test subject is often broken or incomplete, which affects the test analysis results and leads to inaccurate results.

[0003] Therefore, how to achieve skeleton fracture repair in order to improve the accuracy of detection and analysis of the corresponding skeleton has become an urgent problem to be solved. Summary of the Invention

[0004] The main objective of this application is to provide a method for repairing skeletal fractures, a sperm morphology analyzer, and a storage medium, aiming to achieve skeletal fracture repair and improve the accuracy of detection and analysis of the corresponding skeletal objects.

[0005] To achieve the above objectives, this application provides a method for repairing skeletal fractures, the method comprising:

[0006] Based on the break point of the first skeleton branch in the skeleton image, the gravity corresponding to the break point is determined;

[0007] Determine a reference point on the first skeleton branch that is a preset number of pixels away from the break point, and calculate the velocity corresponding to the break point based on the reference point and the break point;

[0008] Calculate the extension step corresponding to the break point based on the gravity and the velocity;

[0009] Based on the extension step, the extension point corresponding to the break point is determined, and an extension trajectory extending from the break point to the extension point is generated.

[0010] The first skeleton branch is updated according to the extended trajectory, the extended point is taken as the new break point, and the step of determining the gravity corresponding to the break point based on the break point of the first skeleton branch in the skeleton image is returned to be executed until the newly generated extended trajectory covers the second skeleton branch, thus completing the skeleton repair from the first skeleton branch to the second skeleton branch.

[0011] To achieve the above objectives, this application also provides a sperm morphology analyzer, including a processor, a memory, and storage, wherein the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements the aforementioned skeletal fracture repair method.

[0012] To achieve the above objectives, this application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs that can be executed by one or more processors to implement the steps of the skeleton fracture repair method provided in the embodiments of this application.

[0013] This application provides a method for repairing skeleton fractures, a sperm morphology analyzer, and a storage medium. The method determines the gravitational force corresponding to the fracture point of a first skeleton branch in a skeleton image, determines a reference point on the first skeleton branch at a predetermined distance from the fracture point, calculates the velocity corresponding to the fracture point based on the reference point and the fracture point, calculates the extension step corresponding to the fracture point based on the gravitational force and velocity, determines the extension point corresponding to the fracture point based on the extension step, generates an extension trajectory from the fracture point to the extension point, updates the first skeleton branch based on the extension trajectory, uses the extension point as the new fracture point, and returns to execute the step of determining the gravitational force corresponding to the fracture point based on the fracture point of the first skeleton branch in the skeleton image, until the newly generated extension trajectory covers the second skeleton branch, completing the skeleton repair from the first skeleton branch to the second skeleton branch. Therefore, skeleton fracture repair is achieved, thereby improving the accuracy of detection and analysis of the target object corresponding to the skeleton. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 A flowchart illustrating the steps of a skeleton fracture repair method provided in this application;

[0016] Figure 2 A flowchart of steps for generating a potential energy field corresponding to the local region where the fracture point is located, provided in this application;

[0017] Figure 3 A schematic diagram of a local area provided in this application;

[0018] Figure 4 for Figure 3 A schematic diagram of the potential energy field corresponding to a local region in the middle;

[0019] Figure 5 A flowchart of steps for calculating the extension step corresponding to the break point is provided in this application;

[0020] Figure 6 A schematic diagram of determining the extension point based on the extension step provided in this application;

[0021] Figure 7 A flowchart illustrating the steps of another skeleton fracture repair method provided in this application;

[0022] Figure 8 A flowchart illustrating the steps for detecting the continuity of the connection between the extended trajectory and the second skeleton branch, as provided in this application.

[0023] Figure 9 A schematic diagram of the skeleton before repair provided in this application;

[0024] Figure 10 for Figure 9 A schematic diagram of the skeleton after skeleton repair in the image;

[0025] Figure 11 This is a schematic block diagram of a sperm morphology analyzer provided in an embodiment of this application. Detailed Implementation

[0026] 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. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0027] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features.

[0028] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in some embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0029] Furthermore, the technical solutions of the various embodiments can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0030] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0031] In the medical field, the skeleton of a test subject can be extracted, and then morphological and other aspects can be analyzed based on the skeleton. For example, sperm morphology can be detected and identified by extracting the sperm skeleton. However, in practical applications, the extracted skeleton of the test subject is often broken or incomplete, which affects the test analysis results and leads to inaccurate results.

[0032] To address the aforementioned problems, this application provides a method for repairing skeletal fractures, a sperm morphology analyzer, and a storage medium. The method involves: determining the gravitational force corresponding to the fracture point of a first skeletal branch in a skeletal image; determining a reference point on the first skeletal branch spaced a preset number of pixels from the fracture point, and calculating the velocity corresponding to the fracture point based on the reference point and the fracture point; calculating the extension step corresponding to the fracture point based on the gravitational force and the velocity; determining the extension point corresponding to the fracture point based on the extension step; generating an extension trajectory from the fracture point to the extension point; updating the first skeletal branch based on the extension trajectory; using the extension point as the new fracture point; and returning to the step of determining the gravitational force corresponding to the fracture point based on the fracture point of the first skeletal branch in the skeletal image, until the newly generated extension trajectory covers a second skeletal branch, thus completing the skeletal repair from the first skeletal branch to the second skeletal branch, thereby improving the accuracy of detection and analysis of the target object corresponding to the skeletal image.

[0033] Please see Figure 1 , Figure 1 This is a flowchart illustrating the skeletal fracture repair method provided in this application embodiment. The method is applied to a sperm morphology analyzer, but can also be applied to other electronic devices besides sperm morphology analyzers, such as servers and terminal devices. The server can be a standalone server or a server cluster. The terminal device can be any of a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, personal computer (PC), netbook, or personal digital assistant (PDA). No limitations are imposed in this application embodiment.

[0034] like Figure 1 As shown, the skeleton fracture repair method provided in this application embodiment includes steps S101 to S107.

[0035] S101. Based on the break point of the first skeleton branch in the skeleton image, determine the gravity corresponding to the break point.

[0036] For example, the breakpoint is a pixel at the end of the first skeleton branch. The skeleton image includes, but is not limited to, a sperm skeleton image. Based on the breakpoint, the gravitational potential energy at each pixel within the local region where the breakpoint is located is obtained, generating a potential energy field corresponding to that local region. Then, the gravitational force corresponding to the breakpoint is determined based on the potential energy field.

[0037] Please see Figure 2 In some implementations, step S101 may include sub-steps S1011 to S1014.

[0038] S1011. Define a rectangular area centered on the fracture point and with a side length of a preset length as a local region;

[0039] S1012. Detect whether the second skeleton branch exists in the local area;

[0040] S1013. If the second skeleton branch exists in the local region, then the potential energy field corresponding to the local region is generated.

[0041] S1014. Obtain the potential energy gradient corresponding to the fracture point based on the potential energy field, and determine the gravitational force corresponding to the fracture point based on the potential energy gradient.

[0042] For example, a local region is divided according to a preset maximum allowable fracture distance. For instance, if the maximum allowable fracture distance is n, then a rectangular area with a preset length of (2n+1) centered on the fracture point is defined as the local region. Figure 3 As shown.

[0043] Based on this local region, it is detected whether there are any second skeleton branches other than the first skeleton branch within the local region. If there are no second skeleton branches in the local region, it is determined that the first skeleton branch at the break point is a normal skeleton termination, and there is no skeleton breakage. Conversely, if there are second skeleton branches in the local region, it is determined that the first skeleton branch at the break point is not a normal skeleton termination, and there is a skeleton breakage, requiring skeleton breakage repair. By acquiring the potential energy at each pixel point in the local region, a potential energy field corresponding to that local region is generated, for example, such as... Figure 4 As shown.

[0044] In some implementations, generating the potential field corresponding to the local region may include:

[0045] Based on the preset distance-potential energy mapping relationship and the nearest distance between each pixel in the local area and the second skeleton branch, the first potential energy corresponding to each pixel is determined, and the potential energy field is generated.

[0046] For example, the preset distance-potential energy mapping relationship may include a mapping relationship that squares the distance to convert it into gravitational potential energy. By performing a distance transformation on the local region, the pixel value of each pixel in the local region represents its nearest distance to the second skeleton branch, and the first potential energy corresponding to each pixel in the local region is determined according to the preset distance-potential energy mapping relationship, thereby generating the potential energy field corresponding to the local region.

[0047] In some implementations, the process of generating the potential field may include:

[0048] Determine the second potential energy generated by the end point of the second skeleton branch for each pixel;

[0049] Generating the potential energy field may include:

[0050] The first potential energy and the second potential energy corresponding to each pixel are superimposed to generate the potential energy field.

[0051] For example, based on a preset distance-potential energy mapping relationship and the distance between the end point of the second skeleton branch and each pixel in the local area, the second potential energy generated by the end point of the second skeleton branch on each pixel is determined, and the second potential energy is superimposed on the first potential energy to generate the potential energy field corresponding to the local area.

[0052] The first and second potential energies can be superimposed using a weighted summation method. For example, if the first potential energy corresponding to pixel A is 10, and the second potential energy caused by the end point of the second skeleton branch is 5, with the ratio set to 1:3, then the new superimposed potential energy obtained after superimposing the first and second potential energies is (10×1+5×3) / (1+3)=6.25, and the potential energy corresponding to pixel A is 6.25.

[0053] Based on the potential energy corresponding to the fracture point in the potential energy field, the potential energy gradient corresponding to the fracture point can be obtained. Then, the gravitational force F corresponding to the fracture point can be determined based on the potential energy gradient. That is, the gravitational force F at the fracture point is the potential energy gradient at the fracture point.

[0054] For example, determining the gravitational force corresponding to the break point based on the potential energy gradient may include:

[0055] The magnitude of the potential energy gradient is determined as the magnitude of the gravitational force, and the direction of the potential energy gradient is determined as the direction of the gravitational force.

[0056] The potential energy gradient at the fracture point is the gravitational force F acting at the fracture point. The magnitude of the gravitational force F is the modulus of the potential energy gradient, and the direction of the gravitational force F is the direction of the potential energy gradient, which is also the direction in which the potential energy decreases the fastest.

[0057] S102. Determine a reference point on the first skeleton branch that is a preset number of pixels away from the break point, and calculate the velocity corresponding to the break point based on the reference point and the break point.

[0058] For example, calculating the velocity corresponding to the fracture point based on the reference point and the fracture point may include:

[0059] The distance between the reference point and the break point is determined as the magnitude of the velocity;

[0060] The direction of the velocity is determined by the straight line from the reference point to the break point.

[0061] For example, suppose the break point is p. n The reference point is p. n-k Break point p n With reference point p n-k The number of interval pixels is k, where k is a preset value that can be flexibly set according to the actual situation, and no specific limit is imposed here.

[0062] Calculate the break point p n With reference point p n-k The distance between them will determine the break point p. n With reference point p n-k The distance between them is determined as the magnitude of the velocity v corresponding to the break point, and will be along the reference point p. n-k To the fracture point p n The direction of the straight line is determined as the direction of the velocity v.

[0063] S103. Calculate the extension step corresponding to the break point based on the gravity and the velocity.

[0064] Please see Figure 5 In some implementations, step S103 may include sub-steps S1031 and S1032.

[0065] S1031. Calculate the simulated displacement of the fracture point per unit time based on the gravity and the velocity;

[0066] S1032. Scale the simulated displacement to a fixed value to obtain the extended step.

[0067] By determining the gravitational force F and velocity v corresponding to the fracture point, the movement of the fracture point can be simulated under the influence of gravity and inertia. Setting the unit time as t, the simulated displacement of the fracture point within unit time t is calculated as aFt. 2 +bvt. Where a and b are preset fixed scaling factors, and their specific values ​​can be flexibly set according to the actual situation, without specific restrictions here.

[0068] For example, according to the calculation formula d = normalize{aFt} 2 The simulated displacement is scaled down to a fixed value using `+bvt}` to obtain the extension step `d` corresponding to the break point. Here, `normalize` refers to scaling down the magnitude of the simulated displacement to a fixed value.

[0069] S104. Based on the extension step, determine the extension point corresponding to the break point, and generate an extension trajectory extending from the break point to the extension point.

[0070] For example, suppose the break point is p n The corresponding extension point is P. m Then it can be based on P m =p n +d determines the break point p n The corresponding extension point p m For example, such as Figure 6 As shown, the extension point p is determined based on the extension step d. m .

[0071] From the break point p n And the extension point is p m It can generate from the break point p n Extend to extension point p m The extended trajectory causes the first skeletal branch to originate from the break point p. n Extend to extension point P m Update the first skeleton branch.

[0072] S105. Determine whether the extended trajectory covers the second skeleton branch; if not, proceed to step S106; if yes, proceed to S107.

[0073] S106. Update the first skeleton branch according to the extension trajectory, take the extension point as the new break point, and return to execute step S101.

[0074] S107. The skeleton repair from the first skeleton branch to the second skeleton branch is completed.

[0075] Generate from break point p n Extend to extension point P m After the extension trajectory is generated, it is determined whether the generated extension trajectory covers the second skeleton branch. If the extension trajectory covers the second skeleton branch, it is determined that the skeleton fracture repair from the first skeleton branch to the second skeleton branch has been completed, and the operation ends. If the extension trajectory does not cover the second skeleton branch, it is determined that the skeleton fracture repair from the first skeleton branch to the second skeleton branch has not been completed. Using the extension point as the new fracture point, and based on the first skeleton branch updated with the extension trajectory, the operation of step S101 is repeated until the latest generated extension trajectory covers the second skeleton branch, and the skeleton repair from the first skeleton branch to the second skeleton branch is completed. For example, if... Figure 6 As shown.

[0076] For example, if the cumulative distance of the extended step d obtained multiple times reaches the maximum step distance, and the newly generated extended trajectory still does not cover the second skeleton branch, then it is determined that the first skeleton branch is a normal end of the skeleton at the break point, and there is no skeleton breakage.

[0077] In the above embodiments, the skeleton repair operations are all performed locally at the fracture point of the skeleton, thus avoiding the influence of other skeleton elements on the repair. Furthermore, by combining potential energy fields and inertial simulations of pixel motion, the smoothness of the extension trajectory is ensured, thereby improving the accuracy of skeleton repair.

[0078] Please see Figure 7 In some implementations, steps S107 may be followed by steps S108 to S110.

[0079] S108. Perform continuity detection on the connection between the extended trajectory and the second skeleton branch;

[0080] S109. If the continuity test meets the preset requirements, the skeleton fracture repair is confirmed to be successful.

[0081] S110. If the continuity test does not meet the preset requirements, it is determined that the first skeleton branch is not broken.

[0082] The continuity test at the connection point between the extended trajectory and the second skeleton branch is to determine whether the extended trajectory and the second skeleton branch belong to the same skeleton. If the continuity test meets the preset requirements, the extended trajectory and the second skeleton branch belong to the same skeleton, and the skeleton fracture repair is confirmed to be successful. Conversely, if the continuity test does not meet the preset requirements, the extended trajectory and the second skeleton branch do not belong to the same skeleton, and the first skeleton branch is confirmed to be unbroken, meaning that the first skeleton branch ends normally at the fracture point, and there is no skeleton fracture.

[0083] Please see Figure 8 In some implementations, step S108 may include sub-steps S1081 and S1082.

[0084] S1081. Obtain the connection feature corresponding to the connection point;

[0085] S1082. Input the connection features into a preset evaluation model, and estimate the probability that the extended trajectory and the second skeleton branch belong to the same skeleton through the evaluation model.

[0086] For example, the region corresponding to the surrounding n pixels, including the connection point between the extended trajectory and the second skeleton branch, is divided into a connection region. The connection features include at least one of the following: the first gray-level mean of the extended trajectory in the connection region, the second gray-level mean of the second skeleton branch in the connection region, and the inter-segment variance of gray levels and the inter-segment variance of direction between the extended trajectory and the second skeleton branch in the connection region.

[0087] For example, the inter-grayscale variance g between the extended trajectory and the second skeleton branch at the connection region is calculated according to the following formula:

[0088] g = ω0 * (μ0 - μ) 2 +ω1*(μ1-μ) 2

[0089] μ=ω0*μ0+ω1*μ1

[0090] Where ω0 and μ0 represent the pixel ratio and the first gray-level mean of the extended trajectory in the connection area, respectively; ω1 and μ1 represent the pixel ratio and the second gray-level mean of the second skeleton branch in the connection area, respectively; μ represents the gray-level mean of all pixels in the connection area; and g represents the variance between gray-level segments.

[0091] Pixel ratio ω0 refers to the ratio of the number of pixels in the region where the extended trajectory connects to the landing point, while pixel ratio ω1 refers to the ratio of the number of pixels in the region where the second skeleton branch connects to the landing point.

[0092] For example, if the connection area contains 12 extended trajectory pixels and 7 second skeleton branch pixels, then the pixel ratio ω0 is 12 / (12+7) and the pixel ratio w1 is 7 / (12+7).

[0093] For example, before calculating the variance between direction segments, the direction value needs to be converted into the angle difference between it and the initial direction. If the initial direction is 20 degrees, then the direction value of 350 degrees needs to be converted into -30 degrees, and the direction value of 40 degrees needs to be converted into 20 degrees.

[0094] The preset evaluation model is a machine learning model; for example, the machine learning model framework is SVM, and the RBF radial basis function is used to map the feature vectors. SVM is one of the most classic machine learning models. When applied to object classification, it first finds support vectors between different classes, and then calculates the distance from the support vectors to the hyperplane to maximize the distance between the support vectors, that is, to maximize the margin between samples of different classes in the feature space. The role of the kernel function is to map the feature vectors to a higher-dimensional space, making the originally linearly inseparable data linearly separable in the new higher-dimensional space.

[0095] For example, the connection features are input into a machine learning model, which estimates the probability that the extended trajectory and the second skeleton branch belong to the same skeleton.

[0096] If the estimated probability that the extended trajectory and the second skeleton branch belong to the same skeleton is greater than or equal to a preset probability threshold, then the continuity detection meets the preset requirements, the extended trajectory and the second skeleton branch belong to the same skeleton, and the skeleton fracture repair is determined to be successful. If the estimated probability that the extended trajectory and the second skeleton branch belong to the same skeleton is less than the preset probability threshold, then the continuity detection does not meet the preset requirements, the extended trajectory and the second skeleton branch do not belong to the same skeleton, and the first skeleton branch is determined not to be fractured, that is, the first skeleton branch ends normally at the fracture point, and there is no skeleton fracture. The preset probability threshold can be flexibly set according to the actual situation and is not specifically limited here.

[0097] For example, such as Figure 9 and Figure 10 As shown, Figure 9 The image shows the skeleton before repair, including the first and second skeleton branches. Figure 10 For the repaired skeleton image, continuity detection is performed at the connection points. If the probability that the extended trajectory and the second skeleton branch belong to the same skeleton is less than a preset probability threshold, then the extended trajectory and the second skeleton branch are determined not to belong to the same skeleton. The first skeleton branch at the break point indicates a normal skeleton termination without skeleton breakage. Therefore, errors caused by erroneous repair are avoided, the accuracy of the repair is improved, and the repaired skeleton can better describe the morphology of the detected object.

[0098] The above embodiment generates a potential energy field corresponding to the local region where the break point is located based on the break point of the first skeleton branch in the skeleton image. It obtains the potential energy gradient corresponding to the break point based on the potential energy field, determines the gravity corresponding to the break point based on the potential energy gradient, determines a reference point on the first skeleton branch at a predetermined distance from the break point, calculates the velocity corresponding to the break point based on the reference point and the break point, calculates the extension step corresponding to the break point based on the gravity and velocity, determines the extension point corresponding to the break point based on the extension step, generates an extension trajectory from the break point to the extension point, updates the first skeleton branch based on the extension trajectory, uses the extension point as the new break point, and returns to execute the steps of obtaining the potential energy gradient corresponding to the break point based on the potential energy field and determining the gravity corresponding to the break point based on the potential energy gradient, until the newly generated extension trajectory covers the second skeleton branch, completing the skeleton repair from the first skeleton branch to the second skeleton branch. Therefore, skeleton break repair is achieved, thereby improving the accuracy of detection and analysis of the target object corresponding to the skeleton.

[0099] Please see Figure 11 , Figure 11This is a schematic block diagram of a sperm morphology analyzer provided in an embodiment of this application. The sperm morphology analyzer 30 includes an image scanning module 31 and an image analysis module 32. The image scanning module 31 is used to scan samples, such as sperm samples, and generate images corresponding to the samples, such as a sperm skeleton image. The image analysis module 32 is used to analyze and process the images, such as performing skeleton fracture analysis and repair processing on the sperm skeleton image.

[0100] For example, the image analysis module 32 includes a processor 321 and a memory 322, which are connected by a bus, such as an I2C (Inter-integrated Circuit) bus.

[0101] Specifically, the processor 321 can be a microcontroller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP), etc.

[0102] The memory 322 can be a Flash chip, a read-only memory (ROM), a disk, an optical disk, a USB flash drive, or a portable hard drive, etc.

[0103] The processor 321 is used to run a computer program stored in the memory 322, and when executing the computer program, implements any of the skeleton fracture repair methods provided in the embodiments of this application.

[0104] For example, processor 321 is configured to run a computer program stored in memory, and when executing the computer program, perform the following steps:

[0105] Based on the break point of the first skeleton branch in the skeleton image, the gravity corresponding to the break point is determined;

[0106] Determine a reference point on the first skeleton branch that is a preset number of pixels away from the break point, and calculate the velocity corresponding to the break point based on the reference point and the break point;

[0107] Calculate the extension step corresponding to the break point based on the gravity and the velocity;

[0108] Based on the extension step, the extension point corresponding to the break point is determined, and an extension trajectory extending from the break point to the extension point is generated.

[0109] The first skeleton branch is updated according to the extended trajectory, the extended point is taken as the new break point, and the step of determining the gravity corresponding to the break point based on the break point of the first skeleton branch in the skeleton image is returned to be executed until the newly generated extended trajectory covers the second skeleton branch, and the skeleton repair from the first skeleton branch to the second skeleton branch is completed.

[0110] In some implementations, when processor 321 determines the gravity corresponding to the breakpoint of the first skeleton branch in the skeleton image, it performs the following:

[0111] The rectangular area centered at the fracture point and with a side length of a preset length is defined as the local region;

[0112] Detect whether the second skeleton branch exists in the local area;

[0113] If the second skeleton branch exists in the local region, a potential energy field corresponding to the local region is generated;

[0114] The potential energy gradient corresponding to the fracture point is obtained based on the potential energy field, and the gravitational force corresponding to the fracture point is determined based on the potential energy gradient.

[0115] In some implementations, when generating the potential field corresponding to the local region, the processor 321 is configured to:

[0116] Based on the preset distance-potential energy mapping relationship and the nearest distance between each pixel in the local area and the second skeleton branch, the first potential energy corresponding to each pixel is determined, and the potential energy field is generated.

[0117] In some implementations, processor 321 performs the following before generating the potential field:

[0118] Determine the second potential energy generated by the end point of the second skeleton branch for each pixel;

[0119] When implementing the generation of the potential energy field, processor 321 is used to implement:

[0120] The first potential energy and the second potential energy corresponding to each pixel are superimposed to generate the potential energy field.

[0121] In some implementations, when the processor 321 calculates the velocity corresponding to the break point based on the reference point and the break point, it is configured to:

[0122] The distance between the reference point and the break point is determined as the magnitude of the velocity;

[0123] The direction of the velocity is determined by the straight line from the reference point to the break point.

[0124] In some implementations, the processor 321, when performing the calculation of the extension step corresponding to the break point based on the gravity and the velocity, is configured to:

[0125] Based on the gravity and the velocity, calculate the simulated displacement corresponding to the fracture point per unit time;

[0126] The simulated displacement is scaled down to a fixed value to obtain the extended step.

[0127] In some implementations, when the processor 321 performs the task of determining the gravitational force corresponding to the break point based on the potential energy gradient, it is configured to:

[0128] The magnitude of the potential energy gradient is determined as the magnitude of the gravitational force, and the direction of the potential energy gradient is determined as the direction of the gravitational force.

[0129] In some implementations, processor 321 is also used to implement:

[0130] After the newly generated extended trajectory is applied to the second skeleton branch, the continuity of the connection between the extended trajectory and the second skeleton branch is detected.

[0131] If the continuity test meets the preset requirements, the skeleton fracture repair is considered successful.

[0132] If the continuity test does not meet the preset requirements, it is determined that the first skeleton branch is not broken.

[0133] In some implementations, when performing the continuity detection at the connection point between the extended trajectory and the second skeleton branch, the processor 321 is configured to:

[0134] Obtain the connection features corresponding to the connection point;

[0135] The connection features are input into a preset evaluation model, and the probability that the extended trajectory and the second skeleton branch belong to the same skeleton is estimated through the evaluation model.

[0136] In some implementations, the connection feature includes at least one of the first gray-level mean value of the extended trajectory in the connection region, the second gray-level mean value of the second skeleton branch in the connection region, and the inter-segment variance of gray-level and directional segments of the extended trajectory and the second skeleton branch in the connection region.

[0137] In some implementations, meeting the preset requirements includes the probability estimated by the evaluation model being greater than or equal to a preset probability threshold.

[0138] The embodiments of this application also provide a storage medium storing a computer program, the computer program including skeleton fracture repair program instructions, the processor executing the skeleton fracture repair program instructions to implement the steps of any of the skeleton fracture repair methods provided in the above embodiments.

[0139] The storage medium can be an internal storage unit of the sperm morphology analyzer described in any embodiment of this application, such as the memory or RAM of the sperm morphology analyzer. The storage medium can also be an external storage device of the sperm morphology analyzer, such as a plug-in hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the sperm morphology analyzer.

[0140] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for repairing fractured skeletons, characterized in that, include: Based on the break point of the first skeleton branch in the skeleton image, the gravity corresponding to the break point is determined; Determine a reference point on the first skeleton branch that is a preset number of pixels away from the break point, and calculate the velocity corresponding to the break point based on the reference point and the break point; Calculate the extension step corresponding to the break point based on the gravity and the velocity; Based on the extension step, the extension point corresponding to the break point is determined, and an extension trajectory extending from the break point to the extension point is generated. The first skeleton branch is updated according to the extended trajectory, the extended point is taken as the new break point, and the step of determining the gravity corresponding to the break point based on the break point of the first skeleton branch in the skeleton image is returned to be executed until the newly generated extended trajectory covers the second skeleton branch, and the skeleton repair from the first skeleton branch to the second skeleton branch is completed. The determination of the gravitational force corresponding to the break point based on the break point of the first skeleton branch in the skeleton image includes: The rectangular area centered at the fracture point and with a side length of a preset length is defined as the local region; Detect whether the second skeleton branch exists in the local area; If the second skeleton branch exists in the local region, then the potential energy field corresponding to the local region is generated; The potential energy gradient corresponding to the fracture point is obtained based on the potential energy field, and the gravitational force corresponding to the fracture point is determined based on the potential energy gradient. The step of calculating the velocity corresponding to the fracture point based on the reference point and the fracture point includes: The distance between the reference point and the break point is determined as the magnitude of the velocity; The direction of the velocity is determined by the straight line from the reference point to the break point. The step of calculating the extension step corresponding to the break point based on the gravity and the velocity includes: Based on the gravity and the velocity, calculate the simulated displacement corresponding to the fracture point per unit time; The simulated displacement is scaled down to a fixed value to obtain the extended step.

2. The method according to claim 1, characterized in that, The generation of the potential energy field corresponding to the local region includes: Based on the preset distance-potential energy mapping relationship and the nearest distance between each pixel in the local area and the second skeleton branch, the first potential energy corresponding to each pixel is determined, and the potential energy field is generated.

3. The method according to claim 2, characterized in that, Before generating the potential field, the following steps are included: Determine the second potential energy generated by the end point of the second skeleton branch for each pixel; The generation of the potential energy field includes: The first potential energy and the second potential energy corresponding to each pixel are superimposed to generate the potential energy field.

4. The method according to claim 1, characterized in that, The step of determining the gravitational force corresponding to the break point based on the potential energy gradient includes: The magnitude of the potential energy gradient is determined as the magnitude of the gravitational force, and the direction of the potential energy gradient is determined as the direction of the gravitational force.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: After the newly generated extended trajectory is applied to the second skeleton branch, the continuity of the connection between the extended trajectory and the second skeleton branch is detected. If the continuity test meets the preset requirements, the skeleton fracture repair is considered successful. If the continuity test does not meet the preset requirements, it is determined that the first skeleton branch is not broken.

6. The method according to claim 5, characterized in that, The continuity detection at the connection point between the extended trajectory and the second skeleton branch includes: Obtain the connection features corresponding to the connection point; The connection features are input into a preset evaluation model, and the probability that the extended trajectory and the second skeleton branch belong to the same skeleton is estimated through the evaluation model.

7. The method according to claim 6, characterized in that, The connection feature includes at least one of the following: the first gray-level mean value of the extended trajectory in the connection area, the second gray-level mean value of the second skeleton branch in the connection area, and the inter-segment variance of gray-level and direction segments of the extended trajectory and the second skeleton branch in the connection area.

8. The method according to claim 6, characterized in that, The condition of meeting the preset requirements includes the probability estimated by the evaluation model being greater than or equal to a preset probability threshold.

9. A sperm morphology analyzer, characterized in that, include: The processor and the memory, wherein the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements the skeleton fracture repair method as described in any one of claims 1 to 8.

10. A storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the skeleton fracture repair method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Automatic path recognition method during intersections of sperm paths and sperm quality analysis method

    CN102142092A

  • Winged insect swarm imitating method based on noise recognition

    CN103236072A