Traditional Chinese medicine treatment sperm quality dynamic monitoring system based on time series image analysis

By eliminating non-physiological biases introduced by the stage and liquid microfluidics through temporal image analysis, the problem of misjudgment of sperm motility parameters in microscopic video analysis was solved, enabling continuous and comparable dynamic monitoring of sperm quality and improving the stability and accuracy of classification results.

CN122199455APending Publication Date: 2026-06-12HUAIBEI TRADITIONAL CHINESE MEDICINE HOSPITAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAIBEI TRADITIONAL CHINESE MEDICINE HOSPITAL
Filing Date
2026-03-11
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies for research on the intervention of traditional Chinese medicine in reproductive function, non-physiological offsets introduced by micro-shifts of the stage and microfluidics during microscopic video analysis lead to misjudgments of sperm motility parameters and distortion of classification results, making it difficult to reliably compare changes in motility.

Method used

By using a time-series image analysis method, microscopic image sequences of the same treatment stage are obtained, sperm pixel regions are removed, background displacement correction and microfluidic drift correction are performed, and sperm trajectory is compensated in reverse to achieve healthy and unhealthy classification.

🎯Benefits of technology

In environments with drift interference, continuous, comparable, and more reliable dynamic monitoring of sperm quality was achieved, eliminating the non-physiological offset effects introduced by stage micro-offset and liquid microfluidics, and improving the stability and accuracy of motion feature extraction and classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199455A_ABST
    Figure CN122199455A_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine treatment sperm quality dynamic monitoring system based on time sequence image analysis and relates to the technical field of image analysis, which comprises obtaining time sequence microscopic image sequences and time stamp sequences of the same treatment stage and dividing windows according to preset rules; sperm head detection and segmentation are carried out on the window sequences to generate head masks, and pixel masks covering the whole sperm are obtained through extension; according to the pixel masks, foreground is removed to construct background images and is registered to obtain background displacement, and meanwhile, the head trajectories are tracked based on the head masks, and microflow displacement is estimated in groups; two types of displacement are fused to determine non-physiological overall drift caused by objective table micro-deviation or liquid microflow, false positives and proportional distortion caused by the drift are reduced, and trajectory reverse geometric compensation is carried out; motion features are extracted on the compensation results and are classified into healthy or unhealthy, the healthy proportion is counted according to window time stamps, and continuous monitoring and curative effect evaluation of the traditional Chinese medicine treatment process are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, and more specifically, this application relates to a dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis. Background Technology

[0002] In research and clinical follow-up of traditional Chinese medicine interventions for reproductive function, it is often necessary to use microscopic video to continuously quantify sperm motility in order to compare changes in motility at the same treatment stage. Existing automated analysis is usually based on the apparent displacement of frame-by-frame images. First, the pixel region of the sperm head is located and target association is performed. Then, macroscopic parameters such as velocity and linearity are calculated. Finally, the motility type is classified and the proportion is statistically analyzed through feature distance.

[0003] The above process assumes that the observed displacement mainly comes from the sperm's own movement. However, when there is still a slight offset after the stage is calibrated or when the liquid microflow introduces an overall offset of the sperm cells, the surface observed displacement will be superimposed with non-physiological components. As a result, the offset of non-physiological components will be mistakenly included in the macroscopic parameters and will have a reverse effect on the features, thereby triggering false positives caused by drift. That is, unhealthy sperm will be included in healthy sperm, and ultimately the classification results and proportion statistics will be distorted. Therefore, a dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis is proposed to solve this problem. Summary of the Invention

[0004] To address the aforementioned technical problems, this technical solution provides a dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis, which solves the problems mentioned in the background section.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] This application provides a dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis, used to eliminate non-physiological sperm displacement caused by stage micro-offset or fluid micro-flow. The system includes:

[0007] The data acquisition module is used to acquire time-series microscopic image sequences and their corresponding timestamp sequences for the same treatment stage, and divide them into multiple window image sequences and window timestamp sequences according to preset rules;

[0008] The mask segmentation module is used to detect and segment sperm heads in the window image sequence to obtain the head mask sequence of all sperm, and to generate a sperm mask sequence covering the entire pixel area of ​​the sperm based on the head mask sequence.

[0009] The background displacement acquisition module is used to remove the pixel region covered by the sperm mask sequence from the window image sequence to obtain the background image sequence, and to perform registration on the background image sequence to obtain the background displacement sequence that represents the background offset.

[0010] The microfluidic displacement acquisition module is used to obtain the head trajectory sequence of all sperm by target association and tracking based on the head mask sequence, correct the head trajectory sequence using the background displacement sequence, and obtain the microfluidic displacement sequence characterizing the amount of drift caused by microfluidic drift based on the corrected head trajectory sequence.

[0011] The reverse compensation module is used to determine the non-physiological offset sequence based on the background displacement sequence and the microfluidic displacement sequence, and to perform geometric compensation on the head trajectory sequence accordingly.

[0012] The results output module is used to extract motion features representing sperm motility from the compensated head trajectory sequence and classify them as healthy or unhealthy. The percentage of healthy categories is calculated according to the window timestamp sequence as the monitoring result data.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0014] This application generates a head mask sequence based on sperm head detection and segmentation, and further constructs a sperm mask sequence covering the entire pixel region of the sperm. In the background displacement acquisition stage, the sperm pixel region is first removed and then the background image sequence is registered to obtain the background displacement sequence. This solves the problem that existing background registration is easily affected by sperm target occlusion and dense motion interference, resulting in registration drift and miscalculation. It enables the background displacement to more stably represent the "non-physiological background motion" caused by the micro-offset of the stage, and provides a reliable benchmark for subsequent compensation.

[0015] This application obtains a head trajectory sequence by completing target association and tracking based on the head mask sequence during the microfluidic displacement acquisition stage, and corrects the trajectory using the background displacement sequence. Then, the overall drift caused by the microfluidic flow is inferred from the corrected group trajectory to form a microfluidic displacement sequence. This solves the problem that the macroscopic velocity, linearity and other parameters are systematically increased due to the "overlap of microfluidic overall drift and sperm autonomous movement". It realizes the explicit estimation of the group drift component introduced by the liquid microfluidic flow and avoids miscalculating environmental motion into individual movement ability. Attached Figure Description

