A virus inactivation evaluation method based on image recognition and data processing

By employing image recognition and data processing technologies, the problem of polysaccharide residue interference in virus inactivation assessment has been solved, enabling accurate differentiation between virus particles and polysaccharide residues. This improves the accuracy and stability of inactivation assessment and is applicable to vaccine production and biosafety testing.

CN121962146BActive Publication Date: 2026-06-09HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2026-04-01
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately distinguish between virus particles and polysaccharide residues in the presence of polysaccharide residues, leading to uncertainty and misjudgment in virus inactivation assessments. This is especially true in complex backgrounds under microscopic images, where stable and accurate inactivation status assessments are difficult to achieve.

Method used

By employing image recognition and data processing methods, including grayscale conversion, edge detection, texture analysis, and spatial proximity analysis, combined with image inpainting techniques, we can distinguish between viral particles and polysaccharide residues, thereby improving the accuracy and stability of the assessment.

Benefits of technology

It effectively reduces the interference of polysaccharide residues on virus particle recognition, improves the accuracy and reliability of virus inactivation assessment, reduces the uncertainty of subjective human judgment, and is suitable for vaccine production and biosafety testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962146B_ABST
    Figure CN121962146B_ABST
Patent Text Reader

Abstract

The application discloses a virus inactivation evaluation method based on image recognition and data processing, relates to the technical field of biotechnology and medical detection technology, and comprises the following steps: through pretreatment of collected microscopic images, adopting a gray scale conversion and contrast adjustment method, enhancing the light and dark difference between virus particles and polysaccharide residues in the images, and obtaining first image data after preliminary processing; the virus inactivation evaluation method based on image recognition and data processing realizes objective judgment on the virus inactivation state by extracting and analyzing morphological characteristics such as the boundary integrity and shape regularity of the virus particles, thereby reducing the uncertainty caused by artificial subjective judgment, reducing the occurrence of misjudgment and missed judgment, and improving the accuracy, stability and repeatability of the virus inactivation evaluation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of biotechnology and medical testing technology, specifically to a method for evaluating virus inactivation based on image recognition and data processing. Background Technology

[0002] Virus inactivation is a crucial technological step in vaccine research, development, production, and biosafety control. Its core objective is to eliminate viral infectivity while preserving the structural characteristics and immunogenicity of viral particles as much as possible. Therefore, how to objectively and reliably assess whether the virus has been effectively inactivated has always been a key concern in related fields.

[0003] In existing technologies, the assessment of virus inactivation effectiveness typically relies on microscopic imaging techniques. This involves observing changes in the morphology, structure, or staining of virus particles to determine whether the virus remains active. However, in actual production and testing processes, polysaccharides are often introduced into the culture medium or protection system to improve virus culture efficiency and stability. These polysaccharides are often difficult to completely remove after inactivation treatment and tend to remain as residues in the sample. In microscopic images, polysaccharide residues typically appear as granular or flocculent structures, exhibiting a high degree of similarity to virus particles in size range, morphological contour, and optical imaging characteristics. During microscopic image acquisition, these residues can generate similar contrast and boundary features to virus particles, creating numerous non-target interference areas in the image. This interference can not only obscure real virus particles but may also be misjudged as structurally intact virus particles, increasing the uncertainty of inactivation assessment. Furthermore, due to the strong hydrophilicity and adhesiveness of polysaccharides, they easily aggregate or overlap during sample preparation, fixation, or imaging, resulting in spatial occlusion between different targets in the image. This spatial overlap and morphological similarity between targets makes it difficult for traditional assessment methods relying on manual observation or simple image segmentation to accurately distinguish between virus particles and polysaccharide residue areas, easily leading to biases in the judgment of inactivation status. In addition, some existing assessment methods focus more on single image features or subjective experience judgments, lacking comprehensive analysis of multiple feature information in the image and lacking mechanisms for effectively processing interference areas, making it difficult to stably and accurately reflect the true inactivation status of the virus under complex sample conditions. Summary of the Invention

[0004] The purpose of this invention is to provide a virus inactivation assessment method based on image recognition and data processing, thereby solving the problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a virus inactivation assessment method based on image recognition and data processing, comprising the following steps:

[0006] S1. By preprocessing the acquired microscopic images, grayscale conversion and contrast adjustment methods are used to enhance the brightness difference between virus particles and polysaccharide residues in the images, and the first image data after preliminary processing is obtained.

[0007] S2. For the first image data, apply an edge detection-based algorithm to extract all regions with boundary features in the image, mark the candidate target regions containing virus particles and polysaccharide residues, and determine the candidate region set.

[0008] S3. Based on the candidate region set, use texture analysis methods to calculate the surface roughness and distribution uniformity features of each region, and generate a texture feature dataset to distinguish between virus particles and polysaccharide residues.

[0009] S4. If the roughness of a certain region in the texture feature dataset is lower than the preset threshold, it is marked as a suspected polysaccharide residue region; otherwise, it is marked as a suspected virus particle region, thus obtaining the region grouping after classification and labeling.

[0010] S5. By performing spatial proximity analysis on the grouped regions after classification and labeling, detect whether the suspected polysaccharide residue regions overlap or occlude with other regions, and generate a spatial relationship mapping table.

[0011] S6. Based on the spatial relationship mapping table, image inpainting technology is used to remove signals from the areas marked as polysaccharide residues, and the areas of suspected virus particles that are obscured are reconstructed to obtain the repaired second image data.

[0012] As can be seen from the above technical solution, the present invention has the following beneficial effects:

[0013] This invention effectively introduces image recognition and data processing techniques into the virus inactivation assessment process by performing targeted preprocessing and multi-level analysis of microscopic images. This enables more accurate identification and discrimination of virus particles even in the presence of complex background interference such as polysaccharide residues. By analyzing the texture features and classifying candidate regions, the interference caused by the morphological and optical properties of polysaccharide residues on virus particle identification is reduced. Combined with spatial proximity analysis and image inpainting, the occlusion effect of polysaccharide residue areas on virus particles is effectively eliminated, improving the integrity of virus particle structural information.

[0014] Based on this, by extracting and analyzing morphological features such as the integrity of virus particle boundaries and the regularity of their shape, an objective judgment of the virus inactivation status can be achieved. This reduces the uncertainty caused by subjective human judgment, decreases the occurrence of misjudgments and omissions, and improves the accuracy, stability, and repeatability of virus inactivation assessment results. This invention is particularly suitable for applications with high reliability requirements for inactivation assessment, such as vaccine production and biosafety testing, and has high practical application value. Attached Figure Description

[0015] Figure 1 This is a flowchart of the virus inactivation assessment method of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] like Figure 1 As shown, the present invention provides a technical solution: a virus inactivation assessment method based on image recognition and data processing, comprising the following steps:

[0018] S1. By preprocessing the acquired microscopic images, grayscale conversion and contrast adjustment methods are used to enhance the brightness difference between virus particles and polysaccharide residues in the images, and the first image data after preliminary processing is obtained.

[0019] S2. For the first image data, apply an edge detection-based algorithm to extract all regions with boundary features in the image, mark the candidate target regions containing virus particles and polysaccharide residues, and determine the candidate region set.

[0020] S3. Based on the candidate region set, use texture analysis methods to calculate the surface roughness and distribution uniformity features of each region, and generate a texture feature dataset to distinguish between virus particles and polysaccharide residues.

[0021] S4. If the roughness of a certain region in the texture feature dataset is lower than the preset threshold, it is marked as a suspected polysaccharide residue region; otherwise, it is marked as a suspected virus particle region, thus obtaining the region grouping after classification and labeling.

[0022] S5. By performing spatial proximity analysis on the grouped regions after classification and labeling, detect whether the suspected polysaccharide residue regions overlap or occlude with other regions, and generate a spatial relationship mapping table.

[0023] S6. Based on the spatial relationship mapping table, image inpainting technology is used to remove signals from the areas marked as polysaccharide residues, and the areas of suspected virus particles that are obscured are reconstructed to obtain the repaired second image data.

[0024] S7. For the second image data, extract the morphological features of the virus particles, including boundary integrity and shape regularity, and generate a set of morphological feature parameters for inactivation status assessment.

[0025] S8. If the boundary integrity of the morphological feature parameter set is higher than the preset threshold, the virus particle is judged to be in an inactivated state; otherwise, it is judged to be inactivated, and the final inactivation assessment result is obtained.

[0026] In the above embodiments, this method enhances the contrast characteristics of viral particles and polysaccharide residues in microscopic images through image preprocessing, making subsequent image analysis more stable and reliable. Subsequently, it uses a combination of edge detection and texture analysis to distinguish target areas from both structural and surface characteristic dimensions, thereby effectively identifying viral particles and polysaccharide residues. By introducing spatial proximity analysis and image inpainting techniques, the interference of polysaccharide residue occlusion on viral particle morphology assessment can be reduced, ensuring the integrity of viral particle morphology information. Finally, based on the changes in the integrity of viral particle boundaries and the regularity of their shapes, an objective assessment of whether the virus has been inactivated is achieved.

[0027] Compared with existing technologies, the above-described implementation method effectively distinguishes between viral particles and polysaccharide residues through multi-stage image analysis and data processing, reducing the interference of complex backgrounds on the inactivation judgment results. Simultaneously, by repairing obscured areas, the accuracy of viral particle morphological feature extraction is improved, thereby enhancing the reliability and consistency of the virus inactivation assessment results. Furthermore, this method does not require the introduction of additional chemical labeling or destructive detection methods, which helps to improve detection efficiency and reduce detection costs.

[0028] Specifically, S1 includes acquiring a microscopic image, performing grayscale conversion processing to obtain grayscale image data; for the grayscale image data, acquiring a contrast adjustment method, implementing the contrast adjustment method by stretching pixel values, suppressing image noise from the contrast adjustment method to obtain a noise-suppressed image; in the noise-suppressed image, using an edge detection method to sharpen particle edges, determining the distinction between virus particles and polysaccharide residues, to obtain a particle-distinguished image; for the particle-distinguished image, acquiring a pixel statistics method to calculate particle density, determining the amplified brightness difference between virus particles and polysaccharide residues, to obtain the first image data.

[0029] In this embodiment, the original microscopic image is first acquired using a microscopic imaging device under constant magnification, constant illumination intensity, and constant optical path conditions. During acquisition, the exposure time, gain, and white balance are calibrated and locked in one go. The exposure time is set to a value that prevents the image grayscale distribution from becoming overly bright or saturated. Specifically, this is achieved by statistically analyzing the grayscale histogram distribution of the pre-acquired image to ensure that the highest grayscale value falls within a safe range below the quantization limit. The gain is set to a value that satisfies the target contrast without significantly amplifying background noise. Specifically, this is achieved by statistically constraining the grayscale standard deviation of the background region to ensure that the background grayscale fluctuation remains within the repeatability allowable range of the device after gain adjustment. The white balance is the calibration value of the imaging system under the same light source color temperature. Specifically, it is determined by acquiring the three-color channel equalization parameters obtained without sample fields of view, thereby reducing grayscale errors introduced by color shift at the source.

[0030] After acquisition, the original microscopic images are subjected to grayscale conversion to obtain grayscale image data. The grayscale conversion is performed pixel-by-pixel by weighted convergence of the three color channels. The weighting coefficients are taken from the spectral response calibration results of the imaging system. Specifically, the three color responses are collected on the calibration board and weights consistent with the perceived brightness are fitted to ensure that the grayscale values ​​are consistent with the actual brightness changes of the target particles. During pixel-by-pixel calculation, the three color channel values ​​are read at each pixel position, and weighted synthesis is performed according to the weights to output a single-channel grayscale value, thereby compressing color information into brightness information and improving the stability of subsequent contrast and edge calculations.

[0031] When performing contrast adjustment and noise suppression on grayscale image data, contrast adjustment by pixel value stretching is performed first. The upper and lower limits of stretching are determined by quantile statistics of grayscale distribution. The lower limit is the grayscale value that reaches the 1st percentile of the cumulative grayscale distribution, and the upper limit is the grayscale value that reaches the 99th percentile of the cumulative grayscale distribution. These upper and lower limits are obtained directly through a single histogram statistical analysis to exclude the influence of extremely dark and extremely bright outliers on the stretching slope. After determining the upper and lower limits, pixels with grayscale values ​​below the lower limit are uniformly truncated to the minimum grayscale, and pixels with grayscale values ​​above the upper limit are uniformly truncated to the maximum grayscale. Pixels between the upper and lower limits are mapped to the full quantization range in a linear proportion, thereby expanding the difference in grayscale values ​​between viral particles and polysaccharide residues to a larger dynamic range. After contrast stretching, noise suppression processing is performed synchronously. Noise suppression is achieved using a local statistical filtering method, where the side length of the filtering window is less than half of the number of pixels corresponding to the typical minimum diameter of the target particle. Specifically, several background sub-regions are selected in the grayscale image before particle differentiation, the standard deviation of the background grayscale is statistically analyzed, and the side length of the window is adjusted step by step to reduce the background standard deviation to a preset target value. The preset target value is taken from the upper limit of background fluctuation in the idle field of view of the device, which is determined by the background standard deviation distribution obtained by statistical analysis of multiple frames of idle acquisition, ensuring that noise is suppressed without excessive smoothing of particle edges, thus obtaining a noise-suppressed image.

