A pathological section scanning closed-loop focusing and automatic calibration method based on overlapping homologous regions and time delay
Patent Information
- Application Number
- CN202611274425.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]1.配准精度不足:未对重叠区域中的同一组织内容进行亚像素级精确配准,清晰度差异易受组织覆盖量、染色深浅、照明变化及平台拼接位移等非焦距因素干扰,导致调焦方向判断错误;
本方案提出的基于重叠同源与时延前视的病理切片扫描闭环调焦方法,以同源重叠区域反馈生成最清晰Z位置和置信度,并结合系统实时总时延与扫描速度对Z轴到位时的未来焦面进行预测。进一步地,方案集成了自校准机制,在一张切片或一个扫描批次结束后重建理论清晰焦面,利用往返方向反转数据联合辨识设备误差参数,并通过质量门控、安全边界及更新后验证条件对下一批次参数进行更新。其中,批次定义为连续处理的多张病理切片集合,或者针对特定测试切片的多次往返复扫序列。
Smart Images

Figure CN122802768A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital pathological imaging and automated microscopy, and in particular to a closed-loop focusing and automatic calibration method for scanning pathological sections based on overlapping homologous regions and time delay. Background Technology
[0002] The pathology slide scanner is the core equipment of digital pathology imaging. It converts tissue regions on a glass slide into digital slides by acquiring data field by field using an area array camera or strip by strip using a line array camera. However, high-magnification objectives have extremely small depth of field (usually only a few micrometers). Factors such as slide warping, differences in coverslip thickness, stage unevenness, nominal focal plane fitting error, platform positioning deviation, transmission clearance, Z-axis actuator response lag, and thermal drift of the optomechanical system can all cause the actual scanning position to deviate from the clearest focal plane. This can lead to local blurring, fluctuations in clarity along the positive and negative stripes, and stitching marks, seriously affecting the quality of digital slides and diagnostic reliability.
[0003] Existing pathological slide scanning focusing techniques mainly fall into two categories: one involves selecting several focus points to fit a nominal focal plane before the actual scan and completing the entire scan based on factory-calibrated mechanical compensation parameters; the other is a real-time focusing scheme, which corrects the Z-axis by comparing the sharpness differences of overlapping areas in adjacent images. However, the above schemes have significant shortcomings:
[0004] 1. Insufficient registration accuracy: The same tissue content in the overlapping area is not accurately registered at the subpixel level. The difference in sharpness is easily affected by non-focal factors such as tissue coverage, staining depth, illumination changes and platform splicing displacement, which leads to incorrect judgment of the focusing direction. 2. Focal length observation cannot be quantitative: Judging the focusing direction solely based on the sharpness of two images or a weighted average cannot obtain the sharpest Z position with length dimensions and its reliability, making it difficult to achieve precise focusing; 3. Lack of time delay compensation: The dynamic total time delay caused by exposure time, camera readout time, image transmission time, algorithm calculation time, control communication time and Z-axis actuator response is not explicitly considered. In high-speed scanning scenarios, the phase lag may cause focusing failure. 4. Poor robustness: Low-texture areas, blank glass, tissue folds, bubbles, stains, and areas of registration failure may still enter the closed loop, triggering reverse correction, over-correction, or continuous oscillation, thus reducing scan quality; 5. Inaccurate error identification: After scanning, only a single empirical compensation amount is formed, which cannot use the directional changes of the reciprocating scan to separate different types of error sources such as static zero bias of Z-axis, XY positioning deviation, mechanical hysteresis, dynamic following hysteresis and steering transient, resulting in inaccurate compensation; 6. Reliance on manual calibration: Fixed compensation parameters are difficult to adapt to differences in manufacturing and assembly, temperature changes, long-term wear and tear and component aging. Manual recalibration is still required periodically, which increases maintenance costs and system instability.
[0005] Therefore, there is an urgent need for a dual closed-loop focusing method that does not require the addition of a dedicated focusing sensor, can form a quantitative focal length observation using scanned images, align delayed observations to the future spatial position at the execution time, and can automatically identify equipment errors and safely update compensation parameters from the round-trip scan data, in order to solve the above-mentioned defects of the existing technology. Summary of the Invention
[0006] The purpose of this invention is to provide a closed-loop focusing and self-calibration method for pathological slide scanning based on overlapping homology and time-delayed forward vision. During continuous scanning of pathological slides, the method can utilize homology and overlapping regions in adjacent local images or adjacent strips to form focal length feedback observation. Combined with confidence-weighted state estimation, image processing and total time-delay forward vision compensation of the actuator, and joint identification of round-trip scanning errors, the method can achieve real-time focusing during the scanning process and cross-batch self-calibration of equipment parameters.
[0007] To achieve the above objectives, this technical solution provides a closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward looking, including the following steps: S1: Acquire multiple local images corresponding to adjacent scanning areas during the pathological slide scanning process; S1: Acquire multiple local images corresponding to adjacent scanning areas during the pathological slide scanning process; S2: Based on the spatial overlap relationship between adjacent local images, determine the homologous overlapping regions corresponding to the same tissue region; S3: Obtain focal length sample sets at different Z positions in the overlapping region of the same origin, combine the focal length sample sets to determine the clearest focal length position and the corresponding confidence level corresponding to the current scanning position, and execute step S4 when the confidence level is greater than the update threshold. S4: Obtain the system delay between image acquisition and the completion of the focusing actuator response, determine the spatial forward-looking position based on the scanning speed, and map the current clearest focal length position to the future scanning position based on the spatial forward-looking distance; S5: Using a state estimator combined with the clearest focal length position and confidence level, predict the predicted focal plane position corresponding to the future scanning position, and control the focusing actuator to adjust to the predicted focal plane position.
[0008] Compared with existing technologies, this technical solution has the following characteristics and beneficial effects: This proposed closed-loop focusing method for pathological slide scanning based on overlapping homologous regions and time-delayed forward scanning generates the clearest Z-position and confidence level using feedback from homologous overlapping regions. It then predicts the future focal plane when the Z-axis is in position by combining the system's real-time total latency and scanning speed. Furthermore, the method integrates a self-calibration mechanism to reconstruct the theoretically clear focal plane after a slide or a scanning batch is completed. It uses reversible data from the forward and reverse directions to jointly identify equipment error parameters and updates the parameters for the next batch through quality gating, safety boundaries, and updated verification conditions. Here, a batch is defined as a set of multiple pathological slides processed consecutively, or a sequence of multiple forward and reverse scans for a specific test slide. Attached Figure Description
[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram for obtaining the overlapping regions of the same origin.
[0010] Figure 2 This is a schematic diagram for obtaining system latency.
[0011] Figure 3 This is a schematic diagram of the reconstructed theoretically clear focal plane.
[0012] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0013] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0014] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0015] Example 1 like Figure 1As shown, this scheme provides a closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision, including the following steps: S1: Acquire multiple local images corresponding to adjacent scanning areas during the pathological section scanning process; S2: Based on the spatial overlap relationship between adjacent local images, determine the homologous overlapping regions corresponding to the same tissue region; S3: Obtain focal length sample sets at different Z positions in the same overlapping region, determine the clearest focal length position and corresponding confidence level corresponding to the current scanning position based on the focal length sample sets, and execute step S4 when the confidence level is greater than the update threshold. S4: Obtain the system delay between image acquisition and the completion of the response of the focusing actuator, determine the spatial forward-looking position by combining the scanning speed, and map the current clearest focal length position to the future scanning position based on the spatial forward-looking distance; S5: Using a state estimator combined with the clearest focal length position and confidence level, predict the predicted focal plane position corresponding to the future scanning position, and control the focusing actuator to adjust to the predicted focal plane position.
[0016] The pathological slide scanning closed-loop focusing method provided in this solution, based on overlapping homologous regions and time-delayed forward viewing, uses homologous overlapping regions as feedback information sources to generate the clearest focal length position and confidence level. It also predicts the future scanning position when the Z-axis is in place based on the real-time total system delay and scanning speed, thereby achieving closed-loop focusing. This method is applicable to pathological slide scanners with scanning platforms, microscopic imaging optical paths, area array or line array cameras, Z-axis focusing actuators, controllers, and processors. The Z-axis focusing actuator can be implemented through objective lens lifting, camera lifting, stage lifting, liquid lenses, or adjustable focusing lenses.
[0017] Before performing step S1, the method of the present invention further includes a system initialization phase for establishing a scanning reference, measuring system delay parameters, and configuring control constraints.
[0018] Specifically, the process begins by acquiring panoramic preview images of pathological sections to identify the tissue region and determine the scanning boundary, and then planning a round-trip scanning path that includes a predetermined overlapping area. Subsequently, several initial focus points are selected within the tissue region, and the initial nominal focal plane F0(x,y) is fitted by measuring the optimal focal plane position of these points, serving as a spatial reference for subsequent online focusing.
[0019] Simultaneously, the controller calibrates the time parameters of the entire process from image acquisition to the completion of the actuator's action. This is achieved by accumulating camera exposure time, image readout time, data transmission time, algorithm calculation time, control communication time, and the response time of the focusing actuator, thus reducing the subsequent calculation of system latency.
[0020] In addition, the system initializes various constraints and model parameters required for subsequent closed-loop control, including setting the focal length response curve a priori for two-point estimation, configuring the covariance matrix of the state estimator, defining the confidence threshold for screening valid observations, and setting the maximum single correction, velocity and acceleration upper limits, allowable focal aberration, and low-confidence backoff rules based on the Z-axis mechanical characteristics. This initialization process aims to provide accurate time delay compensation parameters, reliable spatial prediction benchmarks, and safe and stable control constraints for subsequent real-time closed-loop focusing.
[0021] Specifically, regarding step S1: This solution first acquires the local images and corresponding scanning position information generated by the pathological slide scanning device during the continuous scanning of the pathological slide to be scanned. As mentioned above, the pathological slide scanning device is a pathological slide scanner with a scanning platform, a microscopic imaging optical path, an area array or line array camera, a Z-axis focusing actuator, a controller, and a processor. During the scanning process, it can move according to a preset scanning path to acquire local images of different areas of the pathological slide.
[0022] Because complete pathological sections are typically large, a certain degree of overlap is usually established between adjacent fields of view during scanning to improve scan integrity and image stitching accuracy. Therefore, the acquired local image includes the image of the current scanned field of view as well as images of adjacent historical scanned fields of view. In other words, the local image obtained using this method includes the image of the current scanned area and images of adjacent historical scanned areas.
[0023] Meanwhile, the scanning position information corresponding to each local image is obtained through the position detection module of the scanning platform. The scanning position information includes at least the XY direction scanning coordinates, scanning path direction, scanning speed, image acquisition timestamp, and the current position status of the focusing actuator. This information is used to determine the spatial correspondence between adjacent local images and to provide a position reference for time delay forward look compensation.
[0024] Regarding step S2: During the scanning of pathological sections, the microscopic scanning system continuously acquires multiple local images according to a preset scanning path. Since there is usually a certain proportion of overlap between adjacent scanning fields, local images acquired at different times may contain image regions corresponding to the same tissue structure. Therefore, step S2 identifies image regions with spatial overlap based on the spatial positional relationship between adjacent local images to obtain homologous overlapping regions corresponding to the same tissue region.
[0025] like Figure 1 As shown, in some embodiments, determining the homologous overlapping regions corresponding to the same tissue region includes the following steps: determining candidate overlapping regions based on the scanning platform's movement trajectory and the scanning position information of adjacent local images; performing subpixel-level image registration on the candidate overlapping regions using at least one of phase correlation matching, normalized cross-correlation matching, feature point matching, or optical flow matching; and determining the regions that have been registered and correspond to the same tissue structure as homologous overlapping regions.
[0026] That is, if the current local image has spatial overlap with one or more historical local images, the initial position of the overlapping area is first determined based on the nominal displacement of the platform as a candidate overlapping area; then, phase correlation, normalized cross-correlation, feature point matching, optical flow or a combination thereof are used for sub-pixel registration, and the area that has been registered and corresponds to the same tissue structure is determined as the homologous overlapping area. Subsequently, the sharpness is only compared within the homologous overlapping area.
[0027] Because of potential issues such as platform positioning errors, changes in scanning path, line-by-line scanning, changes in forward and backward scanning directions, and differences in image acquisition time during the scanning process, the current local image may not be able to establish a reliable correspondence with the theoretically adjacent image. Therefore, this solution first needs to select a suitable reference image from historical local images based on the scanning spatial relationship.
[0028] In the step of "determining candidate overlapping regions based on the scanning platform's movement trajectory and the scanning position information of adjacent local images", the previous local image adjacent to the scanning platform's movement trajectory is selected as the reference image. If the previous local image is not qualified, under the constraint of spatial overlap, a historical candidate image is selected as the reference image from the historical candidate image set based on the overlap ratio, confidence level, registration residual, spatial distance, and time interval. The candidate overlapping region is determined based on the reference image and the current local image.
[0029] In other words, during continuous scanning, the current local image is preferentially matched with a historical local image (as a reference image) that is adjacent in the scanning sequence and has a predetermined spatial overlap area. In other words, for the same scan line, the reference image is preferably the previous local image obtained along the current scanning direction; for scan line breaks or back-and-forth scans, the reference image is the local image in the adjacent scan line that is closest in spatial position to the current local image.
[0030] If the actual overlap ratio, image sharpness, texture richness, registration quality, or observation confidence of the local image adjacent to the current local image does not meet the preset conditions, the system needs to reselect a reference image from the historical candidate image set. The historical candidate image set consists of a preset number of historical local images obtained within a preset time range, and must at least meet the following conditions: they originate from the same pathological slide as the current local image, use the same objective magnification and imaging parameters, have the same or compatible parameter versions, and are spatially overlapping with the current local image based on the scanning platform position or image content.
[0031] More specifically, for historical local images in the historical candidate image set, the reference priority is determined based on the spatial overlap ratio, observation confidence, spatial location distance, time interval, and subpixel registration residual. The historical local image with the highest reference priority and that meets the minimum quality condition is selected as the main reference image. Among them, historical local images with a larger overlap ratio, higher confidence, closer spatial location, shorter time interval, and smaller registration residual are preferentially selected as the main reference images.
[0032] In one implementation, the system performs sub-pixel registration and focus observation using only the main reference image and the current local image. In another implementation, when multiple historical local images in a set of historical candidate images all meet the quality requirements, the system selects a group of historical local images with higher reference priority as reference images. Registration and focus observation results are obtained based on each reference image, and then weighted and fused according to the observation confidence of each reference image. When the difference between the observation results obtained from different reference images exceeds a preset consistency threshold, the system retains only the observation result with the highest reference priority, or rejects the current focus observation.
[0033] In the step of "using at least one of phase correlation matching, normalized cross-correlation matching, feature point matching, or optical flow matching to perform sub-pixel level image registration on candidate overlapping regions; and determining the regions that have been registered and correspond to the same tissue structure as the homologous overlapping regions", the candidate overlapping regions are used as the search range. The phase correlation spectrum and normalized cross-correlation response are extracted from the current local image and the reference image, respectively, or feature points (such as corner points / ORB / SIFT-type features) are extracted and matched to obtain the registration result. The sub-pixel level displacement (Δx, Δy) and optional local deformation are obtained from the registration result. After resampling and aligning the current local image and the reference image according to the sub-pixel level displacement, the set of pixels that overlap and whose registration residual / correlation coefficient meets the threshold is taken as the homologous overlapping region.
[0034] In some embodiments, multiple matching methods, including phase correlation matching, normalized cross-correlation matching, feature point matching, or optical flow matching, can be used individually or in combination.
[0035] After obtaining the homologous overlapping region, in order to avoid the impact of local tissue differences on focal length judgment, this scheme further divides the homologous overlapping region into multiple homologous sub-regions. Specifically, the homologous overlapping region is divided into multiple candidate homologous sub-regions according to a regular grid (such as M×N rectangular blocks, or fixed side length sliding windows). Alternatively, candidate homologous sub-regions can be obtained by further dividing according to the connected tissue mask. Sub-regions with excessively low tissue coverage, excessively high saturation ratio, excessively low brightness variance or effective gradient, insufficient registration correlation coefficient, containing bubbles / folds / stains, or with obvious motion blur are excluded.
[0036] Regarding step S3: In the step of "obtaining a focal length sample set at different Z positions in the overlapping region", focal length samples corresponding to different Z positions are obtained through natural sampling and active supplemental sampling to construct a focal length sample set containing different Z positions and corresponding sharpness values, denoted as (Z m ,S m ), where Z m For the m-th Z position, S m This corresponds to the resolution value.
[0037] More specifically, by using the natural sampling mode to utilize focal length samples at different Z positions of corresponding overlapping regions generated during continuous scanning, and by triggering the active supplementary sampling mode to perform limited fine-tuning when there are insufficient focal length samples, focal length samples corresponding to different Z positions are obtained, thereby constructing a focal length sample set containing Z positions and corresponding sharpness values.
[0038] In the step of "determining the sharpest focal length position and corresponding confidence level corresponding to the current scanning position based on the focal length sample set", when the number of focal length samples in the focal length sample set is greater than 3, a robust model with unimodal and negative curvature constraints is used to fit the focal length samples, and the least squares method is constrained to solve for the sharpest focal length position; when the number of focal length samples in the focal length sample set is 2, the sharpest focal length position is determined by a pre-calibrated curvature prior or learned from historical high-confidence samples, where historical high-confidence samples are samples obtained using the same objective lens, camera, exposure conditions and optional tissue texture type as the current pathological slide scanning process.
[0039] In some embodiments, the robust model with unimodal and negative curvature constraints is a robust quadratic model, a logarithmic quadratic model, a generalized Gaussian model, or a piecewise asymmetric model with unimodal and negative curvature constraints.
[0040] In this embodiment of the solution, a logarithmic quadratic model is used, and the method for obtaining the sharpest focal length position is as follows:
[0041] in This is the intercept term related to peak sharpness (corresponding to the logarithmic sharpness benchmark near the sharpest position).
[0042] Furthermore, the clearest position z is solved using constrained least squares with Huber loss or Tukey loss. The curvature κ and fitting residuals are used to limit the sharpest focal length position to the sampling Z range and the preset safe extrapolation interval.
[0043] The formula for obtaining the sharpest focal length position when there are only two focal length samples is as follows:
[0044] in , and For two focal length samples , and These are the Z positions of the two focal length samples. The terms should be positive and stable, avoiding logarithmic variables that are 0 or too small. The first test result is obtained from historical high-confidence samples or factory calibration under the same objective lens / camera / exposure conditions.
[0045] This method uses a dual-point curvature a priori to convert the sharpness difference into a focal length shift in the dimension of length; when | - When the value is too small, the curvature is mismatched, or the estimate is out of bounds, it degenerates into a state prediction or triggers supplementary sampling.
[0046] In addition, in the step of "determining the sharpest focal length position and corresponding confidence level corresponding to the current scanning position based on the focal length sample set", a confidence level is generated synchronously for each sharpest focal length position. The confidence level is composed of tissue coverage, texture effectiveness, registration reliability, Z position span sufficiency, focal length response fitting quality, and consistency of multiple overlapping regions / multi-features.
[0047] In some embodiments, the formula for calculating confidence levels using a product, weighted product, or probability model is as follows: , 0≤C≤1 Where q cov For organizational coverage, q tex For texture validity, q reg For registration reliability, q span For the sufficiency of the span at position Z, q fit For the focal length response fitting quality, q cons For multiple overlapping regions / multi-feature consistency indices, a to f can be fixed or calibrated using validation data.
[0048] Specifically, the method for obtaining the focal length sample set is as follows: During actual scanning, the system prioritizes using the natural sampling mode to acquire focal length samples at different Z positions. In natural sampling mode, images at different Z positions generated during continuous scanning are used. These different Z positions are naturally formed by changes in tissue surface height between adjacent fields of view, local warping of the slide, previous focusing actions, Z-axis following control, and scanning platform motion errors. The system records the actual Z-axis position or Z-axis feedback position at the time of acquisition of each local image, and maps the image sharpness values obtained at different acquisition times to the same tissue region through subpixel registration of the same overlapping region, thereby forming focal length samples corresponding to different Z positions.
[0049] It should be noted that the system does not consider random mechanical jitter as a necessary condition for obtaining samples at different Z positions; positional changes caused by mechanical jitter are only used as candidate samples when their actual Z position is measurable, the image quality meets the requirements, and the registration results are reliable.
[0050] In addition, the system maintains historical focus estimation samples within a preset sliding window and determines whether the existing focus samples meet the conditions for the sharpest Z position estimation based on the number of valid samples, the Z-axis span between samples, the time interval between samples, the registration quality of the homologous region, tissue texture information, and observation confidence. Specifically, for the estimation method using a preset focus response curve a priori, at least two samples with effective Z position differences are required; for the estimation method using local sharpness curve fitting, at least three valid samples with different Z positions are required.
[0051] When the number of valid samples within the sliding window is insufficient, the Z-axis span between samples is below a preset threshold, or the change in sharpness is insufficient to support a reliable estimate, the system enters an active supplemental sampling mode. In active supplemental sampling mode, the system controls the Z-axis to perform at least one constrained fine-tuning relative to the current predicted focal position, and acquires supplementary images after the fine-tuning. Fine-tuning can be positive, negative, or bidirectional around the current predicted focal position, and the fine-tuning distance, speed, acceleration, and cumulative travel are all limited by preset safety boundaries. Active supplemental sampling is preferably performed when scanning overlapping areas, during periods of reduced scanning speed, or when the confidence level of the current focal observation is insufficient.
[0052] Once the supplementary samples meet the conditions for the sharpest Z-position estimation, the system stops active fine-tuning and performs the estimation calculation of the sharpest Z-position based on the Z-position, sharpness value, and observation confidence of each sample. If no valid samples that meet the conditions can be obtained after active supplementary sampling, the system rejects the current focal observation, maintains the previous valid focal estimate, or makes a prediction based on the theoretical sharp focal plane, instead of forcibly updating the Z-axis control based on low-quality samples.
[0053] The sharpness value of the focal length sample is calculated as follows: For each co-originating sub-region of the co-originating overlapping region at each Z position, different sharpness evaluation features of each co-originating sub-region are calculated. After normalization of the sharpness evaluation features, the sharpness values of the focal length samples at the current Z position are obtained by weighting. The sharpness evaluation features include at least one of spatial domain sharpness features, frequency domain sharpness features, and imaging structure features.
[0054] Furthermore, the sharpness evaluation features include Brenner gradient, Tenanglad gradient, Laplace energy, gray-level difference, discrete cosine transform high-frequency energy, wavelet high-frequency energy, local contrast, and point spread function width.
[0055] Furthermore, to reduce the dimensional differences caused by different tissue contents and staining intensities, the sharpness evaluation features are normalized using the following formula:
[0056] Where S , m Let be the original value of the r-th sharpness evaluation feature at the m-th Z-position, MAD be the median absolute deviation, and ε be a positive stable term. The median represents the set of values for the r-th sharpness feature at each Z-position focal length sample corresponding to the current homogeneous region. The median. This represents the median absolute deviation.
[0057] The fusion weights of different sharpness evaluation features are adaptively determined based on their repeatability, unimodality, fitting residuals, and multi-feature consistency within the current homogeneous sub-region. The formula for calculating the sharpness value is as follows:
[0058]
[0059] Where R Let g(·) represent the reliability of the r-th feature, and g(·) be a monotonic function that maps the normalized clarity evaluation features to positive values. It is the adaptive fusion weight of the r-th sharpness feature. It is the sum of the weights of each feature. It is the sharpness value after fusion at the m-th Z position.
[0060] Furthermore, this scheme performs segmented control based on the calculated confidence level. Specifically, when the confidence level is less than the update threshold, the observation is rejected and only state prediction is applied, meaning the system completely discards the sharpest focal length position; when the confidence level is greater than the update threshold, the closed-loop gain of the subsequent steps is executed.
[0061] Regarding step S4: In the step of "acquiring the system delay between image acquisition and the completion of the focusing actuator response", the total system delay is obtained by summing the exposure time, camera readout time, image transmission time, focal length calculation time, control communication time, and Z-axis execution response time.
[0062] like Figure 2 As shown, in the step of "determining the spatial forward-looking position based on the scanning speed and mapping the current sharpest focal length position to the future scanning position based on the spatial forward-looking distance", the spatial forward-looking position is determined by combining the scanning speed, and the current sharpest focal length position is updated with the spatial forward-looking position to obtain the future scanning position.
[0063] The formula for calculating the total system delay is as follows: Δt i = t exp + t read + t trans + t calc + t comm + t act Where t exp For exposure time, t read Read the time from the camera, t trans For image transmission time, t calc For focal length calculation time, t comm To control communication time, t act To adjust the response time of the focusing actuator.
[0064] The formula for calculating the spatial forward position is as follows: L i = |v s |·Δt i Where Δt i v is the total system delay. s For scanning speed , L i This is the forward-looking position in space.
[0065] The formula for updating the current sharpest focal length position to obtain the future scan position using the spatial forward-looking position is as follows: S future =S i +L i Where S i+1 L is the current point of sharpest focus. i For the forward-looking position in space, S future For future scanning locations.
[0066] Regarding step S5: In the step of "using a state estimator combined with the clearest focal length position and confidence level to predict the predicted focal plane position corresponding to the future scanning position", a focal plane state vector is established based on the clearest focal length position. The state estimator is used to update the focal plane state vector over time, and the observation is updated by combining the observation values after spatial forward-looking position mapping, so as to obtain the predicted focal plane position corresponding to the predicted future scanning position. The observation noise variance is dynamically adjusted according to the confidence level. The higher the confidence level, the greater the weight of the observation value in the state update.
[0067] In some embodiments, the focal plane state vector is represented as: x=[z ,g,h]
[0068] Where z The point at which the focal length is sharpest is given, g is the first-order slope of the focal plane along the path, and h is the rate of change of the slope or the second-order curvature.
[0069] In some embodiments, the formula for observation updates is as follows: (s+L) = z (s) + g(s)·L + 0.5·h(s)·L² Where s represents the coordinates of the current scan path, and L represents the spatial forward look distance. The value represents the focal plane height after state estimation, i.e., the predicted focal plane position; g represents the first-order slope along the path, h represents the second-order curvature (or rate of change of slope), and z represents the second-order curvature. The sharpest focal length position is the focal plane state vector.
[0070] In some embodiments, the state estimator may employ Kalman filtering, α-β filtering, extended / unscented Kalman filtering, recursive least squares, robust regression, model predictive control, or sliding window optimization.
[0071] In some embodiments, the observation noise variance is negatively correlated with the confidence level. The higher the confidence level, the greater the observation update weight. When there are sudden changes in the local focal plane and the innovation residuals continuously exceed the limit, the process noise is increased to improve the following ability. When the focal plane is stable, the process noise is reduced to reduce control jitter.
[0072] Correspondingly, the Z-axis correction for the state estimator is expressed as follows:
[0073] G(C) is a gain function that monotonically increases with confidence; clip is used to limit the magnitude of a single correction, where z obs The point at which the image is currently sharpest is z. pred The predicted value of the state. This is the maximum limit for the Z-axis focusing correction.
[0074] In the step of "controlling the focusing actuator to adjust to the focal plane position", the predicted focal plane position is used as the input of the error compensation model. By superimposing the identified static bias, direction-related hysteresis, dynamic correction amount and feedback correction, a control command with systematic error compensation is generated. Based on the control command, the focusing actuator is driven to adjust to the predicted focal plane position.
[0075] In some embodiments, control commands are obtained in the following ways:
[0076] Where z pred To predict the focal plane position, pred It predicts the rate of change of the focal plane over time, b z It is a static bias, h z It is direction-dependent hysteresis, where d is the sign of the scan direction, and u fb For feedback correction of the recent high-confidence focal length residual, τ is the equivalent dynamic time constant. The specific sign depends on the equipment coordinate system and the definition of the residual, and is uniformly calibrated during implementation.
[0077] In some embodiments, the control commands satisfy at least one or more of the following constraints: the amount of a single correction does not exceed the preset ratio of the objective depth of field or the upper limit allowed by the device; the Z-axis speed, acceleration, and jerk when necessary for adjacent commands do not exceed the capability of the actuator; a focal dead zone is set, and the current command is maintained when the focal difference falls into the dead zone to avoid high-frequency reciprocating adjustment; when the prediction covariance or residual is too large, the command returns to the nominal focal plane and the XY speed is reduced, the overlapping area is expanded, a local micro-focal stack is acquired, or a marker is rescanned; when the Z-axis travel boundary is reached, the correction in the same direction is stopped and a device abnormality marker is output.
[0078] The compensation for the tracking error of the actuator is independent of the focal plane residual compensation process. A reverse compensation amount is superimposed before the final control command output: Final control command = Focal plane position command after error compensation - e act This ensures that the actual position of the focusing actuator is consistent with the position of the target focal plane.
[0079] As described above, the pathological slide scanning closed-loop focusing method based on overlapping homology and time-delayed forward looking, provided in this solution, eliminates the need for a dedicated focusing sensor. Instead, it directly utilizes image information acquired during the scanning process to construct a focus feedback closed loop. To achieve accurate focus feedback, sub-pixel-level homology registration ensures image alignment in the overlapping homology region. This is combined with content normalization to eliminate the influence of tissue differences, and a priori knowledge of the focus response curve is introduced. This effectively converts a limited number of sharpness observations into the quantitative sharpest Z-position corresponding to the current scanning position. To improve the robustness of the system, a comprehensive confidence assessment mechanism based on multiple factors such as tissue coverage, texture effectiveness, and registration reliability is constructed. Low-confidence abnormal region observations are gated and rejected or downweighted, effectively suppressing error correction. The propagation of commands to subsequent scanning fields of view avoids systemic deviations caused by local anomalies. Addressing latency issues in high-speed scanning scenarios, the entire link latency from image acquisition to the focusing actuator response is measured and accumulated in real time. Combined with the current scanning speed, the spatial forward offset is calculated, mapping the currently observed sharpest focal length position to the future scanning position. This significantly reduces phase lag caused by high-speed scanning and computational load jitter, ensuring the timeliness of focusing commands. At the control strategy level, a state estimator is used to predict focal plane trends. Combined with single-correction limiting, Z-axis speed / acceleration limiting, focal difference dead zone setting, and a backoff strategy under low confidence, a dynamic balance is achieved between high resolution, scanning throughput, and control system stability.
[0080] Example 2 Based on Embodiment 1, this solution further provides a closed-loop self-calibration method for pathological slide scanning based on overlapping homology and time-delayed forward looking, which further includes the following steps on the basis of Embodiment 1: S6: After completing a pathological slide scan, the theoretically clear focal plane is reconstructed based on multiple high-confidence focal length observations, and errors are identified based on the focal length residuals corresponding to different scanning directions during the round-trip scanning process to obtain equipment error compensation parameters; the focal length control parameters in subsequent pathological slide scans are updated based on the equipment error compensation parameters.
[0081] In the step of "reconstructing a theoretically clear focal plane based on multiple high-confidence focal length observations", after the entire pathological slide or a complete scanning batch is completed, high-confidence observation points with high-confidence focal length observations are selected. These observations are converted into physical coordinate points as the data basis for reconstructing the theoretically clear focal plane. Then, robust fitting methods, including thin-plate splines with smoothing regularization terms, B-spline surfaces, local polynomials, or Gaussian processes, are used to fit the high-confidence observation points to generate the theoretically clear focal plane. The fitting weights are determined by the confidence of the high-confidence observation points, and robust losses (such as Huber or Tukey loss) are used to suppress the influence of abnormal samples such as tissue folding, contamination, and registration failure to ensure the robustness of the reconstructed focal plane.
[0082] This scheme reconstructs a theoretically sharp focal plane using high-confidence focal length observations. This represents the actual optimal focal plane derived from the scanned image, making it more accurate than the nominal focal plane before scanning. The model provides not only the focal plane height but also the focal plane gradient. This gradient information can be used to convert XY positioning bias and dynamic response into focal aberration in the Z direction, providing input for subsequent error models.
[0083] In the step of “error identification based on focal length residuals corresponding to different scanning directions during the round-trip scanning process”, the focal length residual is the difference between the actual or estimated Z position of the i-th local image and the reconstructed theoretical sharp focal plane.
[0084] In some embodiments, the average residual is defined as the actual sharpest Z-position minus the theoretical sharpest focal plane, as shown in the following formula: r z =z best -z th Where z best The actual sharpest Z position (the sharpest focal length position obtained from S3), z th The theoretically clear focal plane (F(x,y) reconstructed from multiple high-confidence observations in S6; the theoretical / nominal focal plane locked in the previous batch can also be used as a reference during the online phase).
[0085] Generally, when the average residual is greater than 0, it means that the actual sharpest Z position is physically above the theoretical sharp focal plane; when the average residual is less than 0, it means that the actual sharpest Z position is physically below the theoretical sharp focal plane.
[0086] The Z-axis focal plane residual can be decomposed into: r z = b z + d·h z + ε Among them, b z h represents the static Z-axis bias independent of the scanning direction. z This represents the round-trip scan difference term related to the scan direction, and ε represents the unmodeled error.
[0087] If the average residuals of forward scan and reverse scan are respectively and ,but:
[0088]
[0089] When the system also needs to compensate for the command tracking error of the Z-axis actuator, the execution error e is defined as the difference between the actuator feedback position and the command position. act =z fb -z cmd The Z-axis command is compensated in reverse based on the execution error. The focal plane residual and the actuator tracking error are defined and processed separately, and the two are not mixed into the same error term.
[0090] When the original Z-coordinate direction of the device is inconsistent with the unified physical coordinate direction, the system unifies them through device coordinate transformation parameters.
[0091] Assume the original Z-coordinate of the device is q z Then, the unified physical coordinates can be expressed as:
[0092] Where, k z q is a positive coordinate scaling factor. z0 Let s be the origin of the device coordinate system. z s is the Z-axis direction transformation coefficient. When the original coordinates of the device increase to correspond to the physical direction, s... z =1; when the original coordinates of the device increase corresponding to the physical downward direction, s z =-1.
[0093] Residual identification, parameter updating, and safety boundary judgment are all performed in a unified physical coordinate system. When the equipment is replaced, only the coordinate transformation parameters are adjusted, without changing the symbol definition of the error identification formula.
[0094]
[0095] Where, r i Let b represent the focal length residual at point i.z Indicates static zero bias on the Z-axis, F x , and F y Let δx and δy represent the gradient of the theoretically sharp focal plane in the x and y directions, respectively, and let d represent the XY positioning deviation. i Indicates the scanning direction symbol, h z The directional correlation is represented by the equivalent hysteresis, τ represents the equivalent dynamic time constant, and v i Indicates the scanning speed, ( F / s) i a represents the derivative of the focal plane along the scanning path direction. i The transient characteristics of steering / acceleration / deceleration are represented by β, which represents the transient response coefficient, and ε. i This indicates the error that was not modeled.
[0096] Furthermore, by decomposing the focal length residuals of forward and reverse scanning, components independent of the scanning direction and components related to the scanning direction are separated. The components independent of the scanning direction include static zero bias and positioning mapping error, while the components related to the scanning direction include hysteresis, velocity-dependent dynamic following error, and commutation transient.
[0097] That is, for forward and reverse scan lines with similar spatial positions, the static zero bias and the common trend of the local focal plane do not change with the scan direction, while the directional hysteresis and some dynamic errors change with the direction sign. Therefore, the two lines can be mapped to a unified physical coordinate system and the common low-frequency focal plane trend can be removed, as follows: r common = (r forward + r reverse ) / 2; r direction = (r forward r reverse ) / 2 Where r common The component that is independent of the scanning direction; r direction Components related to the scanning direction.
[0098] Furthermore, a weighted estimation method with parameterized boundaries, historical parameter regularization terms, and robust loss is adopted. All high-confidence residuals (focal length residuals satisfying confidence gating (high confidence), focal plane gradients, scanning directions, velocities, and steering features are combined into a design matrix. The error parameter vector is then solved using an optimization algorithm (such as the least squares method). The formula for solving the error parameter vector is as follows:
[0099] where θ=[bz,δx,δy,hz,τ,β] ρ can be either Huber or Tukey loss. τ ≥ 0 can be constrained, and the physical ranges for each bias, hysteresis, and transient parameter can be set, where θ represents [b z ,δx,δy, h z ,τ,β] X i Let C represent the row vector of the i-th sample (composed of focal plane gradient, direction, velocity, turning features, etc.). i Let ρ(·) represent the confidence weight of the i-th sample, ρ(·) represent the robust loss such as Huber / Tukey, λ represent the strength of the historical parameter regularization, and θ represent the weight of the confidence weight of the i-th sample. prev This indicates the previous valid parameter version.
[0100] To ensure identifiability, priority is given to data with a certain slope variation on the focal plane, balanced samples in both directions, and rich velocity or acceleration conditions. When the slice is too flat or the condition number of the design matrix is too large, only the parameters that can be stably identified are updated, while the other parameters are kept at their historical values.
[0101] In some embodiments, the equipment error compensation parameters include one or more of the following: Z-axis static zero bias parameter, XY direction positioning deviation parameter, direction-related hysteresis parameter, dynamic time constant parameter, and steering transient response parameter. The static zero bias, direction hysteresis, dynamic time constant, and steering transient parameter in the equipment error compensation parameters can be used for Z-axis control of subsequent views or the next slice; the XY positioning deviation can be used for platform coordinate mapping or converted to Z-compensation through focal plane slope. The mean difference between the forward and reverse residuals after compensation should approach zero, the correlation of the residual curves should be improved, and strip blurring and splicing seam anomalies should be reduced.
[0102] In some embodiments, the device error compensation parameters are updated using a bounded update method: the current parameter version is updated only when the number of high-confidence focal length observations, the quality of fitting the theoretically sharp focal plane, the consistency of forward and reverse residuals, and the degree of parameter identifiability meet preset conditions; the updated parameters are verified by a reserved region; when the verification results do not meet the requirements, the system reverts to the previous valid parameter version.
[0103] In other words, this scheme uses a complete slice or a scanning batch as the unit for updating long-term parameters. Unconstrained rapid updates of long-term parameters within a single slice are not allowed. The update formula is as follows: Only when the effective tissue coverage, focal length fitting quality, consistency of forward and reverse residuals, parameter identifiability, and abnormal slice determination all meet the conditions:
[0104] Where θ k / θ k+1 This indicates the error compensation parameters for the new / rear equipment. kλ represents the parameter estimate obtained from this batch of identification. k This indicates the update step size for this batch (determined by the number of high-confidence samples, focal plane coverage, fitting residuals, condition number, etc., ranging from 0 to 1). Ω This represents the projection onto the equipment safety boundary Ω (including the maximum change in a single batch, etc.).
[0105] Each parameter can also have a maximum change per batch set. After updating, verification is performed in the reserved area not involved in the identification, the reference slice, or the first segment of the next batch; if the image quality deteriorates, the residual increases, or the parameter produces a physically meaningless jump, the update is rejected and the system reverts to the previous valid parameter version. The system saves the parameter version, objective lens, scanning speed, device temperature, cumulative runtime, and identification confidence level.
[0106] In some implementations, when the blurring field of view of two consecutive slices exceeds the threshold, the focal length residual of the reference slice continues to exceed the limit, the forward and reverse residuals continue to increase, the parameters reach the safety boundary, or multiple update verifications fail, a manual recalibration or maintenance prompt is output, and the triggering reason, downtime, and quality indicators before and after calibration are recorded.
[0107] Specifically, when performing multiple rescans on the same pathological slide, the system will use the first scan completed with the currently locked parameter version as the calibration scan for the current update cycle. The currently locked parameters can be system default parameters, manually calibrated parameters, or stable parameters retained after verification from the previous update cycle. After the calibration scan is completed, the system identifies error parameters based on the forward and reverse scan residuals generated from that scan and filtered for confidence levels, obtaining candidate correction parameters.
[0108] Subsequently, the candidate correction parameters are validated against variation limits and safety conditions to form a new parameter version, which takes effect from the next rescan. To verify the effectiveness of the new parameters, subsequent scans using the new parameter version are defined as calibration scans, and their scan residuals, focal length errors, and image sharpness metrics are used to evaluate the self-calibration effect.
[0109] In addition, to ensure the reliability of parameter updates, the data from the calibration scan, after quality screening, can be used as calibration data for the next update cycle, but it must not be used simultaneously as identification input for generating the current parameter version and as calibration result to prove the validity of the parameter version. This ensures the independence of parameter identification and verification data and avoids the risk of parameter drift caused by cyclic verification.
[0110] Example 3 This embodiment also provides an electronic device, see reference. Figure 4It includes a memory 402 and a processor 401. The memory 402 stores a computer program, and the processor 401 is configured to run the computer program to perform the steps in any of the above embodiments of the closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision or the closed-loop self-calibration method for pathological slide scanning based on overlapping homology and time-delayed forward vision.
[0111] Specifically, the processor 401 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0112] The memory 402 may include a large-capacity memory 402 for data or instructions. The memory 402 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 401.
[0113] The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement any of the pathological slide scanning closed-loop focusing methods based on overlapping homology and time-delayed forward vision or the pathological slide scanning closed-loop self-calibration methods based on overlapping homology and time-delayed forward vision in the above embodiments.
[0114] Optionally, the electronic device may further include a transmission device 403 and an input / output device 404, wherein the transmission device 403 is connected to the processor 401 and the input / output device 404 is connected to the processor 401.
[0115] The transmission device 403 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 403 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0116] The input / output device 404 is used to input or output information. In this embodiment, the input information may be a local image, etc., and the output information may be the predicted focal plane position, etc.
[0117] Optionally, in this embodiment, the processor 401 can be configured to perform the following steps via a computer program: S1: Acquire multiple local images corresponding to adjacent scanning areas during the pathological section scanning process; S2: Based on the spatial overlap relationship between adjacent local images, determine the homologous overlapping regions corresponding to the same tissue region; S3: Obtain focal length sample sets at different Z positions in the overlapping region of the same origin, combine the focal length sample sets to determine the clearest focal length position and the corresponding confidence level corresponding to the current scanning position, and execute step S4 when the confidence level is greater than the update threshold. S4: Obtain the system delay between image acquisition and the completion of the focusing actuator response, determine the spatial forward-looking position based on the scanning speed, and map the current clearest focal length position to the future scanning position based on the spatial forward-looking distance; S5: Using a state estimator combined with the clearest focal length position and confidence level, predict the predicted focal plane position corresponding to the future scanning position, and control the focusing actuator to adjust to the predicted focal plane position.
[0118] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0119] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0120] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. One or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted that any block in the logical flow of the figures may represent a program step, or interconnected logical circuitry, blocks and functions, or a combination of program steps and logical circuitry, blocks and functions. The software may be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0121] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A closed-loop focusing method for scanning pathological sections based on overlapping homology and time-delayed forward vision, characterized in that, Includes the following steps: S1: Acquire multiple local images corresponding to adjacent scanning areas during the pathological section scanning process; S2: Based on the spatial overlap relationship between adjacent local images, determine the homologous overlapping regions corresponding to the same tissue region; S3: Obtain focal length sample sets at different Z positions in the overlapping region of the same origin, combine the focal length sample sets to determine the clearest focal length position and the corresponding confidence level corresponding to the current scanning position, and execute step S4 when the confidence level is greater than the update threshold. S4: Obtain the system delay between image acquisition and the completion of the focusing actuator response, determine the spatial forward-looking position based on the scanning speed, and map the current clearest focal length position to the future scanning position based on the spatial forward-looking distance; S5: Using a state estimator combined with the clearest focal length position and confidence level, predict the predicted focal plane position corresponding to the future scanning position, and control the focusing actuator to adjust to the predicted focal plane position.
2. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 1, characterized in that, Candidate overlapping regions are determined based on the scanning platform's movement trajectory and the scanning position information of adjacent local images; at least one of phase correlation matching, normalized cross-correlation matching, feature point matching, or optical flow matching is used to perform sub-pixel-level image registration on the candidate overlapping regions. Regions that have been registered and correspond to the same organizational structure are identified as homologous overlapping regions.
3. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 2, characterized in that, The preceding local image adjacent to the scanning platform's movement trajectory is selected as the reference image. If the preceding local image is unqualified, under spatial overlap constraints, historical candidate images are selected from the historical candidate image set based on overlap ratio, confidence level, registration residual, spatial distance, and time interval. Candidate overlapping areas are determined based on the reference image and the current local image. The historical candidate image set consists of a preset number or a preset time range of historical local images, and must at least meet the following conditions: they originate from the same pathological slide as the current local image, use the same objective magnification and imaging parameters, have the same or compatible parameter versions, and are spatially overlapping with the current local image based on the scanning platform position or image content.
4. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 1, characterized in that, Focal length samples corresponding to different Z positions are obtained through natural sampling and active supplemental sampling to construct a focal length sample set containing different Z positions and corresponding sharpness values.
5. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 1, characterized in that, When the number of focal length samples in the focal length sample set is greater than 3, a robust model with unimodal and negative curvature constraints is used to fit the focal length samples, and the least squares method is constrained to solve for the sharpest focal length position. When the number of focal length samples in the focal length sample set is 2, a pre-calibrated curvature prior or learned from historical high-confidence samples is used to determine the sharpest focal length position. The historical high-confidence samples are samples obtained using the same objective lens, camera, exposure conditions and optional tissue texture type as the current pathological slide scanning process.
6. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 4, characterized in that, For each co-originating sub-region of the co-originating overlapping region at each Z position, different sharpness evaluation features of each co-originating sub-region are calculated. After normalization of the sharpness evaluation features, the sharpness values of the focal length samples at the current Z position are obtained by weighting. The sharpness evaluation features include at least one of spatial domain sharpness features, frequency domain sharpness features, and imaging structure features.
7. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 1, characterized in that, The total system latency is obtained by summing the exposure time, camera readout time, image transmission time, focal length calculation time, control communication time, and Z-axis execution response time. The spatial forward-looking position is determined by combining the scanning speed, and the current clearest focal length position is updated with the spatial forward-looking position to obtain the future scanning position.
8. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 1, characterized in that, A focal plane state vector is established based on the clearest focal length position. The focal plane state vector is updated over time using a state estimator and updated by combining the observations after mapping the spatial forward position. The predicted focal plane position corresponding to the predicted future scanning position is obtained. The observation noise variance is dynamically adjusted according to the confidence level. The higher the confidence level, the greater the weight of the observation in the state update.
9. The closed-loop focusing method for pathological slide scanning based on overlapping homology and time-delayed forward vision according to claim 1, characterized in that, Using the predicted focal plane position as the input to the error compensation model, the static bias, direction-related hysteresis, dynamic correction, and feedback correction obtained by superimposing the identified static bias, direction-related hysteresis, dynamic correction, and feedback correction are used to generate a control command that has undergone systematic error compensation. Based on the control command, the focusing actuator is driven to adjust to the predicted focal plane position.
10. A closed-loop self-calibration method for pathological slide scanning based on overlapping homology and time-delayed forward looking, implemented based on any one of the closed-loop focusing methods for pathological slide scanning based on overlapping homology and time-delayed forward looking according to claims 1 to 9, characterized in that, include: S6: After completing a pathological slide scan, the theoretically clear focal plane is reconstructed based on multiple high-confidence focal length observations, and errors are identified based on the focal length residuals corresponding to different scanning directions during the round-trip scanning process to obtain equipment error compensation parameters; the focal length control parameters in subsequent pathological slide scans are updated based on the equipment error compensation parameters.