[0016] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:

[0017] Figure 1 This is a structural block diagram of the dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis proposed in this invention.

[0018] Figure 2 This is a flowchart of the system method in this invention. Detailed Implementation

[0019] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0020] In existing studies and clinical follow-ups of sperm motility using traditional Chinese medicine interventions for reproductive function, microscopic video is often used to track sperm movement frame by frame and calculate indicators such as speed and linearity to classify motility types and statistically analyze the proportion of healthy sperm. However, this process assumes that the observed displacement is mainly driven by the sperm themselves. When residual micro-displacement of the stage or microfluidic flow introduces overall population drift, the apparent displacement will be superimposed with non-physiological components, causing macroscopic parameters to be systematically elevated and inducing false positives caused by drift (unhealthy sperm being misjudged as healthy). Ultimately, this leads to distortion of classification results and proportion statistics, making it difficult to reliably compare changes in motility at the same treatment stage.

[0021] To address the compatibility issue of "overlapping of non-physiological overall shift and real sperm motility," this scheme divides the same stage of microscopic sequences into windows based on timestamps; uses mask segmentation to obtain sperm head masks and expands them to generate sperm pixel masks to remove sperm regions; performs registration on images containing only the background to obtain a background displacement sequence representing the micro-shift of the stage; then correlates and tracks the sperm head trajectory and corrects it with background displacement, thereby estimating the overall drift caused by microfluidics from the corrected group trajectory to form a microfluidic displacement sequence; subsequently, in reverse compensation, integrates background displacement and microfluidic displacement to determine the non-physiological shift sequence, performs geometric compensation on the trajectory, and finally extracts motion features from the compensation results to complete the healthy or unhealthy classification, and statistically analyzes the proportion of healthy individuals according to the window timestamp as a dynamic monitoring output. Thus, even in real experimental environments with drift interference, it can still achieve continuous, comparable, and more reliable quantitative assessment of sperm quality.

[0022] like Figure 1-2 As shown, this application introduces a dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis, used to eliminate non-physiological sperm displacement caused by stage micro-offset or liquid microflow. The system includes:

[0023] The data acquisition module 100 is used to acquire the time-series microscopic image sequence and its corresponding timestamp sequence of the same treatment stage, and divide it into multiple window image sequences and window timestamp sequences according to preset rules.

[0024] Temporal microscopic image sequence data refers to a collection of multiple frames of microscopic images acquired continuously during the same treatment phase. Specifically, it can be stored in frame order as an image list or a video frame sequence, which can be used as the raw input for subsequent windowing, segmentation, registration and motion analysis.

[0025] Timestamp sequence data refers to the acquisition time information that corresponds one-to-one with each frame in a time-series microscopic image sequence. Specifically, it can be implemented using millisecond or second-level timestamps or frame number-time mapping, which is used to characterize the time scale of sperm motility and support windowed statistical output of monitoring results.

[0026] Window image sequence set data refers to the set of image subsequences within multiple time windows obtained by dividing a time-series microscopic image sequence according to preset rules. Specifically, the windows can be divided according to a preset number of frames or a preset duration, and adjacent windows can either not overlap or slide to overlap according to a preset step size, which is used to realize staged or continuous dynamic monitoring and robust statistics.

[0027] The window timestamp sequence set data refers to the set of timestamp subsequences within each window corresponding to the window image sequence set. Specifically, it can be obtained by slicing the original timestamp sequence according to the same windowing rules, and is used to perform time alignment and output of monitoring results at the window granularity.

[0028] The preset rules specifically include:

[0029] Continuous acquisition is judged based on the interval between adjacent timestamps in the timestamp sequence (e.g., the threshold for judging acquisition interruption is 3 times the normal frame interval). When an acquisition interruption is judged, the position of the interruption is used as the window boundary.

[0030] Within the continuous acquisition segment, a window image sequence and a window timestamp sequence are generated according to a preset number of frames.

[0031] When the number of frames in the window image sequence corresponding to the window is less than the preset number of frames (e.g., the preset number of frames is 120), the window is extended without crossing the boundary of the acquisition interruption; when the extended window meets the preset number of frames, the window is output; when the remaining number of frames in the continuous acquisition segment does not meet the preset number of frames, the remaining frames are formed into a window for output.

[0032] If the continuous acquisition segment can continue to capture subsequent windows according to the preset step size while meeting the preset frame count, then at least two windows are generated and output separately by sliding and overlapping with the preset step size; otherwise, the current window is output directly.

[0033] The mask segmentation module 200 is used to perform sperm head detection and segmentation on the window image sequence to obtain the head mask sequence of all sperm, and to generate a sperm mask sequence covering the entire pixel area of ​​the sperm based on the head mask sequence.

[0034] Head mask sequence data refers to the set of frame-by-frame binary masks obtained after sperm head detection and segmentation of window image sequences. Specifically, it can be obtained through threshold segmentation, edge detection, morphological processing or learning models, and connected components are filtered to remove non-head regions, which are used to provide structured target representations for trajectory extraction and subsequent mask expansion.

[0035] Sperm mask sequence data refers to a set of frame-by-frame multi-value masks that are further generated from the head mask and cover the entire pixel region of the sperm (including the extension in the tail direction). Different sperm take different values. Specifically, it can be obtained by expanding the head pixel region and combining it with region growth and connectivity consistency reconstruction. It is used to remove the sperm pixel region in the background processing stage to reduce registration interference.

[0036] Background displacement acquisition module 300 is used to remove the pixel area covered by the sperm mask sequence from the window image sequence to obtain a background image sequence, and to perform registration on the background image sequence to obtain a background displacement sequence that represents the background offset.

[0037] Background image sequence data refers to the set of images containing only background information obtained after removing sperm pixel regions from the window image sequence based on sperm pixel masks. Specifically, it can be achieved by performing time window background modeling and filling on the removed regions (such as moving median or moving mean modeling), which is used to estimate the background displacement caused by micro-offsets of the stage, such as micro-drift of the slide, with less foreground interference.

[0038] Background displacement sequence data refers to the frame-by-frame background displacement result sequence obtained after registering and fusing the background image sequence. Specifically, it can be represented as a two-dimensional displacement vector sequence of each frame relative to the reference frame or relative to the previous frame, used to characterize the global displacement components caused by non-physiological factors such as micro-offset of the stage.