[0032] When sharpening grain edges on noise-suppressed images, an edge detection method is used to extract and enhance grain contours. Edge detection first performs gradient calculations on the image to obtain the edge intensity of each pixel, and then determines the edge determination threshold based on the statistical distribution of edge intensity. The high threshold is taken as the 90th percentile value of the non-zero edge intensity samples, which is obtained by cumulatively calculating the histogram of edge intensity across the entire image, and is used to identify significant edges. The low threshold is a value that maintains a fixed ratio with the high threshold, specifically set to 40% of the high threshold, and is used to track weak edges and maintain contour continuity. After the thresholds are determined, strong edge pixels are first screened out using the high threshold, and then connectivity tracing is performed using the low threshold to retain weak edge pixels connected to the strong edges, thus forming a continuous edge set. Subsequently, the edge set and the noise-suppressed image are fused and enhanced. The fusion method adopts a strategy of directional enhancement of grayscale at edge positions and maintaining the original grayscale at non-edge positions. Specifically, an increment related to edge intensity is superimposed at edge pixels and truncated when the quantization limit is reached, while no increment is applied to non-edge pixels. This makes the outer contour of the particles and the internal texture boundary clearly presented, thus completing the distinction between virus particles and polysaccharide residues at the structural boundary level and obtaining a particle-distinguished image.

[0033] When performing pixel statistics and particle density calculations on particle-distinguished images, the connected component labeling of the target region is completed first, and then the particle count and density per unit area are output. Connected component labeling is achieved through binarization segmentation. The binarization threshold is determined using a locally adaptive method, specifically by using a sliding window to statistically analyze local mean and local grayscale fluctuations, combined with a preset bias value to generate a local threshold for each pixel position. The sliding window size is a pixel scale equivalent to the smallest particle diameter, specifically determined by converting pixel sizes obtained from microscopic ruler calibration, ensuring that the threshold adjusts with changes in the local background. The bias value is a value that controls the false detection rate of the background, specifically determined by statistically analyzing the proportion of foreground pixels after binarization in the background sub-region and suppressing it to a preset upper limit. This preset upper limit is obtained from the false detection statistics of an empty background.

[0034] It should be noted that after binarization, connected component labeling is performed on the foreground pixels. The area, perimeter, and average gray level of each connected component are calculated, and connected components with an area smaller than the lower limit of the noise connected component are removed. The lower limit of the area is taken as the same number of pixels as the area of ​​the filtering window, and is directly derived from the window parameters in the noise suppression stage, used to eliminate residual isolated noise points. The particle count is the number of connected components retained. The actual area of ​​the field of view is obtained through pixel size calibration conversion. The pixel size is determined by the pixel length corresponding to the scale mark measured by the microscopic scale image, thus mapping the total number of pixels in the entire image to the actual area. The particle density is output as the ratio of the particle count to the actual area of ​​the field of view, used to characterize the density of particle distribution in the field of view. Furthermore, the average gray level of each connected region is grouped and statistically analyzed. The average gray level center and gray level dispersion of the suspected virus particle region and the suspected polysaccharide residue region are calculated separately, and the difference between the two gray level centers is used as the brightness difference index. When this index is lower than a preset difference threshold, brightness difference amplification processing is triggered. The preset difference threshold is three times the standard deviation of the background gray level, specifically obtained from the statistics of the background sub-region selected in the noise suppression stage, to ensure that the two types of targets present a stable and separable gray level interval above noise fluctuations. Brightness difference amplification processing is achieved by readjusting the upper and lower limits and the stretching slope of the pixel values. Specifically, the upper and lower limits are moved closer to the gray level centers of the two types and the linear mapping slope is increased, so that the overlapping interval of the gray level distribution of the two types of targets is shrunk, thereby generating the first image data for subsequent processing steps.

[0035] Specifically, S2 includes extracting boundary feature regions from the first image data using the Canny edge detection algorithm, calculating the gradient magnitude and direction of the Sobel operator for each pixel to obtain a boundary extraction image; for the boundary extraction image, obtaining the particle density by statistically analyzing the number of pixels in the region to determine a threshold; if the particle density is higher than a preset threshold, the virus boundary is marked, otherwise the polysaccharide contour is marked to obtain candidate regions; in the candidate regions, texture analysis is used to determine the contour matching result by calculating the shape difference of the gray-level co-occurrence matrix; based on the contour matching result, the region set is extracted to obtain the final candidate region set.

[0036] In this embodiment, the focus is first on the stable extraction of boundaries. The first image data undergoes smoothing and noise reduction processing to weaken the pseudo-boundary response caused by random noise in gradient calculations. The scale of the smoothing kernel is a key parameter here, and its value is determined jointly based on the pixel size calibration results of microscopic imaging and the minimum identifiable edge width of the target particles: first, the actual length corresponding to each pixel is obtained through a microscopic scale, and then it is converted into a pixel scale by combining the minimum size of the target particles. The coverage area of ​​the smoothing kernel is controlled within a small proportion of this pixel scale, thereby reducing background fluctuations while keeping the gray-level transitions at the particle edges recognizable. The weight distribution of the smoothing kernel is constructed with a high center and low edges to ensure that the gray-level transitions near the edges do not undergo abrupt distortions. The discretization accuracy of this weight distribution is consistent with the image bit depth to avoid amplification of quantization errors.

[0037] After smoothing, Sobel gradient calculation is performed on each pixel to obtain the grayscale change intensity in the horizontal and vertical directions. In the specific calculation process, the neighborhood of each pixel is weighted and summed according to a fixed template. The neighborhood range covered by the template is used as a parameter, with a size of 3x3. This size represents a trade-off between edge response intensity and positioning accuracy: a too-large size will reduce the positioning accuracy of fine edges, while a too-small size will increase noise sensitivity. After obtaining the grayscale change intensity in both directions, the two are squared, summed, and the square root is taken to obtain the gradient magnitude, which characterizes the edge intensity. The gradient direction is obtained by taking the arctangent of the ratio of the change intensity in the two directions, which characterizes the edge direction.

[0038] After obtaining the gradient magnitude and direction, non-maximum suppression (NMS) is performed to refine the edges. The NMS process is as follows: for each pixel, two adjacent sampling points are selected along the gradient direction. The interval between these sampling points is used as a parameter, set to one pixel. This value aligns with the edge refinement target, ensuring the final edge is close to a single pixel width. Then, the gradient magnitude of the current pixel is compared with the gradient magnitudes of the two sampling points. Only the pixel with the largest magnitude is retained as an edge candidate, while the remaining pixels are designated as non-edges. Since the gradient direction exhibits quantization error on the discrete pixel grid, a directional quantization strategy is introduced as a parameter. Directional quantization is achieved by mapping the direction to four main direction intervals. This interval division is determined based on the symmetry of the pixel grid, ensuring consistency in the selection rules for adjacent sampling points.

[0039] After edge refinement, a dual-threshold determination and connected component tracing are performed to form the final boundary extraction image. The high threshold, the first threshold, is determined as follows: histogram statistics are performed on the gradient magnitudes across the entire image to obtain the distribution and cumulative proportion of gradient magnitudes; the gradient magnitude corresponding to the cumulative proportion reaching a set percentage is selected as the high threshold. This set percentage is the 90th percentile, determined based on the pseudo-edge control target in the calibration sample library. Specifically, the upper tail distribution of gradient magnitudes in the background region is statistically analyzed in the calibration sample library, and the high threshold is positioned above the significantly decreasing upper tail position in the background, ensuring that strong edges primarily originate from the target structure rather than background fluctuations. The low threshold, the second threshold, is determined by taking 40% of the high threshold. This percentage is determined through contour breakage rate statistics in the calibration sample library: the closed contour proportion and pseudo-connected proportion after edge tracing are calculated under multiple candidate proportion values, and the proportion value where the closed contour proportion is increased and the pseudo-connected proportion is controlled is selected as the fixed proportion. The dual-threshold determination process is as follows: pixels with gradient magnitudes higher than the high threshold are marked as strong edge points, pixels with gradient magnitudes between the low and high thresholds are marked as weak edge points, and pixels below the low threshold are discarded. Then, using the strong edge points as the starting set, connectivity tracing is performed on the weak edge points, retaining only the weak edge points connected to the strong edge points in a connectivity sense. The connectivity determination uses an 8-neighborhood connectivity rule as a parameter; the selection of the 8-neighborhood is determined based on the requirement for oblique continuity of the contour, while a 4-neighborhood introduces a break at oblique edges. The termination condition for connectivity tracing is an empty queue, ensuring that all weak edges connected to strong edges are fully included, thus obtaining the boundary extraction image.

[0040] After the boundary extraction image is formed, the candidate region generation based on grain density begins. First, connected component labeling is performed on the boundary extraction image, aggregating spatially connected edge pixels into independent boundary objects. Connected component labeling also uses the 8-neighborhood rule, consistent with the aforementioned edge tracking, to avoid object splitting. For each boundary object, the number of its edge pixels is counted as a boundary size indicator. Simultaneously, the minimum bounding rectangle of the boundary object is calculated, and its pixel area is calculated. The selection of the bounding rectangle avoids area estimation bias caused by complex shapes. Grain density is calculated by dividing the number of edge pixels by the pixel area of ​​the bounding rectangle to obtain a scale-normalized density indicator. This normalization method is introduced to offset the absolute count differences caused by different grain sizes and different field-of-view scaling. The preset threshold is used here as the density discrimination threshold. The determination process is as follows: Select manually confirmed virus boundary objects and polysaccharide contour objects from the calibration sample library, calculate the density index distribution of the two types of objects, and take the dividing point of the two distributions as the preset threshold. The selection of the dividing point is based on the false positive rate constraint. Specifically, the proportion of virus boundaries judged as polysaccharide contours is limited to a set upper limit, and the proportion of polysaccharide contours judged as virus boundaries is also limited to a set upper limit. The upper limit is taken as the tail error control value of the 5th percentile. This value is determined based on the tolerance of missed detections and false detections in the business scenario.

[0041] Furthermore, after determining the threshold, a threshold judgment is performed on each boundary object. Boundary objects with a density index higher than the preset threshold are marked as virus boundaries, while those with a density index lower than or equal to the preset threshold are marked as polysaccharide contours, thus forming the initial members of the candidate region set. The generation of candidate regions at this stage also includes a closed region formation operation: for boundary objects marked as virus boundaries or polysaccharide contours, the closure of the contour is first checked. Closure determination is completed by the ratio of the distance between the start and end points to the contour length; the ratio threshold is set to the 1st percentile, which is determined based on pixel positioning error statistics to ensure that minor breaks do not hinder the closure determination. If there are small gaps in the contour, gap connection is performed, with the maximum allowable gap length used as a parameter. The maximum allowable length is 10% of the number of pixels corresponding to the minimum diameter of the target particle. This value is determined based on the common length statistics of local missing particle boundaries, thus avoiding the misconnection of adjacent independent objects. After closure, region filling is performed inside the contour to obtain a candidate region mask, giving subsequent texture statistics a clear region range.

[0042] After candidate regions are formed, texture analysis and contour matching based on the gray-level co-occurrence matrix are performed. First, gray-level pixels within each candidate region are extracted from the first image data, and gray-level quantization is performed to construct a finite set of gray levels. The number of gray levels is used as a parameter, and its value is determined by constraints on both regional texture discriminability and computational stability: First, the co-occurrence statistical stability under different numbers of gray levels is evaluated in the calibration sample library. Stability is measured by the statistical fluctuation of multiple samples of the same region. At the same time, the texture index separation degree between the virus region and the polysaccharide region is calculated. Finally, the minimum number of gray levels that achieves a separation degree with a set lower limit and statistical fluctuation with a set upper limit is selected. The lower limit of separation degree is a normalized difference value of 0.2, and the upper limit is a normalized fluctuation value of 0.05. Both are derived from the stability requirements of cross-batch differences of calibration samples.

[0043] In this embodiment, a gray-level co-occurrence matrix is ​​then constructed. The construction method is as follows: within the candidate region, each pixel forms a gray-level pair with its neighboring pixels at a specified direction and step size. The occurrence counts of these gray-level pairs are accumulated and statistically analyzed to obtain a counting matrix arranged by gray-level pairs. The direction is used as a parameter, with four directions: 0 degrees, 45 degrees, 90 degrees, and 135 degrees. This selection is based on the coverage requirements of texture directionality in each direction, ensuring that the four directions cover the spatial relationships of the horizontal, vertical, and two main diagonal directions. The step size is used as a parameter, with a unit of two pixels. The step size is determined by statistically analyzing the gray-level autocorrelation length within the candidate region: the gray-level similarity is calculated along multiple directions to show the decay trend with distance. The distance before the decay enters the stable region is taken as the texture association scale, and an approximate integer value of this scale is used as the step size to ensure that the co-occurrence statistics reflect the true texture dependencies near the contour. After the matrix counting is completed, normalization is performed. The count is divided by the total number of gray-level pairs to obtain a relative frequency matrix. Normalization is used to eliminate the influence of regional area differences on the statistical values.

[0044] After obtaining the normalized gray-level co-occurrence matrix, texture quantization results for characterizing shape differences are extracted, and contour matching results are formed accordingly. Shape differences are formed by the aggregation of multiple texture quantization results, which include at least contrast representation, homogeneity representation, and orientation consistency representation. Contrast representation reflects the concentration of gray-level differences in adjacency relationships, homogeneity representation reflects the proportion of similar gray-level pairs, and orientation consistency representation reflects the degree of difference between statistical results in four directions. Weight parameters are introduced when aggregating these three representations. The weight parameters are determined based on the ranking of discriminative contributions in the calibration sample library: first, the mean difference and variance of the three representations are calculated between virus samples and polysaccharide samples; then, their normalized discriminative contributions are calculated, weights are assigned according to the magnitude of contribution, and the weights are normalized so that representations with higher contributions receive higher weights. Weight updates employ a fixed-period reassessment mechanism, with a period of 1000 samples. This value is determined based on the sample distribution drift rate, used to maintain long-term adaptation without frequently changing the decision logic.

[0045] Specifically, the contour matching threshold is used here as the texture discrimination threshold. Its determination process is as follows: Shape difference indices are calculated for the confirmed virus candidate regions and polysaccharide candidate regions in the calibration sample library, resulting in two types of distribution curves. The area near the intersection of these two distribution curves is taken as the candidate threshold interval. Within this interval, the final threshold is selected according to the criterion of minimizing the overall misclassification rate. The overall misclassification rate simultaneously includes both virus and polysaccharide misclassifications and is weighted according to business priority. The business priority weights are set to 2 for virus misclassification and 1 for polysaccharide misclassification. These values ​​are determined based on the purity requirements of the virus region in the inactivation assessment. Candidate regions with shape difference indices higher than the threshold are judged to satisfy virus contour matching, while candidate regions with shapes lower than or equal to the threshold are judged to satisfy polysaccharide contour matching, thus obtaining the contour matching result.

[0046] Based on the contour matching results, the process proceeds to the region set extraction stage, outputting the final candidate region set. Region set extraction first involves filtering and merging: regions that satisfy virus contour matching and whose boundary density is determined to be a virus boundary are included in the virus candidate set, and regions that satisfy polysaccharide contour matching and whose boundary density is determined to be a polysaccharide contour are included in the polysaccharide candidate set. When the two types of determinations conflict, a conflict resolution parameter is introduced, prioritizing texture determination. The priority strategy is determined based on the robustness evaluation results of the calibration sample library on occluded backgrounds; texture determination is more stable than density determination in occluded scenarios. Subsequently, duplicate regions are merged in the virus candidate set, based on the region overlap ratio: first, the overlap area and union area of ​​any two regions are calculated, and then the ratio of the overlap area to the union area is used as the overlap ratio index. The overlap ratio threshold is set to 0.6, which is determined statistically based on the upper bound of boundary positioning error and filling error, ensuring that the same target is still merged into a single region even with slight drift, while adjacent independent targets are not merged. After merging, the region boundaries are trimmed. The trimming process involves local alignment along the boundary normal direction: for each sampling point on the boundary, a fixed-length pixel sequence is sampled both inwards and outwards along its normal direction. The sampling length is set to 3 pixels, a value determined statistically based on the residual thickness of the edge bandwidth after smoothing and non-maximum suppression. The location with the largest gradient magnitude is searched in the sampling sequence, and the boundary point is moved to that location to fit the main edge band. Boundary trimming is performed iteratively, with an upper limit of 20 iterations, determined statistically based on the boundary convergence speed. The iteration termination condition also includes a displacement threshold of 1 pixel, determined based on the minimum resolvable displacement of the pixel raster, ensuring that trimming ends after the boundary reaches pixel-level stability. After trimming, a final candidate region set with consistent spatial indexes and well-defined boundaries is output.

[0047] Specifically, S3 includes: for the candidate region set, using grayscale statistical methods to calculate the range of pixel grayscale variation in each region; quantifying surface texture fluctuations through the standard deviation of grayscale variation to obtain surface roughness values ​​as preliminary features, resulting in a region roughness distribution table; based on the region roughness distribution table, obtaining the pixel distribution pattern of each region, calculating the distribution uniformity characteristics, and determining the uniformity quantification index by comparing the spatial distribution differences of grayscale values ​​within the region and conducting local variance analysis; for the uniformity quantification index, combining the region boundary smoothness assessment, extracting boundary features from the continuous changes in the region contour, judging the degree of boundary continuity by calculating the average value of the contour curvature, judging the boundary smoothness level, and obtaining a comprehensive feature description of the region; through the comprehensive feature description of the region, integrating surface roughness values, distribution uniformity characteristics, and boundary smoothness levels to construct a texture feature dataset for distinguishing between virus particles and polysaccharide residues, completing feature classification and organization.

[0048] In this embodiment, during the texture feature calculation stage of the candidate region set, a unique region identifier and region mask are first established for each candidate region. The region mask consists of the set of internal pixels formed after the outline of the candidate region is closed, which is used to limit the pixel range for subsequent statistics. The region identifier is generated by combining the coordinates of the upper left corner of the circumscribed rectangle of the candidate region in the image coordinate system with the region index. The coordinates of the circumscribed rectangle are taken from the statistical results of the minimum and maximum row and column indices of the boundary pixels of the candidate region. The region index increases according to the sorting rule of the circumscribed rectangle from top to bottom and from left to right to ensure that the identifiers do not conflict within the same image. After the mask and identifier are determined, the gray values ​​of all pixels in the region are extracted from the first image data according to the mask, and the total number of pixels is used as the base for subsequent normalization statistics. The total number of pixels is directly obtained by counting the foreground pixels in the mask.

[0049] For the surface roughness calculation of each candidate region, the extreme values ​​of grayscale values ​​within that region are first statistically analyzed. The maximum and minimum grayscale values ​​are obtained by traversing the grayscale set pixel by pixel. The difference between these two values ​​serves as the range of pixel grayscale variation, representing the overall span of brightness fluctuations within the region. Extreme value statistics are performed in a single traversal, with the current maximum and minimum values ​​updated synchronously during the traversal to avoid computational redundancy caused by repeated scanning. Subsequently, the grayscale mean is calculated by summing all grayscale values ​​within the region and dividing by the total number of pixels. The summation process uses integers and converts the sum to a floating-point mean at the end to avoid overflow. After calculating the mean, the standard deviation is used as the surface roughness value. The calculation process for the standard deviation is as follows: All pixel grayscale values ​​within the region are iterated again. The difference between the grayscale value of each pixel and the mean grayscale value is calculated to obtain the deviation. The deviation is squared and accumulated to obtain the accumulated squared deviation value. The accumulated squared deviation value is divided by the total number of pixels to obtain the mean squared deviation value. The square root of the mean squared deviation value is then taken to obtain the standard deviation. A data type with sufficient bit width is used in the squaring and accumulation process. The bit width is determined by the upper limit of the total number of pixels and the upper limit of grayscale values. The upper limit of the total number of pixels is the maximum number of pixels corresponding to the image resolution, and the upper limit of grayscale values ​​is the maximum grayscale value corresponding to the bit depth, thus ensuring that the values ​​are not truncated. After obtaining the surface roughness value, the region identifier, grayscale variation range, surface roughness value, and region location index are recorded to form a region roughness distribution table. The region location index is expressed using a combination of circumscribed rectangle coordinates and mask offset to ensure that the original image position can be located during subsequent retrieval.

[0050] In the stage of calculating the uniformity of distribution, the sub-block size parameter is first determined. The sub-block size is taken as one-quarter of the pixel scale corresponding to the equivalent diameter of the candidate region. The equivalent diameter is obtained by the total number of pixels in the region and the pixel size calibration value: the pixel size calibration value is obtained by measuring the pixel length corresponding to the scale of the micrometer. The total number of pixels in the region is converted into the actual area and then mapped to the equivalent diameter of the circle. Then, the sub-block side length is obtained by dividing it by a factor of 4. The division factor of 4 is determined by statistically analyzing the typical texture patch sizes of virus particles and polysaccharide residues in the calibration sample. The sub-block side length covers the main scale of the texture patch while maintaining the ability to distinguish differences within the region.

[0051] After determining the sub-block size, a grid is created using the bounding rectangle of the candidate region as the range. The bounding rectangle is then divided into multiple sub-blocks according to the sub-block size. For each sub-block, the set of pixels belonging to the candidate region mask is counted. When the number of candidate region pixels within a sub-block is less than 30% of the sub-block's pixel capacity, this 30% threshold is used to remove edge-fragment sub-blocks. This threshold is determined by statistically analyzing the relationship between the effective pixel ratio of edge sub-blocks and statistical stability in the calibration samples, selecting a boundary point that reduces the fluctuation of the sub-block mean while maintaining a sufficient number of sub-blocks. For each retained sub-block, the sub-block's gray-level mean and gray-level variance are calculated. The sub-block's gray-level mean is obtained by summing the gray-level values ​​within the sub-block and dividing by the number of effective pixels within the sub-block. The sub-block's gray-level variance is obtained by summing the squares of the deviations between the gray-level values ​​within the sub-block and the sub-block's gray-level mean, and then dividing by the number of effective pixels. Subsequently, two sets of quantitative results of distribution differences were formed: the first is spatial distribution difference, which is represented by the standard deviation of the gray value mean of all sub-blocks. The standard deviation is calculated by taking the overall mean of the sub-block mean, calculating the squared deviations, summing them up, dividing by the number of sub-blocks, and taking the square root. The second is local variance difference, which is represented by the standard deviation of the gray value variance of all sub-blocks. The calculation process is the same as that of the standard deviation of the sub-block mean.

[0052] Furthermore, after completing the quantification of two sets of differences, a uniformity quantification index is obtained. This index is derived by weighting the spatial distribution difference and local variance difference, with the weights determined as parameters by a calibration sample library. In the calibration sample library, the distributions of the two difference quantification results are statistically analyzed for both viral and polysaccharide regions. The mean interval and intra-class dispersion of the two distributions are calculated, assigning higher weights to quantification results with larger mean intervals and smaller intra-class dispersion. Subsequently, the two weights are normalized so that their sum equals 1, making the uniformity quantification index more sensitive to quantification results that contribute more to differentiation. A corresponding record is established between the uniformity quantification index and the region identifier, and this record is then linked to the regional roughness distribution table through the region identifier.

[0053] In the boundary smoothness evaluation stage, a sequence of contour points is first extracted from the candidate region mask. This sequence is obtained through boundary tracking, starting from the topmost and leftmost boundary pixel within the bounding rectangle. Tracking continues along the boundary direction according to the 8-neighborhood rule until returning to the starting point, forming a closed chain of points arranged in sequence. The 8-neighborhood rule ensures that diagonal boundaries do not break. To reduce the interference of jagged edges introduced by the pixel grid on curvature statistics, smoothing is performed on the contour point sequence. The smoothing window length is taken as the 1st percentile of the total number of contour points, with a lower limit of 5 and an upper limit of 25. The 1st percentile and upper and lower limits are determined by statistically analyzing the impact of different window lengths on contour detail preservation and jagged edge suppression in the calibration samples, selecting the interval that preserves the overall contour shape and significantly reduces local jagged edges. Smoothing is performed using a moving average. For each contour point, the coordinates of the current point are replaced by the average of the coordinates of several points before and after it. The replacement process iterates along the closed chain of points to avoid endpoint boundary effects. After smoothing, the average curvature of the contour is calculated. The curvature calculation is based on directional changes: for each point in the contour point chain, the direction vector formed by that point and the previous point, and the direction vector formed by that point and the next point are taken. The angle between the two direction vectors is calculated as the local steering quantization value of that point. The larger the angle, the more obvious the local curvature. The angle is calculated by taking the cosine value of the vector dot product and then taking the inverse cosine. The dot product and the magnitude are obtained by multiplying and adding the coordinate differences. The numerical calculation uses floating-point precision to avoid truncation. After obtaining the local steering quantization values ​​of all contour points, their arithmetic mean is calculated to obtain the average contour curvature. This average value is obtained by summing all the local steering quantization values ​​and dividing by the number of contour points. The boundary smoothness level is obtained by classifying the average contour curvature. The classification threshold is determined as a parameter by a calibration sample library: The distribution of the average contour curvature of the viral region and the polysaccharide region is statistically analyzed in the calibration sample library. The two dividing points that minimize the overlap between the two distributions are selected as thresholds. Regions with an average contour curvature lower than the first threshold are classified as high smoothness, regions with an average contour curvature between the first and second thresholds are classified as medium smoothness, and regions with an average contour curvature higher than the second threshold are classified as low smoothness. The final values ​​of the first and second thresholds are determined by minimizing the weighted misclassification rate in the calibration sample library. In the weighted misclassification rate, the misclassification weight for the virus is 2, and the misclassification weight for the polysaccharide is 1. These weight values ​​are determined based on the purity requirements of the viral region in the inactivation assessment. After obtaining the boundary smoothness level, it is recorded in correspondence with the region identifier.

[0054] In the regional comprehensive feature description construction stage, the region identifier is used as the primary key to integrate surface roughness values, uniformity quantification indicators, and boundary smoothness levels to form comprehensive feature entries for each candidate region. To ensure the comparability of images from different fields of view and batches, the surface roughness values ​​and uniformity quantification indicators are normalized. The normalization range is determined as a parameter by the calibration sample library: the 1st and 99th percentiles of the surface roughness values ​​and uniformity quantification indicators in the calibration sample library are respectively used as the lower and upper limits. Values ​​below the lower limit are taken as the lower limit, and values ​​above the upper limit are taken as the upper limit. Then, they are linearly mapped to the 0-1 interval. The use of the 1st and 99th percentiles is used to suppress the stretching effect of outliers on the range, and their values ​​are determined based on the proportion of outliers and stability requirements in the calibration sample library. The boundary smoothness level is represented by discrete encoding: high smoothness is encoded as 3, medium smoothness as 2, and low smoothness as 1. The encoding rule is consistent with the grading direction, which facilitates direct reference by subsequent classification logic. After integration and normalization, a texture feature dataset is formed. The texture feature dataset consists of multiple comprehensive feature entries. Each entry includes a region identifier, region location index, surface roughness value, uniformity quantification index, and boundary smoothness level code. The features are classified and organized according to the sorting rules of the region identifier.