[0039] The microfluidic displacement acquisition module 400 is used to obtain the head trajectory sequence of all sperm by target association and tracking based on the head mask sequence, correct the head trajectory sequence using the background displacement sequence, and obtain the microfluidic displacement sequence characterizing the amount of drift caused by microfluidic drift based on the corrected head trajectory sequence.

[0040] Head trajectory sequence data refers to the set of sperm head trajectories that change over time after target association and tracking based on head mask sequences. Specifically, it can be stored in the form of a trajectory point sequence structure of "target ID - time - position" to distinguish between sperm's own movement and external drift and to support the extraction of movement features.

[0041] Microfluidic displacement sequence data refers to the displacement sequence obtained by statistically analyzing the uniform displacement of the entire head trajectory sequence, which represents the overall drift caused by microfluidic drift. It refers to the residual group drift after deducting the background displacement, and only represents the liquid microfluidic component. Specifically, it can be achieved by statistically analyzing the displacement of adjacent time moments and removing outlier displacements, and is used to characterize the overall drift caused by external factors such as liquid microfluidics.

[0042] The reverse compensation module 500 is used to determine the non-physiological offset sequence based on the background displacement sequence and the microfluidic displacement sequence, and to perform geometric compensation on the head trajectory sequence accordingly.

[0043] Non-physiological offset sequence data refers to the overall offset sequence caused by non-physiological factors such as stage micro-offset and liquid microfluidics, obtained by fusing background displacement sequence and microfluidic displacement sequence. It is used as the core correction quantity for reverse compensation.

[0044] Reverse geometric compensation data refers to the compensation result generated by reverse displacement correction of the head trajectory sequence based on the non-physiological offset sequence. Specifically, it can apply geometric transformations in opposite directions to the trajectory coordinates and image coordinates to eliminate the interference of external drift on sperm motility assessment.

[0045] The output module 600 is used to extract motion features representing sperm motility from the compensated head trajectory sequence and classify them as healthy or unhealthy. The percentage of healthy categories is calculated according to the window timestamp sequence as the monitoring result data.

[0046] The motion features are macroscopic features extracted from the compensated head trajectory sequence, and the macroscopic features include at least one of velocity, linearity, sway amplitude, and turning frequency.

[0047] The healthy or unhealthy classification result data refers to the category label or probability result output based on motion characteristics and after removing low-confidence samples. Specifically, it can be a binary classification label (healthy or unhealthy) or its confidence score, which is used to form window-level and stage-level dynamic monitoring conclusions.

[0048] The health category proportion monitoring result data refers to the proportion of healthy samples statistically obtained at the window granularity of the window timestamp sequence set. Specifically, it can be calculated according to the "number of health tags or number of valid samples" within the window, and is used as the final output of the system for dynamic monitoring results of sperm quality.

[0049] This application employs a dual-channel approach of "background displacement + population-consistent drift" to separate and estimate non-physiological overall offset. On one hand, by removing sperm pixel regions from the window image and registering them with the background image sequence, a background displacement sequence reflecting factors such as stage micro-displacement is obtained. On the other hand, by target association and tracking of all sperm heads, the population consistency statistics of the trajectory displacement after background displacement sequence directional compensation are used to obtain a microfluidic displacement sequence characterizing external factors such as fluid micro-flow. Furthermore, reverse geometric compensation is performed on the sperm trajectory and local images, thereby continuously suppressing external drift interference during dynamic monitoring, improving the stability and accuracy of motion feature extraction and healthy / unhealthy classification, and ultimately achieving health ratio monitoring results output according to time windows.

[0050] The process of obtaining the head mask sequence includes:

[0051] After normalizing and denoising the window image sequence (such as median filtering or Gaussian filtering), threshold segmentation, edge detection, and morphological processing (such as opening and closing operations and hole filling) are used to obtain the frame-by-frame binary head mask of all sperm (1 is the head pixel, 0 is the background).

[0052] The connected components of the frame-by-frame binary head mask are labeled in each frame, so that different connected components in the same frame correspond to different label values, and the frame-by-frame multi-value head mask sequence is output (different connected components in the same frame are assigned different label values, and each label value corresponds to a head candidate).

[0053] Perform connected component analysis on the connected components corresponding to each marker value in each frame of the head mask sequence, remove connected components that do not meet the preset filtering conditions (such as the area being too small or too large, for example, the area having a pixel value less than 60 or greater than 650), and output the filtered head mask sequence.

[0054] The connected components corresponding to the filtered head mask sequence are compared with preset abnormal conditions (such as the area being significantly larger than the upper limit of a single head, for example, the aspect ratio being greater than 3.2). When it is determined that the connected component includes at least two sperm heads, the connected component is split (such as splitting based on distance transformation + watershed or concave point) and the head mask of the frame is updated. Different label values ​​are assigned to each connected component obtained by splitting.

[0055] If the splitting result does not meet the preset filtering conditions, the connected components before splitting are retained and the updated header mask sequence is output. If each connected component obtained by splitting meets the filtering conditions, the mask of the frame is updated and a new label value is assigned to each connected component. If the splitting result does not meet the filtering conditions, the connected components before splitting are retained and the updated mask is output.

[0056] The process of obtaining the sperm mask sequence includes:

[0057] The principal axis direction is determined for each head pixel region in each frame of the head mask sequence (e.g., based on second-order moments or PCA), and the head pixel region is expanded by directional dilation (using a structuring element that is longer along the principal axis) with the principal axis direction as a constraint to obtain an expanded region (to cover the possible tail direction range).

[0058] Within the extended region, region growth is performed based on the preset grayscale continuity conditions of the window image sequence to complete the relevant pixels at the tail. Specifically, within the extended region, region growth is performed using the head boundary neighborhood as a seed: pixels to be grown are only incorporated if they meet the grayscale continuity conditions (e.g., the grayscale difference with the current growth region does not exceed a threshold; for example, in an 8-bit grayscale image of 0–255, the grayscale difference threshold for the growth region can be ±15 grayscale levels); if pixels to be grown do not meet the grayscale continuity conditions, a stop judgment is triggered, and they are not incorporated into the growth region.