[0055] S4 includes obtaining the standard deviation of pixel grayscale values ​​in each candidate region set, determining the surface roughness of the region by dividing the square root of the sum of squares of the subtraction of the average grayscale value from the pixel grayscale value by the number of pixels; calculating the spatial distribution difference of grayscale values ​​within the region based on the surface roughness, and obtaining a distribution uniformity index by summing the variances among the grayscale means of each sub-block within the region; determining the boundary smoothness level and obtaining the region boundary continuity features by combining the curvature changes of the region contour with the average curvature difference between contour points; and extracting the consistency intensity of the grayscale gradient direction from the region boundary continuity features, using the inverse variance of the gradient vector direction... The textural directionality features are determined by counting the number of data points. If the textural directionality features exceed a preset threshold, the sharpness change of the gray-level gradient within the region is further calculated. The particle edge sharpness value is obtained by averaging the second derivative of the gradient magnitude. Based on the particle edge sharpness value, surface roughness, distribution uniformity index, boundary smoothness level, and textural directionality features, a comprehensive texture description vector for the region is formed, and a texture feature dataset for distinguishing between virus particles and polysaccharide residues is constructed. For the texture feature dataset, if the surface roughness of a certain region is lower than a preset threshold, it is marked as a suspected polysaccharide residue region; otherwise, it is marked as a suspected virus particle region, resulting in the classified and labeled region grouping.

[0056] In this embodiment, the candidate region set first completes data preparation and index binding for each region. For each candidate region, the set of pixels participating in the calculation is determined based on the region mask. The region mask consists of the internal pixels enclosed by the closed contour of the candidate region, and the internal pixels are obtained through contour scanning and filling. Subsequently, the number of pixels within the mask is counted point by point to obtain the pixel count, which serves as the unified base for subsequent normalization and threshold determination. After the pixel set is determined, the gray values ​​within the mask are read pixel by pixel from the first image data to form the gray value sequence of the region, and a one-to-one correspondence is established between the region identifier, the gray value sequence, and the number of pixels.

[0057] Surface roughness is determined by calculating the standard deviation of pixel grayscale values ​​within a region. Specifically, the grayscale sequence of the region is first summed to obtain a total grayscale value. Then, the total grayscale value is divided by the number of pixels to obtain the average grayscale value. The average grayscale value is obtained by summing first and then dividing to avoid rounding fluctuations caused by point-by-point division. After obtaining the average grayscale value, the grayscale sequence is traversed a second time: the difference between each pixel's grayscale value and the average grayscale value is calculated to obtain the deviation. The deviation is squared to obtain the squared deviation value, and all squared deviation values ​​are summed to obtain the sum of squares. After the sum of squares is formed, according to the calculation method defined in the claims, the square root of the sum of squares is taken to obtain the square root of the deviation sum of squares. This square root is then divided by the number of pixels to obtain the surface roughness of the region. To ensure comparability between different regions, the number of pixels is taken from the same mask counting caliber, and the grayscale readings are taken from the same image quantization bit depth to avoid system bias introduced by inconsistent reading calibers.

[0058] The uniformity index is calculated based on the spatial distribution differences of gray values ​​within a region, with its core being the sum of the variances among the mean gray values ​​of each sub-block within the region. In practice, the sub-block division scale is first determined. The sub-block side length is used as a parameter determined by the converted diameter of the candidate region: the converted diameter is obtained by combining the number of pixels in the region with the pixel size calibration value. The pixel size calibration value is obtained by measuring the pixel length corresponding to a known scale length at the same magnification using a microscopic ruler. The sub-block side length is one-quarter of the converted diameter, and the value of this one-quarter is determined statistically from calibration data. The statistical content includes the typical spatial scale of the texture patch and the stability requirements of the number of pixels within the sub-block, ensuring that the sub-block both covers local texture differences and maintains statistically stable mean values. After determining the sub-block scale, a grid is established with the bounding rectangle of the candidate region as the scope. The bounding rectangle is then divided into multiple sub-blocks according to the sub-block side length. For each sub-block, the effective pixel set falling within the region mask is selected, and the mean gray value of that sub-block is calculated. The mean gray value is obtained by summing the gray values ​​of the effective pixels and dividing by the number of effective pixels. To suppress the amplification effect of edge fragment sub-blocks on variance, an effective pixel proportion threshold is introduced. This threshold is set at the ratio of the number of effective pixels within a sub-block to the sub-block's pixel capacity, with a threshold of 0.3. The determination of 0.3 is based on the correspondence between the "proportion threshold" and the "sub-block mean fluctuation amplitude" in the calibration data, selecting an inflection point value that significantly converges the fluctuation amplitude while retaining a sufficient number of sub-blocks. After calculating the mean for each sub-block and removing sub-blocks with insufficient proportion, a set of sub-block grayscale mean values ​​is obtained. Subsequently, the overall average of these sub-block grayscale mean values ​​is calculated, and the deviation of each sub-block's grayscale mean from the overall mean is squared and accumulated to form a cumulative deviation squared value. This cumulative deviation squared value is then divided by the number of sub-blocks to obtain the sub-block mean variance. To reduce the sensitivity of the grid splitting starting point to the results, a grid starting point offset parameter is introduced. Four offset methods are selected, and the determination of 4 is based on the relationship between the "offset quantity" and the "batch consistency of uniformity index" in the calibration data. The minimum offset quantity that makes the consistency improvement enter the plateau period is selected. The mean and variance of the sub-blocks are calculated for the four offsets respectively and then summed to obtain the distribution uniformity index. The distribution uniformity index is correlated with the area identifier and serves as the spatial distribution characteristic of the area.

[0059] The boundary smoothness level and region boundary continuity characteristics are derived from the curvature variation of the region contour. In practice, a closed contour point sequence is first extracted from the region mask. This sequence is obtained through boundary tracking, using an 8-neighborhood connectivity rule. The selection of the 8-neighborhood rule is based on the requirement for continuity of the oblique boundary, avoiding discontinuities in the oblique contour. After the contour point sequence is formed, to reduce the impact of jagged edges from the pixel grid on the curvature difference calculation, a contour smoothing window length parameter is introduced. The window length is taken as the 1st percentile of the total number of contour points, with a minimum value of 5 and a maximum value of 25. The 1st percentile and upper and lower limits are determined by calibration data. The determination method involves statistically analyzing the "stability of the curvature difference sequence" and "contour shape offset" under different window lengths, selecting the interval where stability is significantly improved and offset is controlled. Smoothing is achieved using a moving average. For each contour point, the average of the coordinates of several points before and after it replaces the current coordinate. The sequence is cyclically sampled in a closed-loop structure to eliminate endpoint effects. After smoothing, local curvature is calculated: For each point in the contour sequence, the direction information of the preceding and following segments is taken. The direction information is obtained from the coordinate difference between adjacent points, and the degree of turning between the two directions is quantified as the local curvature value of that point. Then, the curvature difference between adjacent contour points is calculated. The curvature difference is obtained by subtracting the local curvature values ​​of adjacent points and taking the absolute value, forming a curvature difference sequence. The arithmetic mean of the curvature difference sequence is then calculated to obtain the average curvature difference, which is used as the core quantification result of the continuity feature of the region boundary. The boundary smoothness level is determined based on the average curvature difference, and the judgment threshold is a preset threshold, which is determined by calibration data: The distribution of the average curvature difference between the confirmed virus particle region and the confirmed polysaccharide residue region is statistically analyzed separately. The segmentation position with the least overlap between the two distributions is selected as the candidate threshold interval. Then, the final threshold is determined by the criterion of the minimum weighted misjudgment rate within the interval. The weight of virus misjudgment is 2, and the weight of polysaccharide misjudgment is 1. The weight values ​​are determined based on the priority requirements of the purity of the virus candidate region in the subsequent inactivation assessment. If the average curvature difference is below the threshold, it is judged as a high smoothness level; if the average curvature difference is above or equal to the threshold, it is judged as a low smoothness level. The level result and the average curvature difference together constitute the continuity feature of the region boundary.

[0060] Texture directionality features are extracted from the continuity features of region boundaries, with the core being the consistency intensity of the gray-level gradient direction. In practice, a boundary neighborhood band is constructed around the candidate region outline. The width of the neighborhood band is a parameter, set to 3 pixels. The value of 3 pixels is determined based on the thickness distribution of the main edge band in the calibration data. This is achieved by statistically analyzing the high quantile thickness of the edge pixel bandwidth and rounding it up, ensuring the neighborhood band covers the main boundary texture variation range. The gray-level gradient direction is calculated for each pixel within the neighborhood band. The gradient direction is determined by the gray-level change intensity in both the horizontal and vertical directions. This intensity is obtained by a weighted sum of 3x3 neighborhood templates. The template size is chosen because its balance between boundary positioning accuracy and noise sensitivity is stable in the calibration data. After obtaining the gradient direction, it is discretized and quantized. The quantization level is a parameter, set to 16 levels. The value of these 16 levels is determined based on the relationship between "directional separation" and "variance stability" in the calibration data, selecting the minimum level where the separation improvement tends to plateau and the stability meets the constraints. After quantization, the variance is calculated using all directional quantized values ​​within the neighborhood band as samples. The variance is obtained by first calculating the mean of the directional quantized values, then summing the squared deviations of each quantized value from the mean and dividing by the sample size. The strength of directional consistency is determined by the reciprocal of this variance; the smaller the variance, the more consistent the directions, and the stronger the directional consistency after the reciprocal mapping. To avoid the variance approaching 0 and causing abnormal reciprocal values, a minimum protection factor is introduced. The minimum protection factor is the smallest difference unit corresponding to the directional quantization step, which is determined by the angular step of 16 quantization levels. Before taking the reciprocal, the variance is added to the minimum protection factor, and then the reciprocal operation is performed to obtain the texture directional features.

[0061] When the texture directionality features exceed a preset threshold, the particle edge sharpness value calculation process begins. This preset threshold is determined using calibration data: the texture directionality feature distributions of the virus candidate region and the polysaccharide candidate region are statistically analyzed separately, and the segmentation position with the least overlap between the two distributions is selected as the threshold. The threshold is determined by prioritizing control over the virus false positive rate; specifically, the proportion of virus regions classified as belonging to the polysaccharide side is reduced to within a preset upper limit of 0.05, which is determined by the business's tolerance for missed detection risks. After triggering the sharpness calculation, a sharpness analysis band is constructed within the candidate region. The analysis band extends inwards along the region contour, with bandwidth as a parameter. The bandwidth is taken as 0.1 times the pixel scale corresponding to the converted diameter of the candidate region. The value of 0.1 is determined statistically using calibration data. The statistical content includes the typical width of the edge transition zone and the sensitivity of the sharpness index to interference from the internal uniform region, selecting the proportion that focuses the sharpness index on the transition zone and improves stability. For each pixel within the analysis band, the gradient magnitude is calculated. The gradient magnitude is synthesized from the horizontal and vertical grayscale change intensities, which are calculated using a 3x3 neighborhood template to maintain consistency. After obtaining the gradient magnitude, a second-order transformation is calculated along the boundary normal direction. This second-order transformation is obtained by subtracting the gradient magnitudes of adjacent sampling points to obtain the first-order transformation, and then subtracting the first-order transformations from adjacent ones to obtain the second-order transformation. The sampling step size is a parameter, taken as one pixel. The value of one pixel is determined based on the minimum resolution distance of the pixel grid, ensuring that the second-order transformation reflects the finest-grained sharpness fluctuations. The absolute values ​​of all second-order transformations within the analysis band are taken and averaged. The average value is obtained by summing the absolute values ​​and dividing by the number of sampling points. This average value is determined as the grain edge sharpness value, and a correspondence is established between the sharpness value and the region identifier.

[0062] After generating surface roughness, distribution uniformity, boundary smoothness level, texture directionality features, and grain edge sharpness values, the integrated texture description vectors for each region are combined to construct a texture feature dataset. The integration process uses the region identifier as the primary key, combining each feature into a single integrated texture description record according to a fixed field order. For regions where sharpness calculations were not triggered, the grain edge sharpness values ​​are filled with default values. The default value is the median of the grain edge sharpness distribution in the calibration data. The median is determined based on its statistical characteristic of being insensitive to outliers, thus maintaining field integrity and cross-regional comparability. To reduce the impact of overall brightness variations across different image batches on feature scale, range normalization was performed on surface roughness, distribution uniformity index, texture directionality features, and grain edge sharpness values. The upper and lower limits of normalization were determined by calibration data, taking the 1st and 99th percentiles of each feature distribution. These limits were used to suppress scale drift caused by extreme value stretching. After normalization, each feature was mapped to a 0-1 interval. Boundary smoothness levels were expressed using discrete encoding: high smoothness was encoded as 3, and low smoothness as 1. The encoding rule was consistent with the smoothness discrimination direction. After the above integration of all candidate regions, a texture feature dataset was formed. The dataset was sorted by region identifier for easy retrieval of the corresponding region's comprehensive texture description record during subsequent classification and labeling.

[0063] Finally, classification and labeling were performed based on the texture feature dataset, using a preset threshold for surface roughness as the criterion. The preset threshold was determined through calibration data: the surface roughness distributions of confirmed virus particle regions and confirmed polysaccharide residue regions were statistically analyzed separately. The segmentation location with the least overlap between the two distributions was selected as the candidate threshold interval. Within this interval, the final threshold was determined based on the minimum weighted misclassification rate. In the weighted misclassification rate, the weight for virus misclassification was set to 2, and the weight for polysaccharide misclassification was set to 1. The weight values ​​were determined according to the priority requirements for the integrity of the virus candidate regions in subsequent inactivation assessments. For each candidate region, if the surface roughness was below the preset threshold, it was marked as a suspected polysaccharide residue region; if the surface roughness was higher than or equal to the preset threshold, it was marked as a suspected virus particle region. After all regions were labeled, a classified and labeled region group was formed, providing input for subsequent spatial proximity analysis and inactivation status determination.

[0064] S5 includes grouping the regions after classification and labeling, obtaining the set of boundary coordinates for each suspected polysaccharide residue region, and determining the spatial distribution of the region groups; for the spatial distribution, a pixel coordinate comparison method is used to detect the intersection of the suspected polysaccharide residue region with other regions by matching coordinate values ​​point by point, and obtaining the overlap relationship index; from the overlap relationship index, the boundary intersection calculation results are extracted, and the existence of occlusion is judged by calculating the intersection pixel ratio, and the occlusion relationship link of the region groups is obtained; based on the occlusion relationship link, a relationship matrix is ​​constructed and the distribution pattern is integrated to generate a spatial relationship mapping table by associating the locations of neighboring regions.

[0065] In this embodiment, after completing the classification and labeling of the regions, spatial relationship analysis establishes coordinate-level spatial associations starting from the suspected polysaccharide residue regions. At the start of processing, all suspected polysaccharide residue regions are screened from the region groups, and a boundary coordinate set is extracted for each region. The boundary coordinate set is obtained based on a binary region mask of the region. Boundary pixels are first located in the mask, and the determination of boundary pixels is achieved using a neighborhood difference method: for each foreground pixel within the mask, the state of its 8 neighboring pixels is checked; if any neighboring pixel is background, the foreground pixel is determined to be a boundary pixel. The selection of 8 neighbors is used to cover horizontal, vertical, and diagonal connections, avoiding breaks in diagonal boundaries. After the boundary pixel determination is completed, the position of each boundary pixel is extracted in the form of pixel coordinate pairs. Each pixel coordinate pair consists of row and column coordinates, which are directly taken from integer indices of the image coordinate system. To avoid the same coordinate being repeatedly included in the boundary coordinate set, a uniqueness determination mechanism is used, specifically by hash mapping or sorting the coordinate pairs to remove duplicates, ultimately forming the boundary coordinate set of the region. Meanwhile, to establish the spatial distribution of the regional groups, the circumscribed rectangle and centroid coordinates of each region are calculated simultaneously. The circumscribed rectangle is obtained by taking the minimum and maximum values ​​of the row and column coordinates of all foreground pixels in the region, respectively. The centroid coordinates are obtained by summing the row coordinates of all foreground pixels in the region and dividing by the number of pixels, and by summing the column coordinates and dividing by the number of pixels. The decimal processing rule of the centroid coordinates is used as a parameter to round to the nearest integer. The selection of the rounding rule is used to ensure that the centroid falls on the pixel grid point, so as to maintain the same coordinate expression system in subsequent distance calculations.

[0066] After establishing the spatial distribution, pixel coordinate comparison is performed to detect the intersection of suspected polysaccharide residue areas with other areas and form an overlap index. The comparison is performed on a pair-by-pair basis. First, a suspected polysaccharide residue area is selected as the main area, and then all areas within the same field of view except for the main area are traversed as the comparison areas. To reduce the computational cost of point-by-point matching, a bounding rectangle screening is performed first: the overlap intervals of the bounding rectangles of the main area and the comparison area are calculated in the row and column directions. The upper boundary of the overlap interval is the larger of the upper boundaries of the two bounding rectangles, the lower boundary is the smaller of the lower boundaries of the two bounding rectangles, the left boundary is the larger of the left boundaries of the two bounding rectangles, and the right boundary is the smaller of the right boundaries of the two bounding rectangles. If the upper boundary is greater than the lower boundary or the left boundary is greater than the right boundary, it is determined that the bounding rectangles do not overlap, and the intersection pixel count of the pair is directly set to 0. If the circumscribed rectangles overlap, the point-by-point matching stage begins. This stage scans within the overlap window with a pixel step size of 1. The pixel step size of 1 ensures that the scan covers every pixel position, maintaining strict consistency in the intersection count. During scanning, a double-mask query is performed on each pixel coordinate within the overlap window: first, it checks if the main region mask is foreground at that coordinate; then, it checks if the mask of the compared region is foreground at that coordinate. If both are foreground, the coordinate is included in the intersection pixel count, and the intersection pixel count is incremented by 1. After the intersection pixel count is completed, an overlap index is formed. This index is obtained by dividing the intersection pixel count by the number of pixels in the compared region, which is obtained from the foreground pixel count of its region mask. The denominator of this ratio is the number of pixels in the compared region. This is to ensure that the overlap index directly expresses the coverage ratio of the suspected polysaccharide residue region to the compared region, facilitating subsequent occlusion determination using a monotonic threshold decision.

[0067] After obtaining the overlap relationship index, the boundary intersection calculation results are further extracted from the overlap relationship index to determine whether occlusion exists. The boundary intersection calculation takes the boundary coordinate sets of the two regions as input and performs coordinate set matching within the aforementioned overlap window: for each boundary coordinate in the main region boundary coordinate set that falls into the overlap window, it is queried whether the coordinate also exists in the boundary coordinate set of the compared region. If so, the boundary intersection pixel count is incremented by 1. To improve matching efficiency, the boundary coordinate set of the compared region is converted into a hash set structure before matching, and the coordinate query is completed within the hash set, keeping the query time stable. After the boundary intersection pixel count is completed, the boundary intersection pixel count is divided by the total number of boundary pixels of the compared region to obtain the boundary intersection pixel ratio. The total number of boundary pixels of the compared region is obtained from the number of elements in its boundary coordinate set. Occlusion determination is based on a comparison between the boundary intersection pixel ratio and an occlusion determination threshold. The threshold is a parameter determined using a calibration sample library: Pairs of manually confirmed occlusion and pairs of manually confirmed non-occlusion are selected from the calibration sample library. The boundary intersection pixel ratio is calculated for each pair, resulting in two types of ratio distributions. Candidate threshold intervals are then selected at the position with the minimum overlap between the two distributions. Within these candidate threshold intervals, the final threshold is determined based on the criterion of minimizing the weighted false positive rate. The weighted false positive rate allocation assigns a weight of 2 for missed occlusions and a weight of 1 for false occlusions. The weight values ​​are determined based on the priority of subsequent image restoration for the completeness of occlusion recognition. After threshold setting, occlusion is determined to exist when the boundary intersection pixel ratio is not lower than the threshold, and occlusion is determined to not exist when the boundary intersection pixel ratio is lower than the threshold. For regions identified as having occlusion, an occlusion relationship link is formed. The link is expressed as a directed relationship, with the starting point being the suspected polysaccharide residue region identifier and the ending point being the compared region identifier. The overlap relationship index and the ratio of intersection pixels at the boundary are recorded as link attributes, so that the link carries both coverage strength and boundary interaction strength information.

[0068] After the occlusion relationship chain is formed, a relationship matrix is ​​constructed and the distribution pattern is integrated to generate a spatial relationship mapping table. The row index of the relationship matrix is ​​the set of suspected polysaccharide residue regions, and the column index is the set of all regions participating in the comparison. The matrix cell is used to carry the region pair relationship: the cell records the occlusion judgment status, overlap relationship index, and boundary intersection pixel ratio. The occlusion judgment status is expressed by numerical encoding. The encoding rule is set as a parameter: 0 indicates no overlap, 1 indicates overlap but no occlusion is triggered, and 2 indicates occlusion is established. The selection of the encoding rule is used to directly trigger the branch logic in the subsequent repair processing with a single read. In order to integrate the distribution pattern, a proximity association judgment is introduced to associate the positions of neighboring regions. The proximity association is constrained by the centroid distance and the minimum boundary distance. The centroid distance is calculated as follows: take the difference between the row coordinates and column coordinates of the centroids of the two regions, square them respectively, sum them, and then take the square root of the sum to obtain the centroid distance. The square root calculation adopts the standard square root operation of the numerical library to ensure consistency. The calculation process for the minimum boundary distance is as follows: For each boundary coordinate in the set of main region boundary coordinates, the distance between pixels is calculated by traversing the set of boundary coordinates of the compared region, and the minimum value among all distances is taken as the minimum boundary distance. To avoid computational bloat caused by full traversal, a candidate screening window is introduced. The screening window is centered on the current main region boundary coordinates, and the window radius is a parameter to take the row and column projection range of the proximity threshold. First, the boundary coordinates of the compared region are searched only within the screening window, and then the distance is calculated on the hit coordinates, thus concentrating the distance calculation near physically close boundaries. The proximity threshold is a parameter, and the determination of the proximity threshold is based on pixel size calibration and typical target particle size statistics: First, the pixel size calibration value is obtained through a microscopic ruler, and then the short side pixel length of the bounding rectangle of the virus particle is statistically analyzed in the calibration sample library as the typical size. 1.5 times the typical size is taken as the proximity threshold. This 1.5 times ratio is determined by a trade-off between the "repair benefit after triggering proximity association" and the "false association rate" in the calibration sample library, so that proximity association covers the real occlusion of the adjacent structure and suppresses far-distance irrelevant association. The proximity association determination employs a rule that triggers the determination if either of two conditions is met: the centroid distance is below the proximity threshold or the minimum boundary distance is below the proximity threshold. This rule is used to cover situations where large and small regions exhibit different centroid distance characteristics. The proximity association results are incorporated into the relation matrix cells as additional fields, ensuring that each region pair simultaneously possesses descriptions of both occlusion and proximity relationships.

[0069] The spatial relationship mapping table is generated by expanding the relationship matrix. During expansion, the suspected polysaccharide residue region is used as the primary key. For each primary key, a list of its associated regions is output. Each associated record provides the primary region identifier, the associated region identifier, the bounding rectangle of the primary region, the bounding rectangle of the associated region, the coordinate range of the overlapping window, the overlap relationship index, the boundary intersection pixel ratio, the occlusion judgment status code, the proximity judgment result, and the centroid coordinates. The records in the mapping table are sorted in ascending order by the row coordinates and column coordinates of the centroid of the primary region. The sorting rule is used as a parameter to maintain the spatial consistency of the output within the same field of view, facilitating the subsequent image restoration stage to process occlusion links in spatial proximity order, thereby achieving targeted reconstruction input for occluded suspected virus particle regions.

[0070] S6 includes obtaining the occlusion relationship link between the polysaccharide residue region and the viral particles through a spatial relationship mapping table, and determining the boundary intersection position of the region; for the boundary intersection position, image inpainting technology is used to remove signals from the polysaccharide residue region to obtain a preliminary cleaned particle outline; from the particle outline, the signal intensity distribution of the occluded region is extracted, and the distribution is adjusted by pixel value comparison to match the features of surrounding viral particles to obtain corrected boundary data; based on the boundary data, the complete morphology of the viral particles is reconstructed, and a repair layer is generated by fusing the pixel values ​​of neighboring regions; the repair layer is integrated with the original image to verify the continuity of the reconstructed region, and the repaired second image data is obtained.

[0071] In this embodiment, the occlusion relationship links in the mapping table are first parsed, and each link is broken down into a polysaccharide residual region identifier, an occluded virus particle region identifier, an overlapping window coordinate range, a boundary intersection pixel ratio, and an occlusion determination status. Link filtering uses records with an occlusion determination status of "occlusion established" as input. The filtering rules are fixed during the mapping table generation stage, and S6 only performs a line-by-line traversal and filtering. For each retained link, a local search window is located based on the overlapping window coordinate range. The upper, lower, left, and right boundaries of the local search window are directly taken from the mapping table records. The coordinates of the mapping table records are calculated by the overlapping of the circumscribed rectangles in S5, and all coordinates are pixel index integers to avoid coordinate system transformation errors in subsequent positioning.

[0072] When determining the boundary intersection location within the local search window, the boundary coordinate sets of the polysaccharide residue region and the occluded virus particle region are simultaneously invoked. The boundary coordinate set comes from the boundary extraction result in step 5. In step S6, the coordinate set is not extracted repeatedly; it is only limited to the local search window to reduce the matching scale. The matching process uses point-by-point coordinate comparison: each boundary coordinate in the polysaccharide residue boundary coordinate set that falls into the local search window is traversed, and this coordinate is used as a key to perform an existence query in the occluded virus particle boundary coordinate set. If the query is successful, the coordinate is added to the boundary intersection coordinate set. To ensure stable query time, the occluded virus particle boundary coordinate set is converted into a hash structure before entering the query. The hash key is formed by concatenating row and column coordinates in a fixed order, and the concatenation rule remains consistent throughout the entire process. After the boundary intersection coordinate set is formed, the boundary intersection bounding box is further calculated. The upper boundary of the bounding box is taken from the minimum row index in the intersection coordinate set, the lower boundary from the maximum row index, the left boundary from the minimum column index, and the right boundary from the maximum column index, thus completing the pixel-level positioning of the boundary intersection location. If the intersection coordinate set is empty, it is determined that the link has a boundary misalignment in the current image. Subsequent removal and reconstruction are only performed within the local search window according to the mask overlap area to avoid positioning failure due to missing intersection.

[0073] When removing polysaccharide residue signals at boundary intersection locations, a removal mask is first generated. This mask is taken from the region mask of the suspected polysaccharide residue area and cropped along with the local window corresponding to the boundary intersection bounding box. After cropping, only the foreground pixels of the mask within the local window are retained to avoid affecting the unoccluded areas. The replacement value for signal removal is the background estimate, which is obtained through background ring statistics: a background ring is formed by expanding outward from the boundary of the removal mask as the inner boundary. The width of the background ring is a parameter, set to 3 pixels. These 3 pixels are determined by the thickness distribution of the main edge band in the calibration samples. The determination method is to statistically analyze the pixel thickness of the edge band of the unoccluded virus particles and round it up to the 90th percentile, ensuring that the ring is located outside the edge and not involved in the texture inside the particle. The screening of background ring pixels also excludes any pixels that fall into the mask of the occluded virus particles. The exclusion rule is directly determined based on the region mask. The background estimate is taken as the median of the grayscale distribution of the background ring band. The median is used to suppress the pull of outliers on the estimate, and its stability is higher in the background fluctuation statistics of the calibration samples. After the background estimation is completed, for each pixel coordinate that has been removed from the mask, the original grayscale value is replaced with the background estimate. The replacement is performed in row-first scan order to ensure that the same pixel is replaced only once, resulting in a preliminary cleaned local image and a preliminary cleaned particle outline visual result.