[0059] The region growth results are reconstructed using connectivity consistency. Pixels connected to the corresponding head pixel region are retained as sperm pixel regions. Isolated noise and disconnected tail artifacts are removed. Frame-by-frame sperm pixel masks are output to form a sperm mask sequence.

[0060] This application further proposes that, before obtaining the background displacement sequence, the background displacement acquisition module is also used to determine the set of background regions for registration, specifically including:

[0061] Remove the pixel region covered by the sperm mask sequence from the window image sequence, perform time window background modeling on the removed pixel region, fill and retain the original background pixels of the non-sperm pixel region, and output the background image sequence.

[0062] Non-sperm pixel preservation: For any pixel coordinate (x,y), if the sperm pixel mask value is 0, then the original background pixel is directly copied.

[0063] Sperm pixel removal and filling: If the sperm pixel mask value is 1, collect the set of pixel values ​​at the same coordinate that satisfy the sperm pixel mask value of 0 within a time window centered at t (e.g., K frames before and after t, for a total of 2K+1 frames), and use the median as the filling value for the background modeling of the time window; if the number of available samples is 0, that is, the position is always covered by sperm within the time window, then interpolate the non-sperm pixels in the neighborhood of the pixel coordinates within the same frame t, such as bilinear interpolation or the nearest neighbor non-sperm pixel as the filling value.

[0064] The background image is divided into multiple background reference regions. Regions in the background reference regions whose background texture intensity is greater than a preset intensity threshold (e.g., the background intensity threshold can be 30) and whose sperm coverage in the time window is less than a preset coverage threshold (e.g., the coverage threshold can be 0.2) are selected as the background region set. The background texture intensity is calculated by the statistics of the Laplacian response variance in the background reference regions.

[0065] Texture intensity calculation: For each candidate background reference region, first perform Laplacian filtering on the background image to obtain the Laplacian response map; then calculate the variance of the Laplacian response values ​​within the candidate background reference region, which is used as the background texture intensity of the region in frame t. If the background texture intensity is greater than the background intensity threshold, the region is retained; otherwise, it is discarded.

[0066] The calculation process for the background texture intensity is as follows:

[0067] Calculate the Laplace response value ;

[0068] in, This represents the Laplacian response value of pixel coordinates (x, y) in the background reference region of frame t. Represents the reference region of the background in frame t. The response after Laplacian filtering at pixel (x,y);

[0069] Calculate the mean of the Laplace response within the background reference region. ;

[0070] in, This represents the mean of the Laplace response within the k-th background reference region of the t-th frame. express Total number of internal pixels, This represents the set of pixel coordinates within the k-th background reference region;

[0071] The formula for calculating background texture intensity is as follows: ;

[0072] in, This represents the background texture intensity of the k-th background reference region in the t-th frame. This represents the squared deviation of the Laplace response from the mean.

[0073] Sperm coverage rate is measured using a time window coverage rate, which satisfies the following conditions: , ;

[0074] in, This represents the proportion of sperm pixels covering the k-th background reference region in the t-th frame within a time window centered at t and with a half-window length of K (e.g., 3). This represents the set of pixel coordinates for the k-th background reference region. Its total number of pixels; Indicates the first The frame sperm pixel mask value at pixel (x,y); and in... The background area set is filtered by comparing it with a preset coverage threshold.

[0075] This application addresses the issues of sperm occlusion interference and unstable displacement sequences in background registration under microscopic scenes through the following technical solutions: In the background displacement acquisition stage, sperm regions are eliminated based on sperm pixel masks, and background filling is performed using median modeling within a time window and intra-frame neighborhood interpolation; the background image is divided into candidate reference regions, strong texture regions are filtered using Laplacian response variance, and high occlusion regions are eliminated by combining coverage thresholds, resulting in a set of usable background regions for each frame to improve registration reliability and ensure that the compensation results match the actual motion offset.

[0076] This application further proposes a process for obtaining a background displacement sequence representing the background shift by registering on a background image sequence, specifically including:

[0077] A reference frame is determined in the background image sequence, and other background images in the background image sequence other than the reference frame are used as frames to be registered.

[0078] Count the number of available background areas in each frame and select the frame with the largest number of available background areas as the reference frame; if there are ties, select the frame that is more in the middle in time (such as the middle frame of the window) to reduce cumulative drift.

[0079] For each frame to be registered, multi-scale registration is performed on the background regions that are the same as those in the reference frame to obtain the region background displacement and region matching similarity corresponding to each background region.

[0080] Outlier results of regional background displacement are removed, and the remaining regional background displacements are weighted and fused according to regional matching similarity to obtain the fused displacement of the frame to be registered. At the same time, the matching similarity of the frame to be registered is calculated based on the mean of regional matching similarity and the proportion of the remaining regional background displacement.

[0081] For each reference region, determine the matching region in the frame t to be registered:

[0082] Prioritize regions with the same number or position; if unavailable, use alternatives: select the region with the largest spatial overlap with the region in the reference frame as the alternative; if the largest overlap is still less than the preset minimum overlap threshold (e.g., 0.5), then the region will not participate in registration in this frame.

[0083] Perform multi-scale (coarse to fine) registration on the matching region image patch in each pair of reference frames and the region image patch to be matched in the frame to be registered:

[0084] Construct a pyramid of two regions of images (e.g., 3 layers: 1 or 4, 1 or 2, original scale).

[0085] Template matching or registration search is performed at the coarsest layer to obtain coarse displacement; the displacement is then propagated layer by layer to finer scales and refined within a smaller search window.

[0086] Output the region background displacement, convert it to the original scale pixel displacement, and output the matching similarity score as the region matching similarity (e.g., normalized cross-correlation score, range 0–1, the larger the better).

[0087] When the matching similarity is greater than or equal to the preset similarity threshold (for example, a value of 0.6), the fused displacement is used as the background displacement of the corresponding frame to be registered; when the matching similarity is less than the similarity threshold, the predicted displacement obtained based on the historical background displacement is output as the background displacement of the corresponding frame to be registered, thus forming a background displacement sequence.

[0088] When the effective historical displacement is not less than two frames, the displacement of the two most recent frames is linearly extrapolated; when it is less than two frames, the displacement of the previous frame is used; the displacement of the reference frame is initialized to zero.