[0074] After signal culling, structural gaps caused by the culling still exist within the local window, requiring repair filling to restore the continuous transition of the contour. Repair filling uses the boundary of the gap region as the propagation front. The boundary of the gap region is obtained by performing 8-neighborhood boundary determination on the foreground pixels of the culling mask. The 8-neighborhood determination is used to maintain the coherence of the diagonal gap boundary. The filling strategy adopts iterative propagation based on neighborhood fragments: first, the fragment size is determined, which is a parameter, taking a 9x9 pixel window. The value of 9x9 is determined by statistically analyzing the edge transition width and texture repetition scale in the calibration samples. The determination method is to take twice the number of pixels of the edge transition width of the unmasked virus particles and then round up to an odd number, ensuring that the fragment covers the boundary gradient transition and contains sufficient texture context. In each iteration, for each pixel to be filled on the boundary of the gap, its surrounding fragments are extracted, and the most similar fragment is searched within the known region of the local window. The similarity calculation uses the cumulative absolute deviation of grayscale difference, and the cumulative range is limited to the known pixel positions within the fragment to avoid unknown pixels from participating in the comparison. The search range is a parameter, taking the region after expanding outward by 15 pixels from the boundary intersection bounding box. The 15 pixels are determined by the statistical upper bound of the occlusion bandwidth in the calibration samples to ensure that the source of the candidate fragment is in the same domain as the target grain texture. After matching the most similar fragment, the grayscale value of the fragment at the corresponding position is assigned to the pixel to be filled, and the state of the pixel is updated from unknown to known. The iteration terminates when the number of gap pixels drops to 0. If the number of gap pixels does not decrease after 5 consecutive iterations, it is determined that there is a closed hole, and layered filling from the hole boundary inward is used. Layered filling is advanced layer by layer according to the pixel level away from the hole boundary, and the advancement step size is fixed at 1 pixel to maintain the consistency of boundary convergence. After the filling is completed, a continuous preliminary cleaned grain outline and a continuous grayscale transition are formed within the local window.

[0075] After the initial outline is formed, the signal intensity distribution of the occluded area needs to be extracted and corrected to ensure that the grayscale statistics of the repaired area are consistent with the characteristics of the surrounding virus particles. Signal intensity distribution extraction is based on two banded regions: the target reference band and the residual influence band. The target reference band is obtained by shrinking the mask of the occluded virus particle region inwards. The shrinkage width is a parameter, taken as the number of pixels corresponding to the 10th percentile of the converted diameter. The 10th percentile is determined by statistically analyzing the typical width of the transition zone at the edge of the virus particle in the calibration sample, avoiding the reference band falling into the edge mixing area. The converted diameter is calculated by combining the number of pixels in the region with the pixel size calibration value, which is obtained through the correspondence between the length of the microscopic ruler scale and the pixel length. The residual influence band is obtained by expanding the mask of the polysaccharide residual region outwards. The expansion width is also taken as the number of pixels corresponding to the 10th percentile, ensuring it covers the neighborhood with the strongest occlusion disturbance. For the target reference band, the mean gray level, standard deviation gray level, and three quantiles are statistically analyzed. The quantiles are the 5th, 50th, and 95th percentiles. The number and location of the quantiles are determined statistically by the proportion of abnormal bright spots in the calibration samples. The 5th and 95th percentiles are used to suppress the influence of extreme values, and the 50th percentile is used to characterize the center position. The same statistical analysis is performed on the repair and filling region. The repair and filling region is defined as the union of the culling mask coverage area and the filling area, ensuring that the statistics cover all modified pixels. Distribution correction uses segmented mapping aligned with quantiles: the 5th percentile of the repair region is mapped to the 5th percentile of the reference band, the 50th percentile of the repair region is mapped to the 50th percentile of the reference band, and the 95th percentile of the repair region is mapped to the 95th percentile of the reference band. Within two adjacent quantile intervals, the gray level of each pixel is adjusted linearly to make the overall distribution of the repair region converge with the reference band. To constrain the correction by introducing non-realistic mutations, an upper limit threshold for quantile offsets is introduced. This upper limit threshold is determined by a calibration sample library. The method involves randomly selecting sub-bands of the same scale within the reference band of unobstructed viral particles, statistically analyzing their quantile difference distribution, and using the 95th percentile as the upper limit threshold. This ensures the correction amplitude falls within the true fluctuation range. When the offset required for mapping a certain quantile exceeds the upper limit threshold, that offset is truncated to the upper limit threshold before mapping is performed. After correction, a corrected local grayscale field is obtained, providing a consistent grayscale gradient response basis for subsequent boundary relocalization.

[0076] The corrected boundary data is obtained through boundary relocation, which performs a normal search centered on the boundary intersection. The original boundary point chain of the occluded virus particles is processed point-by-point within the bounding box of the boundary intersection: for each boundary point, its local tangential direction is first calculated, obtained from the coordinate difference between adjacent boundary points; then, the direction perpendicular to the tangential direction is taken as the normal direction. A fixed-length pixel sequence is sampled both inwards and outwards along the normal direction. The sampling length is a parameter, taken as 7 pixels, determined statistically by the upper bound of the edge transition width in the calibration samples, ensuring that the normal search covers the complete transition from the background to the particle's interior. The grayscale change intensity is calculated for each pixel in the sampling sequence, obtained by the absolute value of the grayscale difference between adjacent sampling points. The position where the grayscale change intensity reaches its maximum is found in the sampling sequence, and this position is used as the new boundary point coordinates. After all boundary points are repositioned, a corrected boundary point chain is formed. The boundary point chain then undergoes a closure check. The closure is determined by the distance between the start and end points not exceeding 1 pixel. The 1-pixel threshold is determined based on the 95th percentile of the pixel positioning error statistics. If the condition is not met, points are added on both sides of the gap using the shortest path. The added point path is restricted to the bounding box of the boundary intersection to avoid cross-region connectivity errors.

[0077] After obtaining the corrected boundary data, the process proceeds to reconstruct the complete morphology of the virus particles and generate repair layers. First, the region to be reconstructed is defined. This region is the set of internal pixels enclosed by the corrected boundary point chain, and its union with the original mask of the occluded virus particle is calculated to ensure that the missing portion caused by occlusion is included. Then, regions with neighboring associations to the occluded virus particle are retrieved from the spatial relationship mapping table. The determination of neighboring associations is based on the neighboring threshold from step 5. The neighboring threshold is determined by pixel size calibration and the typical size of the virus particle. The typical size is the median of the short side pixel length of the bounding rectangle of the virus particle in the calibration sample library. The neighboring threshold is 1.5 times this median, and this 1.5-fold rate is determined by a trade-off between the "nearest neighbor association hit rate" and the "false association rate" in the calibration samples. For each neighboring region, a pixel fragment is extracted from the side closest to the region to be reconstructed. The extraction direction is determined by the normal direction of the boundary to be reconstructed, and the extraction width is consistent with the size of the aforementioned repair fragment to ensure texture continuity. During fusion, candidate segments are assigned spatial distance weights and directional consistency weights: Spatial distance weights are obtained by calculating the pixel distance from the segment center to the pixel to be reconstructed, normalizing it to the maximum distance within the current fusion set, and then inverting the result. The normalization benchmark is the maximum pixel distance within the current fusion set, and inversion gives closer segments higher weights. Directional consistency weights are obtained by calculating the gradient directional consistency strength of the segment boundary neighborhood and normalizing it to the minimum and maximum values ​​within the current fusion set. The calculation method for gradient directional consistency strength follows the definition of the inverse of the directional variance in steps 4 and 5, and normalization gives directionally consistent segments higher weights. For the same pixel to be reconstructed, the gray values ​​of each neighboring segment at the corresponding position are weighted and averaged according to the product of the two weights to obtain the reconstructed gray value of the pixel. Repair layers are generated in order from the outside to the inside: the first repair layer covers a 1-pixel band inward from the boundary of the region to be reconstructed, the second repair layer covers a 2-pixel band inward, and the layer advancement step size is fixed at 1 pixel to maintain morphological convergence consistency. Advancement continues until the region to be reconstructed is completely covered, forming a complete reconstructed gray level.

[0078] After the reconstructed morphology is completed, the repair layer is integrated with the original image to verify continuity, and the second image data is output. Integration uses the mask of the region to be reconstructed as a fusion mask, replacing the grayscale values ​​of pixels covered by the fusion mask with the corresponding grayscale values ​​of the reconstructed morphology's grayscale layer. To reduce stitching artifacts at the fusion boundary, a transition band is constructed at the fusion boundary. The width of the transition band is set to 3 pixels, determined statistically by the spatial diffusion range of boundary gradient jumps in the calibration samples, ensuring the transition covers the main jump areas. Gradual fusion is performed within the transition band: pixels closer to the original image retain higher original weights, and pixels closer to the reconstructed region retain higher reconstructed weights. The weights change linearly along the width of the transition band, and this linear change rule ensures a stable progression of weights across the pixel grid. Continuity verification is divided into two parts: geometric continuity and intensity continuity. Geometric continuity verification is achieved by checking the closure and curvature stability of the reconstructed boundary: closure is determined using a threshold where the distance between the start and end points does not exceed 1 pixel, with the threshold source being the same as before; curvature stability is achieved by calculating the turning degree point by point on the boundary point chain and statistically averaging the turning differences between adjacent points, with the average value not exceeding the curvature difference threshold, which is determined by taking the 95th percentile of the average curvature difference distribution of the unmasked viral particle boundaries in the calibration sample library. Intensity continuity verification is achieved by checking the difference in grayscale mean and gradient jump on both sides of the fusion boundary: a 3-pixel-wide strip is taken on each side of the fusion boundary, and the grayscale mean and standard deviation are statistically analyzed, with the grayscale mean difference not exceeding the mean difference threshold; gradient jump is achieved by comparing the peak intensity of grayscale changes along the boundary normal direction, with the peak value not exceeding the jump threshold; both the mean difference threshold and the jump threshold are determined by taking the 95th percentile of the statistical distribution of unmasked viral particles at the same location scale in the calibration sample library, ensuring that the verification criteria are consistent with the natural fluctuations of real particles. If both geometric continuity and intensity continuity satisfy the threshold constraints, the integrated image is defined as the repaired second image data and output. If neither is satisfied, a controlled adjustment is performed on the transition band width and the upper limit threshold of the quantile offset. The adjustment direction is determined based on the failure items, and the adjustment magnitude is taken as the 10th percentile step of the corresponding statistic in the calibration sample library. The step value is determined based on parameter sensitivity statistics. After adjustment, transition fusion and continuity verification are re-executed until the constraints are satisfied or the maximum number of iterations is reached. The maximum number of iterations is 3, which is determined by a trade-off between processing efficiency and convergence probability. The output second image data maintains the same resolution and coordinate system as the first image data.

[0079] S7 includes obtaining the particle outline of the virus particles from the second image data, determining the boundary position of the particle outline by comparing the signal intensity distribution; for the boundary position, adjusting the morphological outline correction by extracting pixel values ​​to obtain a preliminary distribution with regular shape; based on the preliminary distribution, generating a correction value for boundary integrity by fusing the repaired area, and judging the continuity of particle density distribution; and through continuity, integrating inactivation state-related parameters and evaluation links to generate a set of morphological feature parameters.

[0080] In this embodiment, after the second image data enters S7, the input constraints for locating the virus particle objects and extracting their contours are first completed. The processing uses suspected virus particle regions as an index, extracting the region mask and bounding rectangle coordinates for each suspected virus particle region. The bounding rectangle coordinates are obtained by statistically analyzing the minimum and maximum row and column values ​​of the foreground pixels in the region mask, used to limit the local processing window and reduce interference from non-target pixels. Subsequently, grayscale values ​​are read pixel by pixel from the second image data within the bounding rectangle area to form local grayscale blocks. These local grayscale blocks serve as a unified data source for boundary localization and shape correction, ensuring that boundary localization, shape regularity evaluation, and boundary integrity evaluation are within the same coordinate system and the same grayscale scale.

[0081] Obtaining the particle outline presupposes the determination of the boundary position, which is determined by comparing signal intensity distributions. In practice, a boundary search band is first established at the boundary of the region mask. The width of the search band is a parameter, set to 3 pixels. The value of 3 pixels is determined based on the thickness distribution of the edge band of the repaired viral particles in the calibration sample library. This is achieved by counting the number of pixels covered by the grayscale transition near the edge of unmasked particles repaired with the same aperture, and rounding up to the 90th percentile, ensuring the search band covers the main transition area from the background to the particle's interior. For each initial boundary point within the search band, the local tangential direction is first calculated. The tangential direction is obtained from the coordinate difference between the point and its adjacent boundary points. Then, the direction perpendicular to the tangential direction is taken as the normal direction. Pixel sampling is performed outwards and inwards along the normal direction to form a grayscale sequence. The sampling length is a parameter, set to 7 pixels. The value of 7 pixels is determined statistically based on the upper limit of the edge transition width in the calibration sample library, ensuring the sequence covers the complete changes of the background side, the transition side, and the particle's interior side. The sampling step size of the grayscale sequence is 1 pixel. The value of 1 pixel ensures that every pixel position is included in the comparison, avoiding boundary offset caused by skipping sampling.

[0082] The signal intensity distribution comparison of grayscale sequences comprises two parts: reference distribution construction and boundary location determination. The reference distribution originates from stable texture bands within the particles. These stable texture bands are obtained by shrinking a region mask inwards. The shrinkage width is a parameter, taken as the number of pixels corresponding to the 10th percentile of the converted diameter. The 10th percentile value is determined based on the statistical analysis of typical widths of edge blending regions in the calibration sample library, ensuring the stable texture band avoids edge blending regions. The converted diameter is calculated by combining the number of pixels in the region with the pixel size calibration value, obtained through the correspondence between the length of a microscopic ruler scale and the pixel length. Statistics of the reference distribution are calculated for all pixel grayscale values ​​within the stable texture band. These statistics include the average grayscale value, grayscale standard deviation, and quantiles. Quantiles are taken as the 5th, 50th, and 95th percentiles. The quantile positions are determined based on the long-tail proportion of the grayscale distribution within the particles in the calibration sample library. The 5th and 95th percentiles are used to constrain outlier effects, while the 50th percentile is used to characterize the central tendency. Simultaneously, the absolute value of the grayscale difference between adjacent sampling points within the normal grayscale sequence is calculated to form a change intensity sequence. The position of the maximum value in the change intensity sequence is used as the candidate boundary position index. Then, the grayscale distribution on both sides of the candidate index is compared: when the mean grayscale value of several sampling points outside the candidate index aligns with the range below the 5th percentile of the reference distribution, the outer side is determined to be close to the background; when the mean grayscale value of several sampling points inside the candidate index aligns with the range near the 50th percentile of the reference distribution, the inner side is determined to be close to the particle interior. The alignment criterion adopts a difference threshold, which is a parameter. The difference threshold is taken as 1 times the grayscale standard deviation of the reference distribution. The value of 1 times is determined statistically based on the fluctuation of the mean difference between the inner band and the background band of the same particle in the calibration sample library, so that the alignment judgment is tolerant of natural fluctuations while remaining sensitive to mislocation. When a candidate index simultaneously satisfies both outer and inner alignment, the pixel coordinates corresponding to the candidate index are determined as the final boundary position of the boundary point. If not, the next largest position is tried in descending order of intensity in the intensity sequence until the alignment criterion is met or the number of candidates reaches the upper limit (maximum of 3). The upper limit value is determined based on the proportion of multi-peak edge cases in the calibration sample library, ensuring convergence even at complex texture edges. After the above comparison is performed on all initial boundary points within the search band, a set of final boundary position points is obtained. These points are connected in the order of boundary direction to form a particle contour point chain, and a closure check is performed on the point chain. The closure threshold is set to 1 pixel, which is determined by the 95th percentile of the pixel positioning error distribution. If the chain is not closed, points are added at both ends of the gap using the shortest pixel path. The added point path is restricted within the search band to avoid cross-region connectivity.

[0083] After obtaining the particle contour, the process proceeds to morphological contour correction and preliminary shape regularity distribution generation. First, smoothing is performed on the contour point chain to reduce pixel staircase effects. The smoothing window length is a parameter, taken as the 1st percentile of the total number of contour points, with a lower limit of 5 and an upper limit of 25. The values ​​of the 1st percentile and upper and lower limits are determined based on a trade-off statistical approach between "smoothed contour offset" and "radial statistical stability" in the calibration sample library, ensuring that smoothing suppresses jagged edges without altering the overall shape. A moving average is used for smoothing; for each contour point, the average coordinates of several points before and after it are replaced with the current coordinates, and the sequence is cyclically sampled in a closed-loop structure. After smoothing, the geometric quantities are calculated as follows: The perimeter of the contour is obtained by accumulating the pixel distances between adjacent contour points, and the pixel distance is obtained by taking the square root of the sum of the squares of the row difference and column difference; the contour area is obtained by counting the pixels inside the contour, and the number of pixels inside is determined by the scan line filling method, that is, scanning row by row within the bounding rectangle and determining whether a pixel falls inside the closed contour. If it does, the count is incremented by 1; the aspect ratio of the bounding rectangle is obtained by dividing the number of pixels on the longer side of the bounding rectangle by the number of pixels on the shorter side, and the longer and shorter sides are determined by comparing the row and column spans of the bounding rectangle; the centroid coordinates are obtained by summing the pixel coordinates inside the contour and dividing them by the number of pixels inside, and the centroid coordinates are rounded to the nearest integer to ensure they fall within the pixel grid point. The radial distance distribution is calculated by traversing all contour points, calculating the pixel distance from each contour point to the centroid, and forming a distance sequence; the mean and standard deviation of the distance sequence are calculated, and the standard deviation is obtained by accumulating the squares of the deviations of each distance from the mean distance, dividing by the number of contour points, and then taking the square root. The initial distribution of shape regularity is characterized by the standard deviation of radial distance and the deviation of aspect ratio: the deviation of aspect ratio is calculated by the absolute value of the difference between aspect ratio and 1. The smaller the standard deviation of radial distance and the smaller the deviation of aspect ratio, the higher the regularity interval of the initial distribution of shape regularity. In order to form a recordable distribution result, the radial distance sequence is divided into 5 segments according to the quantile. The number of 5 segments is determined by the statistical analysis of the distinguishable hierarchical distribution of regular and irregular shapes in the radial distance in the calibration sample library. The mean and dispersion within each segment are calculated as the segment description of the initial distribution of shape regularity.

[0084] After the initial distribution of regular shapes is formed, the boundary integrity correction value is generated, and the continuity of particle density distribution is judged simultaneously. First, the repair-affected segments are identified. The determination of the repair-affected segments is based on the spatial overlap between the repair mask and the particle contour: each contour point in the contour point chain is compared with the repair mask using pixel coordinates. Contour points falling into the foreground of the repair mask are counted as repair-affected points. The repair-affected percentage is obtained by dividing the repair-affected point count by the total number of contour points. The boundary integrity correction value consists of three factors: contour closure, contour gap degree, and repair-affected percentage. Contour closure is determined using a binary method; if the distance between the start and end points is no more than 1 pixel, the closure is considered successful. The 1-pixel threshold is derived from the positioning error statistics, as mentioned earlier.

[0085] The degree of contour gap is determined by detecting segments where the distance between adjacent contour points increases abnormally: first, the distances of all adjacent contour points are calculated to form a distance sequence; then, the 95th percentile of the distance sequence is used as the abnormal distance benchmark. The abnormal threshold is the larger of the abnormal distance benchmark and 3 pixels. The 3-pixel lower limit is determined statistically from the smoothed upper limit of normal adjacent distances in the calibration sample library to avoid misjudging normal curvature changes as gaps. When an adjacent distance exceeds the abnormal threshold, the segment is recorded as a gap segment, and the lengths of the gap segments are accumulated to obtain the cumulative gap length. The cumulative gap length is then divided by the contour perimeter to obtain the gap ratio. The repair impact ratio is used to deduct the uncertainty of the repair area. The deduction coefficient is a parameter, and the deduction coefficient is set to 0.5. The value of 0.5 is determined based on the correlation statistics between "repair impact ratio" and "boundary error probability" in the calibration sample library, so that the repair ratio has a moderate impact on the integrity. The synthesis of boundary integrity correction values ​​uses weighted aggregation: closure pass or fail is mapped to 1 or 0, gap ratio is obtained by subtracting gap ratio from 1 to obtain integrity ratio, repair impact deduction is obtained by subtracting repair impact ratio from 1 and multiplying by deduction coefficient to obtain repair reliability, and the three are multiplied to obtain boundary integrity correction value. Multiplication synthesis is used to make the overall integrity decrease when any key item is low, thereby maintaining a conservative assessment orientation.

[0086] The continuity of particle density distribution is achieved through concentric annular zone statistics. The annular zones are constructed with the aforementioned centroid as the center. The pixel distance from each pixel within a particle to the centroid is calculated, and the maximum radial distance is used as the normalization benchmark. The maximum radial distance is the maximum value of the sequence of distances from the contour point to the centroid. Five annular layers are selected as the parameter. The value of five layers is determined based on the statistically resolvable hierarchical levels of grayscale and structural layers within the particle in the calibration sample library, ensuring that each layer contains sufficient pixels and that inter-layer differences can be captured. For each internal pixel, its normalized radius is calculated, and its corresponding annular zone number is determined. The normalized radius is calculated by dividing the pixel's radial distance by the maximum radial distance. Then, the pixels are divided into corresponding annular zones according to the five equal-width intervals. The foreground pixel density is statistically analyzed for each annular zone. The foreground pixel density is obtained by dividing the number of pixels within the annular zone that belong to the particle by the annular zone's pixel capacity. The annular zone's pixel capacity is obtained by counting the total number of pixels within the annular zone region. After obtaining the five annular zone densities, the absolute values ​​of the density differences between adjacent annular zones are calculated to form a density difference sequence. The average and maximum values ​​of the density difference sequence are then calculated as continuity indicators. The continuity threshold is a parameter, determined through a calibration sample library: The maximum density difference distribution is statistically analyzed in unmasked and unrepairable viral particle samples, and the 95th percentile is used as the continuity threshold, treating natural interlayer fluctuations of real particles as continuous. When the maximum density difference of a particle exceeds this threshold and also exceeds the orientation of the repair-affected segment, density continuity is considered reduced, and the boundary integrity correction value is lowered. The reduction magnitude is a parameter, set to 0.1. The value of 0.1 is determined based on the sensitivity statistics of "density surge magnitude" and "contour positioning error" in the calibration sample library, ensuring a controllable reduction intensity. The corresponding reduction rule is to multiply the boundary integrity correction value by 1 and subtract the reduction magnitude, ensuring that integrity decreases during continuity anomalies but does not abruptly return to zero.

[0087] After completing the preliminary distribution of particle contours and shape regularity, boundary integrity correction values, and density continuity indices, the parameters related to the inactivation state and the evaluation chain are integrated to generate a set of morphological feature parameters. The parameter set is recorded on a particle-by-particle basis, with fields including particle identifier, contour point chain index, shape regularity index, boundary integrity correction value, density continuity index, repair impact percentage, and gap ratio. The particle identifier is generated by combining the coordinates of the upper left corner of the circumscribed rectangle with the particle number. The particle number is sorted and incremented according to the row coordinates and column coordinates of the circumscribed rectangle, ensuring that the identifier is unique and consistent with its spatial location within the same field of view. In this step, the evaluation chain forms a structured reference relationship: each particle record points to its contour point chain and corresponding statistical intermediate value, enabling subsequent inactivation determination to directly trace the boundary location and correction basis when calling boundary integrity thresholds or shape regularity-related criteria.

[0088] S8 includes obtaining boundary integrity values ​​from a set of morphological feature parameters, determining the initial inactivation status of virus particles by comparing them with a preset threshold; for the initial inactivation status, obtaining particle size uniformity distribution from the set of morphological feature parameters, and generating the final inactivation assessment result of virus particles by fusing the particle size uniformity distribution.

[0089] In this embodiment, the inactivation assessment uses the morphological feature parameter set as the sole data entry point and employs particle identifiers as indexes to complete particle-by-particle judgment and batch-level fusion. The morphological feature parameter set is organized by particle identifier in its storage structure. Each record contains at least a boundary integrity value, particle area, equivalent diameter, and the field of view number or batch number corresponding to that particle. Step 8 begins by traversing the morphological feature parameter set, reading the boundary integrity value line by line according to the particle identifier. The boundary integrity value is taken from the boundary integrity correction value obtained in Step 7. The correction value has already undergone synthesis of corrections for closure, gap degree, repair impact ratio, and density continuity during generation. Step 8 does not change its generation caliber; it only performs threshold comparison and fusion decision-making.

[0090] The initial inactivation state is determined by comparing the boundary integrity value with a preset threshold. The preset threshold, as a parameter, is determined by a calibration sample library before system activation. This library contains two types of samples: confirmed non-inactivated particles and confirmed inactivated particles. For each sample, a boundary integrity value is output using the same algorithm. The threshold determination process is as follows: First, the boundary integrity values ​​of the two types of samples are summarized to form two sets of numerical sequences. Each set of numerical sequences is sorted to obtain the empirical cumulative distribution of the two distributions. Then, within the range of boundary integrity values, candidate thresholds are scanned with a fixed step size. The step size is a parameter, set to 0.01. The value of 0.01 is determined based on the quantization resolution and measurement fluctuation amplitude of the boundary integrity values ​​in the calibration samples, ensuring that the threshold search covers a sufficiently fine interval while avoiding unnecessary computational bloat. For each candidate threshold, two types of false positive rates are calculated: the proportion of non-inactivated samples with boundary integrity values ​​lower than or equal to the candidate threshold is used as the non-inactivated false positive rate, and the proportion of inactivated samples with boundary integrity values ​​higher than the candidate threshold is used as the inactivated false positive rate. The denominator of each proportion is the total number of samples in the corresponding category, and the numerator is obtained by counting samples one by one. The two types of false positive rates are combined into a weighted false positive rate, with the weights being parameters. The weight for non-inactivated false positives is 2, and the weight for inactivated false positives is 1. The weight values ​​are determined based on the priority of controlling the risk of missed detection of non-inactivated samples in the inactivation assessment. After scanning, the candidate threshold corresponding to the smallest weighted false positive rate is selected as the preset threshold. When multiple candidate thresholds have the same minimum value, the threshold that makes the non-inactivated false positive rate smaller is selected as the final threshold to further suppress the risk of missed detection of non-inactivated samples. After the threshold is set, a comparison judgment is performed on each particle: when the boundary integrity value is higher than the preset threshold, the preliminary inactivation status is marked as non-inactivated; when the boundary integrity value is lower than or equal to the preset threshold, the preliminary inactivation status is marked as inactivated. The comparison process is performed independently for each particle record, and the judgment result is bound to the particle identifier to form a preliminary result table.