[0089] The formula for calculating the matching similarity score is as follows:

[0090] ;

[0091] in, Indicates the pixel coordinates of the image patch matching the reference frame. The grayscale or intensity value at that location This indicates the pixel coordinates of the image patch to be matched in the frame to be registered. The corresponding grayscale or intensity value, This represents the displacement (translation) vector of the region, that is, the amount by which B is translated relative to A. Indicates displacement Below, the pixel values ​​at the corresponding positions after B is aligned with A. This represents the set of pixel coordinates involved in the calculation, for example, matching all pixels within the window to be matched. Indicates that reference block A is in The mean of the above values ​​is calculated using the following formula: , Displacement Below, B(·+A) is in The mean of the above values ​​is calculated using the following formula: , This represents a very small positive number, used to avoid numerical instability caused by a denominator of 0, and normalizes the matching similarity score.

[0092] Through the above technical solution, this application solves the problem of unstable displacement estimation caused by changes in local background availability, accumulation of registration errors, and abnormal matching results in the existing temporal background displacement acquisition process: by selecting a reference frame in the background image sequence and using its background reference region as the matching region, and using the remaining frames as the frames to be registered; for each frame to be registered, the matching region corresponding to each matching region is selected from the background region and multi-scale registration is performed to obtain the regional background displacement and the regional matching similarity represented by the matching similarity score; then outlier results are removed, and the fused displacement is obtained by weighted fusion according to the similarity score, while the frame-level matching similarity is calculated by combining the proportion of regional matching similarity and the remaining regional background displacement; finally, the reliability is judged based on the frame-level matching similarity and the preset threshold. If the quality meets the standard, the fused displacement is output; if the quality is insufficient, the displacement predicted by the historical background displacement is output as compensation, thereby forming a continuous and robust background displacement sequence to support subsequent dynamic monitoring and analysis.

[0093] This application further proposes a process for removing outliers from the background displacement of the region, which specifically includes:

[0094] Obtain the background displacement of all background regions in the frame to be registered, and calculate the reference displacement by weighting the region matching similarity.

[0095] The deviation metric is obtained by calculating the difference between the regional background displacement and the reference displacement, and the deviation metric is the Euclidean distance.

[0096] When the deviation metric is greater than the preset deviation threshold (for example, the preset deviation threshold can be 0.3), the background displacement of the corresponding area will be removed.

[0097] Wherein, the reference displacement is the weighted median, and its calculation formula is: ;

[0098] in, This represents the reference displacement of frame a to be registered. , This represents the region background displacement vector corresponding to all background regions in frame a to be registered. This indicates the amount of background displacement in the region, corresponding to the number of regions involved in the registration. This represents the matching similarity score corresponding to the background displacement of the k-th region. This indicates the calculation of the weighted median;

[0099] All candidate background displacements are weighted according to their matching similarity scores, with higher-scoring candidates contributing more to the results; then, the weighted sum is used for normalization to obtain the baseline displacement.

[0100] Through the above technical solution, this application solves the problem in existing background displacement estimation that the regional displacement distribution is discrete due to local matching errors or noise interference, and outlier results are easy to occur, thus reducing the registration stability: For the frame to be registered, the regional background displacements of each background region are collected to form a candidate set, and the regional displacements are weighted and averaged according to the matching similarity score to obtain the reference displacement; then, the deviation of each regional displacement relative to the reference displacement is measured by Euclidean distance. When the deviation does not exceed the preset deviation threshold, it is retained; when it exceeds the threshold, it is judged as an outlier and removed, thereby obtaining a stronger candidate set and improving the robustness of background displacement screening and subsequent registration accuracy.

[0101] This application further proposes that the process of directional correction of the head trajectory sequence in the microfluidic displacement acquisition module includes:

[0102] Target association and tracking are performed based on head mask sequences to output the head trajectory sequences of all sperm.

[0103] For each trajectory point in the head trajectory sequence, based on the displacement vector of the background displacement sequence at the time corresponding to that trajectory point, coordinate correction is applied to the coordinates of the trajectory point in the opposite direction to the displacement vector, so as to output the corrected head trajectory sequence, where the trajectory point is the centroid of the sperm head.

[0104] Input the head mask sequence and the background displacement sequence.

[0105] Mask tracking: The centroids of all sperm head instances in each frame are extracted from the head mask sequence, and the targets are associated according to the minimum distance between adjacent frames to form a head trajectory sequence of "target ID - time - position".

[0106] Inter-frame alignment: Obtain the background displacement sequence corresponding to the head trajectory sequence; match each trajectory point to the background displacement vector at the same time according to the timestamp (if the background displacement is relative to the previous frame, it is first accumulated to form a relative reference frame), and obtain the background displacement vector corresponding to each trajectory point.

[0107] Reverse direction correction: Subtract the background displacement vector at that moment from the coordinates of each trajectory point (i.e., apply a correction in the opposite direction) to obtain the corrected trajectory sequence.

[0108] Through the above technical solution, this application solves the problem that the existing sperm motility trajectory is easily affected by background drift, resulting in deviation in direction judgment and insufficient trajectory consistency: First, target association and tracking are completed based on the head mask sequence, and the head trajectory sequence of all sperm is output; then, for each trajectory point, reverse coordinate compensation is applied using the background displacement vector at the same time, thereby effectively offsetting the interference of background motion on the trajectory direction, improving the authenticity, stability and reliability of sperm head trajectory and subsequent displacement analysis.

[0109] This application further proposes that the process of obtaining the microfluidic displacement sequence in the microfluidic displacement acquisition module includes:

[0110] Based on the corrected head trajectory sequence, the coordinate difference of the trajectory points of the centroid of each sperm head at adjacent time points is calculated to obtain the displacement sample set.

[0111] The formula for calculating the displacement sample set is: ;

[0112] in, This represents displacement samples at adjacent time points. This represents the head coordinate of the nth trajectory at time t+1. This represents the head coordinate of the nth trajectory at time t.

[0113] The window image is divided into multiple sub-regions, and the displacement sample set is assigned to the corresponding sub-region according to the spatial location of the trajectory points to form a sub-region displacement sample set. ;