[0091] After the initial inactivation state is established, the calculation and fusion of particle size uniformity distribution proceeds. Particle size uniformity distribution uses all particles within the same field of view or batch as the statistical object. The statistical range is determined as a parameter during system configuration. If statistics are based on field of view, they are grouped by field of view number; if statistics are based on batch, they are grouped by batch number. The grouping field is directly taken from the record field of the morphological feature parameter set, avoiding cross-source splicing. For each group, the equivalent diameter is first extracted from all particle records within that group to form a diameter sample sequence. The equivalent diameter is taken from the output field of step 7. The equivalent diameter is calculated by combining the particle area with the pixel size calibration value; the conversion process has already been completed in step 7, and step 8 directly calls it. After the diameter sample sequence is formed, the average equivalent diameter is calculated. The average equivalent diameter is obtained by summing the sequence item by item and then dividing by the number of particles. Subsequently, the standard deviation of the equivalent diameter is calculated. The standard deviation is calculated by squaring the difference between each equivalent diameter and the average equivalent diameter and summing the squares. The sum of squares is divided by the number of particles to obtain the mean square deviation, and then the square root of the mean square deviation is taken to obtain the standard deviation. To obtain uniformity quantification results, the ratio of standard deviation to average equivalent diameter is calculated, with the numerator being the standard deviation and the denominator being the average equivalent diameter. A smaller ratio indicates a more concentrated size distribution, while a larger ratio indicates a more dispersed size distribution. Simultaneously, the quantile interval is calculated as a supplementary quantification result for dispersion. The quantiles are the 25th and 75th percentiles. The quantiles are obtained by sorting the diameter sample sequence and reading the values ​​by their positions: the 25th percentile is obtained by multiplying the sample size by 0.25 and rounding up; the 75th percentile is obtained by multiplying the sample size by 0.75 and rounding up. The diameter value corresponding to each position is then read. The quantile interval is obtained by subtracting the 25th percentile diameter from the 75th percentile diameter; a larger quantile interval indicates a more dispersed distribution. The uniformity quantification results are fused with the quantile spacing to obtain a particle size uniformity distribution index. The fusion weight is a parameter determined by a calibration sample library. Two indices are calculated batch-by-batch in the calibration sample library, and the discrimination of the fused index between non-inactivated and inactivated batches is calculated for each candidate weight combination. The discrimination is obtained by dividing the difference between the means of the two fused indices by the sum of their standard deviations. The combination with the highest discrimination and the smallest cross-batch fluctuation among the candidate weight combinations is selected as the final weight. Cross-batch fluctuation is determined by statistically analyzing the standard deviations of the fused indices for the same batch in the calibration sample library and taking the upper quantile constraint. The resulting particle size uniformity distribution index is then bound to the corresponding group number to form a group-level uniformity table.

[0092] The final inactivation assessment result is jointly determined by the initial inactivation status and the particle size uniformity distribution index. The fusion process first determines the uniformity threshold, which is used as a parameter determined by the calibration sample library: The uniformity distribution index of both non-inactivated and inactivated batches is summarized in the calibration sample library to form two types of sequences. These sequences are sorted and scanned according to candidate thresholds. The candidate threshold scanning step size is 0.01, determined based on the numerical range of the uniformity distribution index and the batch-to-batch fluctuation range. For each candidate threshold, a batch-level misclassification rate is calculated. The proportion of non-inactivated batches with a uniformity distribution index higher than or equal to the candidate threshold is used as the non-inactivated batch misclassification rate, and the proportion of inactivated batches with a uniformity distribution index lower than the candidate threshold is used as the inactivated batch misclassification rate. The two batch misclassification rates are then combined into a batch-weighted misclassification rate, with a weight of 2 for non-inactivated batches and 1 for inactivated batches. The weight values ​​are determined based on the system's priority in controlling batch-level missed detection risks. The candidate threshold corresponding to the lowest batch-weighted misclassification rate is selected as the uniformity threshold. After the uniformity threshold is determined, the uniformity distribution index of the group to which each particle belongs is read and a fusion decision is performed: when the uniformity distribution index is lower than the uniformity threshold, the particle size distribution is considered to be concentrated, and the final inactivation evaluation result is directly taken as the preliminary inactivation state; when the uniformity distribution index is higher than or equal to the uniformity threshold, the particle size distribution is considered to be discrete, and the consistency correction logic of particles near the threshold is entered.

[0093] Consistency correction first defines a range near a threshold, with the range threshold being a parameter. The range threshold is set to 0.05, and the value of 0.05 is determined based on the upper bound of the measurement fluctuation of boundary integrity values ​​in the calibration sample library. The upper bound of the measurement fluctuation is obtained by repeatedly acquiring data from the same field of view and repeatedly calculating the difference distribution of boundary integrity values ​​for the same particle, and then taking the 95th percentile. For each particle, the absolute value of the difference between its boundary integrity value and the preset threshold is calculated. The absolute value of the difference is obtained by first calculating the difference and then taking the absolute value. When the absolute value of the difference is less than or equal to the range threshold, the particle is judged as a particle near the threshold, triggering a stricter judgment condition. The stricter judgment condition is achieved by increasing the boundary threshold, with the increase amount being a parameter, set to 0.02. The value of 0.02 is determined statistically based on the "optimal threshold drift amount when uniformity dispersion increases" in the calibration sample library. The statistical method is to re-solve the boundary threshold on a subset of highly discrete batches and then subtract it from the full threshold, taking the median of the difference distribution as the increase amount. For particles near the threshold, the initial state is re-determined using the adjusted boundary threshold. If the boundary integrity value is higher than the adjusted threshold, the final state is "not inactivated"; if it is lower than or equal to the adjusted threshold, the final state is "inactivated". For particles not near the threshold, the final state remains unchanged from the initial inactivated state. After correction, the final inactivation assessment result for each particle is output, and the particle identifier, initial state, final state, boundary integrity value, and the uniformity distribution index of its group are linked and output as the result chain of the inactivation assessment.

[0094] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for evaluating virus inactivation based on image recognition and data processing, characterized in that, Includes the following steps: S1. By preprocessing the acquired microscopic images, grayscale conversion and contrast adjustment methods are used to enhance the brightness difference between virus particles and polysaccharide residues in the images, and the first image data after preliminary processing is obtained. S2. For the first image data, apply an edge detection-based algorithm to extract all regions with boundary features in the image, mark the candidate target regions containing virus particles and polysaccharide residues, and determine the candidate region set. S3. Based on the candidate region set, use texture analysis methods to calculate the surface roughness and distribution uniformity features of each region, and generate a texture feature dataset to distinguish between virus particles and polysaccharide residues. S4. If the roughness of a certain region in the texture feature dataset is lower than the preset threshold, it is marked as a suspected polysaccharide residue region; otherwise, it is marked as a suspected virus particle region, thus obtaining the region grouping after classification and labeling. S5. By performing spatial proximity analysis on the grouped regions after classification and labeling, detect whether the suspected polysaccharide residue regions overlap or occlude with other regions, and generate a spatial relationship mapping table. S6. Based on the spatial relationship mapping table, image inpainting technology is used to remove signals from the areas marked as polysaccharide residues, and the areas of suspected virus particles that are obscured are reconstructed to obtain the repaired second image data.

2. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that: S1 includes: By acquiring microscopic images and performing grayscale conversion processing, grayscale image data is obtained. For grayscale image data, a contrast adjustment method is obtained. The contrast adjustment method is implemented by stretching pixel values. Image noise is suppressed from the contrast adjustment method to obtain a noise-suppressed image. In the noise-suppressed image, edge detection is used to sharpen the particle edges, distinguishing between viral particles and polysaccharide residues, and obtaining a particle-distinguished image. For the particle-differentiated image, the particle density is calculated by obtaining pixel statistics, and the brightness difference between the virus particles and polysaccharide residues is magnified to obtain the first image data.

3. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that: S2 includes: The boundary feature regions in the first image data are extracted by the Canny edge detection algorithm. The gradient magnitude and direction of the Sobel operator are calculated for each pixel to obtain the boundary extraction image. For the boundary extraction image, the particle density is obtained by statistically analyzing the number of pixels in the region and then judging the threshold. If the particle density is higher than the preset threshold, the virus boundary is marked; otherwise, the polysaccharide outline is marked to obtain the candidate region. When selecting candidate regions, texture analysis is used to determine the contour matching result by calculating the shape difference obtained from the gray-level co-occurrence matrix; Based on the contour matching results, the region set is extracted, and the final candidate region set is obtained.

4. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that: S3 includes: For the candidate region set, a grayscale value statistical method is used to calculate the range of pixel grayscale variation in each region. The surface texture fluctuation is quantified by the standard deviation of grayscale variation, and the surface roughness value is obtained as a preliminary feature to obtain the region roughness distribution table. Based on the regional roughness distribution table, the pixel distribution pattern of each region is obtained, the distribution uniformity characteristics are calculated, and the uniformity quantification index is determined by comparing the spatial distribution differences of gray values ​​within the region and local variance analysis. For the uniformity quantification index, combined with the regional boundary smoothness assessment, boundary features are extracted from the continuous changes in the regional contour. The degree of boundary continuity is judged by calculating the average value of the contour curvature, and the boundary smoothness level is judged to obtain a comprehensive feature description of the region. By integrating surface roughness values, uniformity of distribution, and boundary smoothness levels through regional comprehensive feature description, a texture feature dataset is constructed to distinguish between virus particles and polysaccharide residues, thus completing feature classification and organization.

5. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that: S4 includes: For the candidate region set, the standard deviation of the pixel grayscale values ​​in each region is obtained. The surface roughness of the region is determined by dividing the square root of the sum of squares of the pixel grayscale values ​​minus the average grayscale value by the number of pixels. Based on the surface roughness, the spatial distribution difference of gray values ​​within the region is calculated, and the uniformity index is obtained by summing the variances between the mean gray values ​​of each sub-block within the region. For the distribution uniformity index, combined with the curvature change of the region contour, the average curvature difference between contour points is calculated to determine the boundary smoothness level and obtain the continuity characteristics of the region boundary. From the continuity features of the region boundary, the consistency intensity of the gray-level gradient direction is extracted, and the texture directionality features are determined by the inverse of the variance of the gradient vector direction.

6. The virus inactivation assessment method based on image recognition and data processing according to claim 5, characterized in that: S4 further includes: If the texture directionality features exceed the preset threshold, the sharpness change of the gray-level gradient within the region is further calculated, and the grain edge sharpness value is obtained by averaging the second derivative of the gradient magnitude. Based on the particle edge sharpness value and the surface roughness, distribution uniformity index, boundary smoothness level, and texture directionality features, a regional comprehensive texture description vector is formed, and a texture feature dataset for distinguishing between virus particles and polysaccharide residues is constructed. For the texture feature dataset, if the surface roughness of a certain region is lower than a preset threshold, it is marked as a suspected polysaccharide residue region; otherwise, it is marked as a suspected virus particle region, thus obtaining the region grouping after classification and labeling.

7. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that: S5 includes: By grouping the regions after classification and labeling, the set of boundary coordinates for each suspected polysaccharide residue region is obtained, and the spatial distribution of the region groups is determined. For spatial distribution, a pixel coordinate comparison method is used to detect the intersection of suspected polysaccharide residue areas with other areas by matching coordinate values ​​point by point, and obtain the overlap relationship index. From the overlap relationship index, the boundary intersection calculation results are extracted, and the existence of occlusion is determined by calculating the intersection pixel ratio, thus obtaining the occlusion relationship link of region grouping; Based on the occlusion relationship links, a relationship matrix is ​​constructed and the distribution pattern is integrated to generate a spatial relationship mapping table by associating the locations of neighboring regions.

8. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that: S6 includes: By using a spatial relationship mapping table, the occlusion relationship links between polysaccharide residual regions and viral particles are obtained, and the boundary intersection locations of the regions are determined. For the boundary intersection locations, image inpainting technology is used to remove signals from the polysaccharide residue areas, resulting in a preliminary cleaned particle outline; From the particle outline, the signal intensity distribution of the occluded area is extracted, and the distribution is adjusted by pixel value comparison to match the features of surrounding virus particles, thus obtaining the corrected boundary data. Based on boundary data, the complete morphology of virus particles is reconstructed, and repair layers are generated by fusing pixel values ​​from neighboring regions. By integrating the restored layers with the original image, the continuity of the reconstructed region is verified, and the restored second image data is obtained.

9. The virus inactivation assessment method based on image recognition and data processing according to claim 1, characterized in that, It also includes S7, which extracts morphological features of viral particles from the second image data, including boundary integrity and shape regularity, to generate a set of morphological feature parameters for inactivation status assessment, specifically including: The particle outline of the virus particles is obtained from the second image data, and the boundary position of the particle outline is determined by signal intensity distribution comparison. For the boundary locations, pixel value extraction is used to adjust the shape contour correction and obtain a preliminary distribution with regular shape. Based on the initial distribution, the boundary integrity correction value of the fused and repaired region is generated to determine the continuity of the particle density distribution; By integrating parameters related to the inactivation state with the evaluation link through continuity, a set of morphological feature parameters is generated.

10. The virus inactivation assessment method based on image recognition and data processing according to claim 9, characterized in that, It also includes S8, where if the boundary integrity of the morphological feature parameter set is higher than a preset threshold, the virus particle is judged to be in an inactivated state; otherwise, it is judged to be inactivated, thus obtaining the final inactivation assessment result, specifically including: Boundary integrity values ​​are obtained from the set of morphological feature parameters, and the initial inactivation status of virus particles is determined by comparing them with a preset threshold. For the initial inactivation state, the particle size uniformity distribution is obtained from the morphological feature parameter set, and the final inactivation assessment result of the virus particles is generated by fusing the particle size uniformity distribution.

Citation Information

Patent Citations

  • Cell membrane nanoparticle as well as preparation method and application thereof

    CN116747201A

  • Ultrasound image lesion describing method and apparatus, computer device, and storage medium

    WO2021129323A1