[0114] in, This indicates that at adjacent times t→t+1 in the subregion The set of displacement samples within, This represents displacement samples at adjacent time points. This represents the sub-region in the i-th row and j-th column;

[0115] For each sub-region displacement sample set, calculate the dispersion degree and the proportion of effective trajectories, and remove sub-regions with a dispersion degree greater than a preset dispersion threshold (e.g., a value of 1.2 pixels) or a proportion of effective trajectories less than a preset proportion threshold (e.g., a value of 0.05).

[0116] The formula for calculating central tendency is: ;

[0117] in, Subregion The central tendency in adjacent time intervals t→t+1 This represents the displacement sample in the x-direction component. This represents the displacement sample in the y-direction component.

[0118] The formula for calculating the degree of dispersion is: ;

[0119] in, This indicates the degree of dispersion of the sub-region displacement sample set. Indicates in set Take the median above, express and The Euclidean distance between them.

[0120] The formula for calculating the percentage of valid trajectories is: ;

[0121] in, This indicates the percentage of valid trajectories. This indicates the number of trajectories that provide valid displacement samples within the sub-region. This represents the total number of trajectories appearing within this sub-region.

[0122] Extract the group-consistent displacement of the remaining sub-region as the sub-region microfluidic displacement at the corresponding time.

[0123] The formula for calculating the uniform displacement of the group is: ;

[0124] in, Indicates a uniform displacement of the group. This is the set of displacement samples for the remaining sub-regions. Indicates the number of elements in the set;

[0125] The microfluidic displacements of the remaining sub-regions are weighted and fused according to the proportion of their effective trajectories to obtain the microfluidic displacements at corresponding adjacent time points, and the microfluidic displacement sequence is output along time.

[0126] Calculate the population consistency index characterizing the reliability of microfluidic displacement sequences;

[0127] The formula for calculating the group consistency index is: ;

[0128] in, This represents the population consistency index for that sub-region at that adjacent time point, with a value range of 0-1. This indicates the degree of dispersion of the sub-region. To represent a very small positive number, used to avoid a denominator of 0. Less than and Less than Then let The value is 1. , ,For example, The value can be between 0.2 and 0.5. The value can be between 0.16 and 1.36.

[0129] Through the above technical solution, this application solves the problems of unstable microfluidic field extraction and insufficient reliability in existing microfluidic displacement estimation caused by individual sperm movement differences, local sample sparsity, and outlier displacement interference: First, the coordinate difference of trajectory points at adjacent time points is calculated based on the corrected head trajectory sequence to form a displacement sample set; then, the background image is divided into multiple sub-regions and samples are allocated according to the spatial position of trajectory points to obtain the displacement sample set of each sub-region; further, the dispersion and the proportion of effective trajectories are calculated for each sub-region. When the dispersion exceeds the threshold or the proportion of effective trajectories is lower than the threshold, the sub-region is judged as low reliability to avoid misleading; finally, the population consistency displacement is extracted from the remaining sub-regions as the sub-region microfluidic displacement at each time point, and the microfluidic displacement sequence containing all sub-regions is output along time. At the same time, the population consistency index is calculated to quantify the reliability of the entire microfluidic displacement sequence.

[0130] This application further proposes a process for dividing the region into multiple sub-regions, including:

[0131] The window image is divided into grids according to a preset number of rows and columns (e.g., 4×4) to form an initial set of sub-regions. The displacement sample set is then assigned to the corresponding sub-regions according to the spatial location of the trajectory points (e.g., the "displacement start coordinates" of each sample) to form a sub-region displacement sample set.

[0132] The sub-regions are merged or subdivided based on the dispersion and the proportion of valid trajectories at multiple consecutive adjacent time points (e.g., a value of 3): when the proportion of valid trajectories in any sub-region is less than a preset proportion threshold (e.g., a value of 5%), the sub-region is merged with its neighboring sub-regions; when the dispersion of any sub-region is greater than a preset dispersion threshold (e.g., a value of 1.2 pixels), the sub-region is subdivided into multiple smaller sub-regions (e.g., 2×2) until the dispersion of all sub-regions is less than or equal to the dispersion threshold, and the samples are redistributed according to the starting coordinates.

[0133] Through the above technical solution, this application solves the problems of mismatched regional granularity and uneven sample distribution caused by fixed grids in the spatial division of existing displacement samples: First, the background image is gridded according to preset rows and columns to generate initial sub-regions, and displacement samples are allocated to the corresponding sub-regions according to the starting coordinates of trajectory points; then, the regions are adaptively updated by combining the dispersion of multiple consecutive adjacent time points and the proportion of effective trajectories. When the proportion of effective trajectories in a sub-region is lower than a threshold, it is merged with adjacent regions to improve statistical reliability. When the dispersion of a sub-region is higher than a threshold, it is subdivided into smaller sub-regions and samples are redistributed to enhance spatial consistency. Thus, while ensuring the density of effective samples, it also takes into account the characterization of local motion differences, improving the stability and accuracy of sub-region modeling.

[0134] This application further proposes that the process of determining non-physiological offset sequences in the reverse compensation module includes:

[0135] The background displacement sequence and the microfluidic displacement sequence are time-aligned based on the timestamp correspondence. A pairing relationship of "same time" is established according to the timestamp. If there are dropped frames or the timestamps are not completely consistent, the nearest timestamp is used for matching, and the displacement of the missing time is filled in by linear interpolation of adjacent times.

[0136] Based on the matching similarity and group consistency index, the corresponding weights are determined and the background displacement sequence and the microfluidic displacement sequence are weighted and fused to obtain the overall offset sequence;

[0137] The formula for calculating the overall offset is: ;

[0138] in, This represents the overall offset at time t. The background displacement weight at time t is represented. This represents the background displacement at time t. This represents the microfluidic displacement weight at time t. This represents the microfluidic displacement at time t.

[0139] When the matching similarity is less than the similarity threshold (e.g., the similarity threshold can be 0.8) and the group consistency index is less than the preset group consistency threshold (e.g., the consistency threshold can be 0.6), the predicted overall offset at the corresponding time is obtained based on the historical overall offset. The prediction is performed using the historical overall offset, preferably using the two most recent times for linear extrapolation; if there are less than two times, the previous time is used to obtain the predicted overall offset, and the predicted overall offset is used to replace the overall offset at the current time.

[0140] The overall offset sequence is smoothed by moving mean or moving median within a window, and shortened window or endpoint replication is used at the boundaries to ensure that there is output at each time step, thus obtaining a non-physiological offset sequence.

[0141] The specific process for determining the corresponding weights based on matching similarity and group consistency indices is as follows:

[0142] The formula for calculating credibility is:

[0143] ;

[0144] Where t represents the aligned time index. This represents the matching similarity at time t. Indicates the confidence level of the background displacement. The population consistency index at time t is represented. Indicates the reliability of microfluidic displacement;

[0145] The formula for calculating the weights is:

[0146]

[0147] in, The background displacement weight at time t is represented. This represents the microfluidic displacement weight at time t.

[0148] Through the above technical solution, this application solves the problem of unstable overall offset estimation caused by inconsistent timestamps, missing frames, and fluctuations in registration quality or group consistency between the background displacement sequence and the microfluidic displacement sequence during the reverse compensation process: First, the two types of displacements are aligned based on the timestamp correspondence, and the missing times are filled by the nearest timestamp matching and linear interpolation; then, the credibility is calculated and weights are generated based on the matching similarity and group consistency index, and the background displacement and microfluidic displacement at each time are weighted and fused to obtain the overall offset sequence; when the index is lower than the threshold, a linear extrapolation prediction value based on the historical overall offset is introduced to replace it to enhance robustness; finally, the sequence is smoothed by moving average or median to obtain the non-physiological offset sequence, ensuring that the compensation result is continuous, reliable and noise-resistant.

[0149] This application further proposes improvements in the reliability of calculating microfluidic displacements. Introducing gating factors to characterize physiologically consistent movement , so that: ;

[0150] in, The orientation concentration is calculated from the orientation concentration of the displacement sample set corresponding to the corrected head trajectory sequence. satisfy:

[0151] ;

[0152] in, This represents the number of valid displacement samples, i.e., the number of valid trajectories.

[0153] Physiologically consistent motion gating factors reduce the weight of microfluidic displacement or use only background displacement for compensation when there is a high degree of uniformity in the orientation of the population.

[0154] Among them, physiologically consistent motion gating factors The calculation formula is:

[0155] ;

[0156] This represents the upper threshold, and can take a value of 0.7. This represents the lower threshold, which can be 0.3.

[0157] Through the above technical solution, this application solves the problem of insufficient displacement reliability caused by individual motion abnormalities or noise interference in existing microfluidic displacement estimation. By introducing a physiologically consistent motion gating factor, the weight of microfluidic displacement is dynamically adjusted according to the consistency of the group's motion direction. This not only prevents misjudgment of abnormal microfluidic displacement when the direction is highly consistent, but also ensures displacement accuracy under normal conditions. At the same time, adaptive gating is achieved through direction concentration calculation to ensure the reliability and physiological consistency of displacement compensation.

[0158] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis, used to eliminate non-physiological sperm displacement caused by stage micro-offset or liquid microflow, characterized in that, The system includes: The data acquisition module is used to acquire time-series microscopic image sequences and their corresponding timestamp sequences for the same treatment stage, and divide them into multiple window image sequences and window timestamp sequences according to preset rules; The mask segmentation module is used to detect and segment sperm heads in the window image sequence to obtain the head mask sequence of all sperm, and to generate a sperm mask sequence covering the entire pixel area of ​​the sperm based on the head mask sequence. The background displacement acquisition module is used to remove the pixel region covered by the sperm mask sequence from the window image sequence to obtain the background image sequence, and to perform registration on the background image sequence to obtain the background displacement sequence that represents the background offset. The microfluidic displacement acquisition module is used to obtain the head trajectory sequence of all sperm by target association and tracking based on the head mask sequence, correct the head trajectory sequence using the background displacement sequence, and obtain the microfluidic displacement sequence characterizing the amount of drift caused by microfluidic drift based on the corrected head trajectory sequence. The reverse compensation module is used to determine the non-physiological offset sequence based on the background displacement sequence and the microfluidic displacement sequence, and to perform geometric compensation on the head trajectory sequence accordingly. The results output module is used to extract motion features representing sperm motility from the compensated head trajectory sequence and classify them as healthy or unhealthy. The percentage of healthy categories is calculated according to the window timestamp sequence as the monitoring result data.

2. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 1, characterized in that, Before obtaining the background displacement sequence, the background displacement acquisition module is also used to determine the set of background regions for registration, specifically including: Remove the pixel region covered by the sperm mask sequence from the window image sequence, perform time window background modeling on the removed pixel region, fill and retain the original background pixels of the non-sperm pixel region, and output the background image sequence. The background image is divided into multiple background reference regions. Regions in the background reference regions with background texture intensity greater than a preset intensity threshold and sperm coverage rate less than a preset coverage threshold within a time window are selected as the background region set. The background texture intensity is calculated from the statistics of the Laplacian response variance within the background reference regions.

3. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 2, characterized in that, The calculation process for background texture intensity is as follows: Calculate the Laplace response value ; in, This represents the Laplacian response value of pixel coordinates (x, y) in the background reference region of frame t. Represents the background reference region of frame t. The response after Laplacian filtering at pixel (x,y); Calculate the mean of the Laplace response values ​​within the background reference region. ; in, This represents the mean of the Laplace response within the k-th background reference region of the t-th frame. express Total number of internal pixels, This represents the set of pixel coordinates within the k-th background reference region; The formula for calculating background texture intensity is as follows: ; in, This represents the background texture intensity of the k-th background reference region in the t-th frame. This represents the squared deviation of the Laplace response value from the mean; The calculation process for sperm coverage is as follows: Calculate the first Sperm pixel coverage ratio in the k-th background reference region of frame ; in, This represents the set of pixel coordinates for the k-th background reference region. for The total number of pixels; Indicates the first The mask value of the frame sperm mask at pixel (x,y); Sperm coverage is calculated using a time window coverage rate, which satisfies the following: ; in, This represents the proportion of sperm pixels covered by the k-th background reference region in frame t within a time window centered at t and with a half-window length of K.

4. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 3, characterized in that, The process of registering a background image sequence to obtain a background displacement sequence representing the background shift specifically includes: A reference frame is determined in the background image sequence, and other background images in the background image sequence other than the reference frame are used as frames to be registered. For each frame to be registered, multi-scale registration is performed on the background regions that are the same as those in the reference frame to obtain the region background displacement and region matching similarity corresponding to each background region. Outlier results of regional background displacement are removed, and the remaining regional background displacements are weighted and fused according to regional matching similarity to obtain the fused displacement of the frame to be registered. At the same time, the matching similarity of the frame to be registered is calculated based on the mean of regional matching similarity and the proportion of the remaining regional background displacement. When the matching similarity is greater than or equal to the preset similarity threshold, the fused displacement is used as the background displacement of the frame to be registered; when the matching similarity is less than the similarity threshold, the predicted displacement obtained based on the historical background displacement is output as the background displacement of the frame to be registered, thus forming a background displacement sequence.

5. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 4, characterized in that, The process of removing outliers from the regional background displacement includes: Obtain the background displacement of all background regions in the frame to be registered, and calculate the reference displacement by weighting the median of the regions based on their matching similarity. The deviation metric is obtained by calculating the difference between the regional background displacement and the reference displacement, and the deviation metric is the Euclidean distance. When the deviation measurement is greater than the preset deviation threshold, the background displacement of the corresponding area will be removed. The formula for calculating the reference displacement is as follows: ; in, This represents the reference displacement of frame a to be registered. , This represents the region background displacement corresponding to all background regions in frame a to be registered. Indicates the amount of background displacement in the region. This represents the matching similarity corresponding to the background displacement of the k-th region. This indicates the calculation of the weighted median.

6. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 5, characterized in that, In the microfluidic displacement acquisition module, the process of directional correction of the head trajectory sequence includes: Target association and tracking are performed based on head mask sequences to output the head trajectory sequences of all sperm. For each trajectory point in the head trajectory sequence, based on the displacement vector of the background displacement sequence at the time corresponding to that trajectory point, coordinate correction is applied to the coordinates of that trajectory point in the opposite direction of the displacement vector, so as to output the corrected head trajectory sequence, where the trajectory point is the centroid of the sperm head.

7. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 6, characterized in that, In the microfluidic displacement acquisition module, the process of obtaining the microfluidic displacement sequence includes: Based on the corrected head trajectory sequence, the coordinate difference of the trajectory points of the centroid of each sperm head at adjacent time points is calculated to obtain the displacement sample set. The window image is divided into multiple sub-regions, and the displacement sample set is assigned to the corresponding sub-region according to the spatial location of the trajectory points to form a sub-region displacement sample set. ; in, This indicates that at adjacent times t→t+1 in the subregion The set of displacement samples in the sub-regions within, This represents displacement samples at adjacent time points. This represents the sub-region in the i-th row and j-th column. For each sub-region displacement sample set, calculate the degree of dispersion and the proportion of effective trajectories, and remove sub-regions with a degree of dispersion greater than a preset dispersion threshold or a proportion of effective trajectories less than a preset proportion threshold; Extract the group-consistent displacement of the remaining sub-region as the sub-region microfluidic displacement at the corresponding time. The formula for calculating the group uniform displacement of a subregion is: ; in, Indicates a uniform displacement of the group. This is the set of sub-region displacement samples for the remaining sub-regions. Indicates the number of elements in the set; The microfluidic displacements of the remaining sub-regions are weighted and fused according to the proportion of their effective trajectories to obtain the microfluidic displacements at the corresponding time, and the microfluidic displacement sequence is output along time. Calculate the population consistency index characterizing the reliability of microfluidic displacement sequences; The formula for calculating the group consistency index is: ; in, This represents the population consistency index for that sub-region at that adjacent time. This indicates the degree of dispersion of the sub-region. Represents a very small positive number; like and ,but The value is 1, where, To preset the displacement threshold for zero drift determination, The preset zero drift determination discreteness threshold is used.

8. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 7, characterized in that, The process of dividing the region into multiple sub-regions includes: The window image is divided into grids according to a preset number of rows and columns to form an initial set of sub-regions. The displacement sample set is then distributed to the corresponding sub-regions according to the spatial location of the trajectory points to form a sub-region displacement sample set. The sub-regions are merged or subdivided based on the dispersion and the proportion of valid trajectories at multiple consecutive adjacent times: when the proportion of valid trajectories in any sub-region is less than a preset proportion threshold, the sub-region is merged with its neighboring sub-regions; when the dispersion of any sub-region is greater than a preset dispersion threshold, the sub-region is subdivided until the dispersion of all sub-regions is less than or equal to the dispersion threshold.

9. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 8, characterized in that, In the reverse compensation module, the process of determining non-physiological offset sequences includes: Based on the matching similarity and group consistency index, the corresponding weights are determined and the background displacement sequence and the microfluidic displacement sequence are weighted and fused to obtain the overall offset sequence; When the matching similarity is less than the similarity threshold and the group consistency index is less than the preset group consistency threshold, the predicted overall offset at the corresponding time is obtained based on the historical overall offset, and the predicted overall offset is used to replace the overall offset at the current time. The overall offset sequence is smoothed by moving mean or moving median within a window to obtain a non-physiological offset sequence.

10. The dynamic monitoring system for sperm quality in traditional Chinese medicine treatment based on time-series image analysis according to claim 9, characterized in that, The specific process for determining the corresponding weights based on matching similarity and group consistency indices is as follows: The formula for calculating credibility is: ; in, Let represent the matching similarity of frame t. Indicates the confidence level of the background displacement. This represents the group consistency index for frame t. Indicates the reliability of microfluidic displacement. Indicates the gating factor; The formula for calculating the weights is: in, The weight representing the background displacement in frame t. The weight represents the microfluidic displacement in frame t; in, The orientation concentration is calculated from the orientation concentration of the displacement sample set corresponding to the corrected head trajectory sequence. satisfy: ; in, Indicates the number of valid trajectories. This represents the displacement sample of the nth trajectory at adjacent time points; Among them, the gating factor characterizing physiologically consistent motion The calculation formula is: ; in, This indicates the preset upper limit threshold. This indicates the preset lower threshold.