Pathology slide scanner real-time focus tracking method, apparatus and medium

CN122505873BActive Publication Date: 2026-09-04SHENZHEN SHENGQIANG TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610993569.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-09-04
Estimated Expiration
2046-07-06

AI Technical Summary

Technical Problem

[0006]本发明实施例提供了一种病理切片扫描仪实时焦点追踪方法、装置及介质,针对现有技术存在图像对焦方式效率低、精度不足,而基于OCT的对焦方式结构复杂、成本高且系统集成度低等问题

Benefits of technology

1.本发明通过将OCT A-scan光路与主成像物镜共轴集成,并采用固定光斑轴向测距方式,无需振镜、MEMS等OCT横向扫描机构,也不依赖三维OCT重建算法,系统结构紧凑,能够兼容现有明场或荧光病理扫描仪的主成像光路。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122505873B_ABST
    Figure CN122505873B_ABST
Patent Text Reader

Abstract

The present application provides a pathological section scanner real-time focus tracking method, device and medium, and aims to solve the problems of slow image focusing speed, insufficient sparse focus fitting accuracy and complex three-dimensional OCT scanning structure in the existing pathological section scanning. The method comprises: obtaining one-dimensional A-scan depth information through a fixed spot OCT detection light path coaxial with a main scanning objective lens; identifying the target tissue layer depth according to the depth information; converting it into the main imaging focus target position according to the calibrated focus mapping relationship; generating a delay-compensated Z-axis control instruction based on the scanning motion parameters and system delay parameters; and driving the Z-axis execution module to keep the tissue layer in the focal plane. The present application does not require an OCT transverse scanning mechanism, has a compact structure, is compatible with bright field and fluorescence scanning, and is used for high-throughput digital pathological full-section scanning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical imaging equipment technology, and in particular to a method, apparatus and medium for real-time focus tracking of a pathology slide scanner. Background Technology

[0002] In the field of whole-slide digital pathology scanning, the scanner needs to continuously keep the sample within the depth of focus of the objective lens while the slide moves at high speed. Pathology slides often have local wrinkles, warping, uneven thickness caused by the slide preparation process, as well as flatness errors of the slide itself. This makes the actual surface of the tissue layer not an ideal plane, which poses a challenge to automatic focusing.

[0003] Current mainstream focusing technologies mainly include image contrast focusing and pre-scan multi-point focusing. Image contrast focusing finds the optimal focus by acquiring images at multiple Z-axis positions and calculating a sharpness evaluation function. Although it has high accuracy, it requires frequent Z-axis movements and multiple image acquisitions, which severely limits the scanning speed. Furthermore, multiple exposures in fluorescence mode can easily lead to fluorescence quenching. Pre-scan multi-point focusing, on the other hand, pre-selects several discrete points on the slice for focusing and then generates the focal plane position of the entire slice through surface fitting. Although this method reduces the number of focusing operations for the entire slice, the sparse sampling points cannot accurately reflect the true height of local wrinkles, bubble edges, or areas of abrupt thickness changes, which can easily lead to local image blurring.

[0004] In recent years, optical coherence tomography (OCT) technology has been introduced into the field of microscopic imaging due to its ability to provide high-resolution axial depth information. However, existing OCT-assisted focusing schemes typically employ two-dimensional or three-dimensional OCT imaging systems that include galvanometers, galvanometers, or MEMS scanning mirrors. These systems are complex in structure, bulky, and expensive, and their optical path adjustments are difficult, making them hard to directly embed into the main imaging optical path of compact pathology slide scanners. They also tend to introduce additional lateral scanning delays and data processing burdens.

[0005] Therefore, there is an urgent need for a real-time focus tracking method, device, and medium for pathological slide scanners to solve the problems existing in the current technology. Summary of the Invention

[0006] This invention provides a real-time focus tracking method, device, and medium for pathological slide scanners, addressing the problems of low efficiency and insufficient accuracy in existing image focusing methods, as well as the complex structure, high cost, and low system integration of OCT-based focusing methods.

[0007] The core technology of this invention is to integrate the fixed-spot near-infrared OCT A-scan depth detection optical path with the main scanning objective of the pathological slide scanner in a coaxial manner. It uses high-speed one-dimensional axial depth measurement to directly obtain the physical depth of the tissue layer, and combines calibration mapping, delay compensation and confidence assessment to generate real-time focus control commands, so as to achieve continuous focus tracking of the entire scanning path without adding an OCT lateral scanning mechanism.

[0008] In a first aspect, the present invention provides a real-time focus tracking method for a pathological slide scanner, the method comprising the following steps:

[0009] One-dimensional A-scan depth information of the sample along the optical axis is obtained by using a fixed-spot OCT detection optical path coaxial with the main scanning objective lens; the fixed-spot OCT detection optical path does not have a transverse scanning mechanism, but only performs axial ranging at a fixed transverse position; Identify the depth of the target tissue layer based on one-dimensional A-scan depth information; The target tissue layer depth is converted into the main imaging focus target position based on the pre-calibrated focus mapping relationship; Based on the scanning motion parameters and system delay parameters, generate delay-compensated Z-axis control commands; The Z-axis drive module keeps the tissue layers of the pathological section on the main imaging focal plane.

[0010] Furthermore, the fixed-spot OCT detection optical path uses a near-infrared light source, and the near-infrared band is isolated from the imaging band of the main imaging system.

[0011] Furthermore, coaxiality is achieved through an optical path coupling module, which includes a dichroic mirror configured to reflect near-infrared OCT probe light to enter the main scanning objective and transmit the imaging beam of the main imaging system.

[0012] Furthermore, the delay compensation includes: Acquire the spatial offset between the OCT measurement spot and the camera exposure position in the scanning direction, the current scanning speed, the OCT signal processing delay, and the response delay of the Z-axis actuator; The spatial pre-aiming time is determined based on the spatial offset and the current scanning speed. The equivalent total delay is calculated by combining the OCT signal processing delay and the Z-axis actuator response delay. Based on this, Z-axis control commands for future exposure positions are generated.

[0013] Furthermore, it also includes: The confidence level of the identification results of the target tissue layer depth is calculated. The confidence level is evaluated based on at least one of the following: signal-to-noise ratio of OCT signal, target peak shape, reasonableness of interlayer distance, depth continuity and / or consistency with predicted trajectory. When the confidence level is lower than a preset threshold, at least one of the following strategies is executed: maintaining the previous effective focus, performing neighborhood interpolation, reducing the scanning speed, triggering image-based secondary focusing, or output quality alarm.

[0014] Furthermore, the steps for identifying the depth of the target tissue layer include: Multiple consecutive A-scans are fused within each control cycle. The fusion process includes median filtering, mean filtering, confidence weighting, and / or outlier removal to obtain a stable depth estimate.

[0015] Furthermore, it also includes: In multi-channel fluorescence scanning mode, the focal height distribution generated during the first fluorescence channel scan is used as a feedforward reference. The feedforward reference is reused in subsequent fluorescence channel scans, and local corrections are made based on the real-time acquired target tissue layer depth.

[0016] In a second aspect, the present invention provides a real-time focus tracking device for a pathological slide scanner, comprising: The main imaging module is used to acquire images of pathological slides; The OCT depth detection module is used to output one-dimensional A-scan depth information of the sample along the optical axis. The OCT depth detection module uses near-infrared detection light to measure depth at a fixed lateral position and does not have an OCT lateral scanning mechanism. The optical path coupling module is used to make the sample arm beam of the OCT depth detection module coaxial with the main scanning objective of the main imaging module, and to isolate the working band of the OCT depth detection module from the working band of the main imaging module. The sample carrying and scanning module is used to carry pathological slides and move them along a predetermined XY scanning trajectory; The Z-axis actuation module is used to adjust the focal plane position of the main imaging module; and The control and calculation module is connected to the OCT depth detection module, the sample carrying and scanning module, and the Z-axis execution module, respectively. It is used to identify the depth of the target tissue layer based on one-dimensional A-scan depth information, and convert the depth of the target tissue layer into the position of the main imaging focus according to the pre-calibrated focus mapping relationship, so as to generate focus control commands to drive the Z-axis execution module.

[0017] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described real-time focus tracking method for pathological slide scanners.

[0018] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the real-time focus tracking method for a pathological slide scanner as described above.

[0019] The main contributions and innovations of this invention are as follows: 1. This invention integrates the OCT A-scan optical path with the main imaging objective in a coaxial manner and adopts a fixed spot axial ranging method. It eliminates the need for OCT lateral scanning mechanisms such as galvanometers and MEMS, and does not rely on three-dimensional OCT reconstruction algorithms. The system has a compact structure and is compatible with the main imaging optical path of existing bright-field or fluorescence pathology scanners.

[0020] 2. This invention directly obtains the axial interface positions of coverslips, tissue layers, and slides by physical depth measurement. Compared with traditional multi-Z layer search based on image sharpness index, it can reduce the number of additional exposures and Z-axis round-trip time, and improve the efficiency of whole-slice scanning. Compared with sparse multi-point focal plane fitting, it can track the real surface of tissue layers with high-density depth data, and reduce the focus error of local wrinkles, warping, detachment edges and thickness change areas.

[0021] 3. This invention introduces a predictive compensation mechanism based on scanning speed, spatial offset between OCT measurement spot and exposure position, OCT signal processing delay, and Z-axis actuator response delay, enabling focus control commands to act on future exposure positions in advance, effectively reducing focus lag in high-speed continuous scanning.

[0022] 4. This invention uses a confidence assessment mechanism to judge the reliability of OCT depth recognition results in real time, and adopts graded degradation strategies such as maintaining the previous effective focus, neighborhood interpolation, reducing scanning speed, or triggering image-based secondary focusing based on the confidence level. This enhances the system's ability to handle abnormal conditions such as blank areas, bubbles, highly reflective interfaces, and low signal-to-noise ratio areas.

[0023] 5. The OCT depth detection optical path of the present invention is wavelength isolated from the bright field and fluorescence imaging optical paths through a dichroic mirror. The same depth detection system can be reused in bright field scanning and fluorescence scanning without having to search for the focus through repeated fluorescence exposure, which reduces the risk of fluorescence bleaching and improves the focus consistency of multi-channel fluorescence scanning.

[0024] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description

[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a real-time focus tracking optical path diagram of a coaxial OCT pathological slide scanner according to an embodiment of the present invention.

[0026] In the figure, 10 is the main imaging module; 11 is the scanning objective; 12 is the tube mirror; 13 is the camera; 14 is the transmitted illumination source; 15 is the fluorescence excitation source; 21 is the near-infrared source; 22 is the fiber optic coupler or circulator; 23 is the reference arm; 24 is the sample arm collimator; 25 is the spectrometer; 26 is the reflecting mirror; and 31 is the dichroic mirror. Detailed Implementation

[0027] 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.

[0028] 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.

[0029] Example 1 like Figure 1 As shown, the real-time focus tracking device for pathological slide scanners of the present invention includes at least a main imaging module 10, an OCT depth detection module, an optical path coupling module, a sample carrying and scanning module, a Z-axis execution module, and a control calculation module. The modules form a closed-loop control structure through optical paths, data links, and motion control links.

[0030] The overall workflow of the system can be summarized as follows: the main imaging module 10 is responsible for acquiring bright-field, fluorescence, or bright-field / fluorescence composite images; the OCT depth detection module outputs near-infrared A-scan detection light with a fixed lateral position to the pathological slide through the optical path coupling module, and receives backscattered or reflected signals from interfaces such as coverslips, tissue layers, mounting adhesive layers, and slides; the sample carrying and scanning module moves the pathological slide according to a predetermined XY path and outputs position codes and scanning speed information to the control calculation module; the Z-axis execution module adjusts the focal plane position of the main imaging module 10 according to the focus control commands output by the control calculation module, so that the tissue layer is kept near the optimal focal plane during the scanning process.

[0031] In terms of data flow, the A-scan depth data output by the OCT depth detection module, the camera exposure timing of the main imaging module 10, the XY position of the sample carrying and scanning module, and the position feedback from the Z-axis execution module are simultaneously input into the control calculation module. The control calculation module completes depth calculation, layer identification, confidence assessment, focal target generation, delay compensation, and Z-axis closed-loop control, and binds and saves the focal height map, confidence map, and abnormal area markers with the coordinates of the final whole-slice image.

[0032] In this overall architecture, the OCT depth detection module only provides axial depth information and does not perform lateral imaging; the lateral coordinates are provided by the existing XY scanning platform of the sample carrier and scanning module. Therefore, the system does not require additional OCT lateral scanning components such as galvanometers, galvanometers, or MEMS scanning mirrors, and can achieve real-time focusing while keeping the main imaging optical path of the pathology scanner essentially unchanged.

[0033] In this embodiment, the main imaging module 10 retains the original bright-field or fluorescence imaging link of the pathology slide scanner. Specifically, the main imaging module 10 includes a scanning objective lens 11, a tube lens 12, a camera 13, and an illumination source. For bright-field scanning, the illumination source is a transmitted illumination source 14 or an epi-illuminated illumination source in the 400-700nm visible light band; for fluorescence scanning, the main imaging module 10 also includes a fluorescence excitation source 15, an excitation filter, a fluorescence dichroic mirror, an emission filter, and a camera 13. The wavelengths of the fluorescence excitation and emission light are selected according to the dye or fluorescent label, with common excitation and emission bands in the 350-800nm ​​range.

[0034] Camera 13 can be an area scan camera, a line scan camera, a time-delay integration camera, or other image sensors used for scanning full-slice images. The core requirement of the main imaging module 10 is to share the scanning objective 11 with the OCT depth detection module or share the optical path coaxial with the main objective without significantly changing the original aberration correction, magnification, numerical aperture, and imaging field of view.

[0035] The control calculation module receives the exposure trigger signal, exposure window and frame synchronization signal from the camera 13 so as to accurately correspond the OCT depth data with the image acquisition position.

[0036] In this embodiment, the OCT depth detection module includes a near-infrared light source 21, an optical fiber coupler or circulator 22, a reference arm 23, a sample arm collimator 24, an interferometric signal detector or spectrometer 25, and a data acquisition circuit.

[0037] The near-infrared light source 21 preferably employs a low-coherence near-infrared light source with a center wavelength of approximately 1310 nm. This wavelength band provides good wavelength isolation from the visible light field and commonly used fluorescence channels, and exhibits good penetration capabilities in glass, mounting adhesive, and thin-layer tissues. The near-infrared light source 21 can be a broadband light source of a superluminescent diode, a swept-frequency laser source, a low-coherence laser source, or other near-infrared light sources capable of forming axial interference depth resolution. As an alternative implementation, the near-infrared light source 21 can also be selected from near-infrared bands of 1050 nm, 1060 nm, 1550 nm, or other near-infrared bands that can be effectively isolated from the main imaging band.

[0038] In the spectral OCT implementation, the output of the near-infrared light source 21 is split into a reference arm 23 and a sample arm via an optical fiber coupler or circulator 22. The reference arm 23 is collimated by a collimating lens and then reflected by a reflector 26 before returning, used to form an interference reference, set the zero optical path position, and perform dispersion calibration. The sample arm is transmitted via optical fiber to the vicinity of the scanner, where it is collimated by a sample arm collimator 24. The returned interference light is collected by a spectrometer 25. In the frequency-sweep OCT implementation, the output of the frequency-sweep light source is converted into a time-series interference signal by an interferometer, which is then collected by a balanced detector or a high-speed acquisition card.

[0039] The key feature of this invention is that the OCT depth detection module performs only one-dimensional A-scan depth measurement, without performing OCT lateral scanning or acquiring two-dimensional B-scan or three-dimensional volumetric data. At a fixed lateral position, the OCT depth detection module acquires depth data at an A-scan frequency of 20kHz to 200kHz. The lateral positional changes required for pathological slide scanning are provided by the sample carrier and the XY stage movement of the scanning module itself. Once the OCT depth data is synchronized with the XY position encoding, high-density focal height information along the scanning path can be formed.

[0040] In this embodiment, the optical path coupling module is used to couple the OCT sample arm beam into the main imaging scanning objective 11 and make it coaxial with the main imaging optical axis. For example... Figure 1As shown, the optical path coupling module includes a dichroic mirror 31. The dichroic mirror 31 is positioned below the scanning objective lens 11, on the coaxial section of the objective lens illumination side, or between the objective lens and the illumination module, enabling the OCT and the main objective lens to be coaxial. Preferably, a dichroic mirror 31 with a boundary of approximately 900 nm is used, so that near-infrared OCT light greater than 900 nm is reflected into the scanning objective lens 11, while bright-field or fluorescent light less than 900 nm is transmitted and propagated along the original imaging optical path.

[0041] To prevent OCT light from entering camera 13 or the fluorescence detection channel, a 1310nm cutoff, short-pass, or band-stop filter structure is set at the front end of camera 13 or in the emission filter path; to prevent visible light from entering the OCT detector, a 1310nm bandpass filter structure is set in the OCT return path. Through the above-mentioned band isolation, real-time OCT ranging will not significantly affect the brightness of the bright-field image, fluorescence signal acquisition, and camera 13 exposure, nor will it require changes to the existing imaging relationships between the optical components in the main imaging module 10.

[0042] The lateral offset between the OCT measurement spot and the camera exposure center can be determined through optical path fine-tuning and coordinate calibration. Specifically, the incident angle can be finely adjusted using the two-dimensional fine-tuning seat of the sample arm collimator 24, or a small wedge, parallel plate, or equivalent deflection element can be placed in front of the dichroic mirror 31 to create a controllable offset of the 1310nm OCT spot relative to the camera exposure center within the field of view of the scanning objective lens 11. After adjustment, the spot position is stabilized by a locking structure. If the system requires an offset close to zero, the OCT spot can be adjusted to be near the exposure center, mainly relying on processing delay and Z-axis response delay compensation.

[0043] The offset calibration method includes: placing a calibration plate with crosshairs, a chromium film grid, a microbead array, or a micropore array on the stage; first, the camera 13 acquires the calibration image and determines the coordinates of the exposure center; then, the OCT spot forms an identifiable reflection peak or scattering peak on the calibration plate; the position with the maximum OCT peak or the strongest edge response is found by moving the XY stage; the offset is obtained based on the projection difference between the two in the same coordinate system. The system can be repeatedly calibrated at multiple field-of-view positions and the average value is taken or a lookup table is established. After calibration, the offset is saved together with the objective lens magnification, scanning mode, and camera region of interest parameters.

[0044] In this embodiment, the sample carrying and scanning module includes an XY stage, a slide clamp, a positioning structure, and a position encoder. The XY stage can employ continuous line scanning, serpentine scanning, patchwork scanning, or other full-slice image scanning trajectories. The position encoder outputs XY coordinates and scanning speed information. The control calculation module aligns the OCT acquisition timestamp with the XY position code, binding each A-scan depth result to a specific (x,y) coordinate.

[0045] When using continuous line scanning, the OCT depth detection module can continuously output A-scans during the scanning process; when using patchwork scanning, the OCT depth detection module can output multiple A-scans within a short time window before, during, or after each field of view exposure. The control calculation module selects the appropriate depth fusion window and Z-axis control strategy according to the scanning mode.

[0046] In this embodiment, the Z-axis execution module can change the main imaging focal plane by moving the scanning objective 11, the stage, the intermediate focusing lens group, the piezoelectric objective mount, the liquid lens, the adjustable lens, or the telecentric focusing assembly. The Z-axis execution module preferably has position feedback, such as a grating ruler, a capacitive sensor, an encoder, piezoelectric position feedback, or motor closed-loop feedback. The control calculation module generates Z-axis commands based on the target focal position and performs feedforward, closed-loop, or model predictive control in conjunction with the actuator dynamic model. For areas with abrupt changes in local height, the system can limit the Z-axis speed and acceleration, and reduce the XY scanning speed if necessary, to avoid image blurring caused by Z-axis overshoot or vibration.

[0047] In this embodiment, the control and calculation module is the core component of the system of the present invention, and can be implemented by an industrial computer, embedded processor, FPGA, GPU, motion controller, or a combination thereof. Its functions include at least: OCT signal acquisition synchronization, A-scan depth calculation, layer identification, target layer confidence assessment, focus calibration mapping, refractive index correction, delay compensation, focus queue management, Z-axis motion control, abnormal condition handling, and mass data recording. Different functions can be centralized within the same controller or distributed among the OCT acquisition card, camera controller, motion controller, and host computer software.

[0048] In this embodiment, the control calculation module performs preprocessing and depth calculation on the OCT interferometric signal output by the spectrometer 25 or detector. For spectral domain OCT, the processing flow includes background subtraction, spectral shaping, wavenumber k-space resampling, dispersion compensation, window function processing, Fourier transform, amplitude normalization, and depth coordinate calibration to obtain the axial reflection intensity curve of the sample. For frequency sweep OCT, the processing flow includes triggering synchronization, k-clock sampling or resampling, background subtraction, dispersion compensation, Fourier transform, and amplitude normalization.

[0049] exist In the curves, the upper surface of the coverslip, the junction of the lower surface of the coverslip and the tissue, the tissue scattering band, the upper surface of the slide and the tissue junction, and the lower surface of the slide appear as peaks, peak groups, or scattering bands at different depths. See [reference needed]. Figure 1The analyzed image portion, from top to bottom, consists of: the upper surface of the coverslip, the junction between the lower surface of the coverslip and the tissue, the tissue scattering band, the junction between the upper surface of the slide and the tissue, and the lower surface of the slide. The system identifies the location of the target tissue layer based on interlayer distance, peak intensity, gradient variation, depth prior, continuity constraints, and historical trajectory prediction.

[0050] Target layer identification can employ algorithms such as peak detection, local gradient detection, centroid localization of scattering bands, template matching, dynamic programming, Kalman filtering, particle filtering, machine learning classification, or neural network segmentation. For conventional HE-stained bright-field sections, the upper edge of the tissue scattering band, the tissue scattering centroid, or the tissue mid-surface can be prioritized for identification; for fluorescent sections, the upper edge, mid-surface, or lower edge of the tissue layer can be selected as the focal target based on the tissue thickness region where the fluorescent label is located.

[0051] To improve robustness, the system performs temporal window fusion on continuous A-scans. When the camera 13 acquires frames at 100Hz and the OCT A-scan sampling rate is 80kHz, approximately 800 A-scans can be obtained within a single frame exposure interval. Within each exposure cycle, the system performs median filtering, mean filtering, confidence weighting, outlier removal, and temporal continuity constraints on multiple A-scans to obtain stable depth estimates.

[0052] In this embodiment, the control calculation module outputs a confidence score C for each A-scan or each fusion window. The confidence score C is calculated comprehensively based on factors such as signal-to-noise ratio, target peak half-width at half-maximum, peak relative intensity, whether the inter-layer distance is reasonable, whether the depth difference with adjacent locations is continuous, and whether it is consistent with the motion model prediction. As a specific example of confidence score calculation, each evaluation item is normalized to 0 to 1 and then calculated by weighted sum:

[0053] in Represents the target peak signal-to-noise ratio score, for example ; This indicates whether the peak half-width is within the expected range; This indicates whether the interlayer distances between the coverslip, tissue layer, and slide conform to the a priori range; This indicates the continuity between the current depth and the depth of the adjacent A-scan or the previous control cycle. This indicates the consistency between the current depth and the motion model or historical focus height map.

[0054] The aforementioned weights and thresholds can be adjusted using calibrated samples, historical scan data, or validation sets for different tissue types.

[0055] Based on confidence level C, the system executes a hierarchical focus control strategy: when When the current depth is used directly to generate focus control commands; when When using confidence-weighted fusion, neighborhood interpolation, or historical trajectory constraints; If the area is identified as a low-confidence region, the following actions will be taken: maintain the previous valid focus, trigger secondary image focusing, reduce scanning speed, or issue an output quality alarm.

[0056] Common abnormalities in pathological slide scanning include blank slide areas, tissue edges, wrinkles, bubbles, abrupt changes in mounting adhesive thickness, highly reflective interfaces, tissue detachment, and low signal-to-noise ratio (SNR) areas. The system employs corresponding processing strategies for different abnormality types: blank areas – maintain the previous effective focal point or interpolate based on the neighboring focal height map; tissue edges – use edge neighborhood smoothing and limit Z-axis acceleration; wrinkles or warping – increase the A-scan fusion frequency and enable feedforward prediction; bubbles or mounting adhesive abnormalities – combine template matching and historical trajectory analysis to exclude non-tissue peaks; highly reflective or saturated areas – reduce OCT power or integration time and use neighborhood interpolation; low SNR – increase the A-scan fusion window and maintain the previous effective focal point. The system simultaneously records the abnormality type and quality label, facilitating subsequent quality traceability and rescan decisions.

[0057] In this embodiment, since OCT measures the axial position of a certain reflection or scattering interface in the sample, while the optimal focal plane of the main imaging system may correspond to a specific depth position of the tissue layer, the system needs to establish a calibration relationship between the OCT depth coordinates and the main imaging focal coordinates before use.

[0058] During calibration, the depth of the OCT target layer is simultaneously recorded on standard slides, typical tissue regions, or calibration samples with known thickness structures. With the best Z position for image sharpness To obtain a fixed bias Or a functional relationship related to objective magnification, numerical aperture, coverslip thickness, refractive index of the sealing medium, fluorescence channel, and camera image plane position.

[0059] Calibration samples can be selected from stacks of standard coverslips, glass standard slides with known step heights, blank slides covered with sealing adhesive, transparent calibration slides containing microbeads or microstructures, or pathological sections with tissue simulation layers of known thickness. Preferably, a stack of No. 1.5 coverslips, standard slides, and sealing media with known refractive index is used.

[0060] The calibration process includes the following steps: First, after selecting the objective lens magnification and imaging channels Next, place the calibration sample on the stage and complete the OCT zero optical path calibration; Second, OCTA-scans are acquired at multiple known depth locations or multiple Z-axis locations, while bright-field or fluorescence images at different Z-positions are acquired using camera 13. Third, the optimal focal position for the main image is determined using sharpness indicators such as Tenengrad, Laplacian variance, high-frequency energy in the frequency domain, or the width of the fluorescence dot spread function. ; Fourth, from A Extracting the target interface or scattering band depth from the scan. ; Fifth, take the mean or least squares fit over multiple calibration points to obtain... .

[0061] During real-time scanning, the focus target is calculated using the following formula:

[0062] In a more precise implementation, a refractive index correction is further introduced:

[0063] in and These represent the refractive indices of the coverslip and the sealing medium, respectively. and This indicates the thickness of the coverslip and sealing adhesive. A typical parameter is the refractive index of the coverslip. Refractive index of sealing medium =1.47 to Equivalent refractive index of tissue or aqueous medium =1.35 to Specific values ​​can be obtained from material supplier parameters, Abbe refractometer measurements, or sample calibration.

[0064] For multi-channel fluorescence scanning, each channel can have independent... The system can create a high-density focal height map in the first channel and reuse the height map in subsequent channels. At the same time, it can correct for thermal drift, platform repetition error and local changes in samples through real-time OCTA-scan.

[0065] In this embodiment, there is a finite delay between OCT measurement, depth calculation, Z-axis execution, and camera exposure during continuous scanning. If the control module directly drives the current exposure position using only the currently measured depth, focus tracking lag may occur during high-speed scanning. To address this, the present invention introduces feedforward prediction compensation based on scanning motion and system dynamic delay.

[0066] The control calculation module calculates the speed of the XY stage. Spatial offset between OCT spot and image acquisition position Data acquisition and processing delay and Z-axis actuator response delay Calculate the equivalent total delay :

[0067] in This is used to characterize the spatial preview time of the OCT measurement position relative to the future exposure position. When the OCT spot is in front of the camera's exposure position... This can offset some processing and execution delays; when the OCT spot is completely coaxial with the main imaging field of view and there is no spatial pre-aiming, Approximately zero, the system primarily compensates for processing delay and Z-axis response delay.

[0068] In serpentine scanning or bidirectional line scanning and All values ​​are signed and used in the current row direction. The system establishes a global coordinate system using the XY encoder coordinates, and denotes the fixed vector of the OCT spot relative to the exposure center as... At the beginning of each scan line, based on the direction unit vector calculate The delay calculation formula is then substituted into the equation. When the stage moves in the reverse direction, the control calculation module recalculates based on the direction indicator. And aiming time.

[0069] If the OCT spot changes from pre-aiming to hysteresis measurement after reversal, the system can adopt at least one of the following strategies: set a pre-scan or overscan distance at the beginning of the row so that the OCT has obtained the future area depth before entering the effective exposure area; delay camera triggering or reduce the initial segment speed for the reverse row; call the focal height map formed in the previous or adjacent row as the feedforward initial value and perform closed-loop correction using the current hysteresis A-scan; or... Designed to be close to zero.

[0070] Feedforward control generates Z-axis commands based on the predicted focus for future exposure positions:

[0071] The Predict function can be linear extrapolation, trajectory interpolation, Kalman prediction, or model predictive control. The closed-loop section reads feedback from the Z-axis encoder or displacement sensor and uses PID or feedforward plus PID control algorithms to compensate for mechanical hysteresis, friction, vibration, and actuator nonlinearity.

[0072] In this embodiment, in bright-field mode, the system acquires images using visible light transmission or incident illumination, while the OCT operates independently in the near-infrared band. Since a near-infrared cutoff filter can be configured at the front end of camera 13, the OCT probe light will not form significant artifacts in the bright-field image.

[0073] In fluorescence mode, the fluorescence excitation and emission light are separated from the OCT near-infrared band. The system does not require repeated focusing via fluorescence images, thus reducing the number of fluorescence exposures, lowering the risk of photobleaching, and improving the consistency of multi-channel scanning. For weak fluorescence channels, the system can primarily rely on OCT depth data to drive the focus, triggering image-based secondary focusing only when OCT confidence is insufficient or quality monitoring is abnormal.

[0074] For multi-channel fluorescence scanning, the system can adopt three strategies: First, all channels use OCTA-scan depth data for real-time focus tracking; second, a high-density focus height map is generated in the first channel, and the height map is reused in subsequent channels and slightly corrected by OCT; third, for weak signal or high bleaching risk channels, only height map and low-power OCT correction are used to avoid repeated fluorescence exposure.

[0075] In brightfield and fluorescence combined scanning scenarios, brightfield images can be used for tissue region localization and coarse focal plane verification, OCTA-scan is used for real-time physical depth measurement, and fluorescence images are used for final multi-channel pathological information acquisition. The three are linked through a unified coordinate system and focal height map.

[0076] In this embodiment, the real-time focus tracking process includes the following steps: Step 1, System Initialization: Complete self-tests of OCT light source (i.e., near-infrared light source 21), camera 13, XY stage, Z-axis execution module, spectrometer 25, filter group and control software, and load the current objective magnification, scanning mode, imaging channel and calibration parameters.

[0077] Step 2, Optical Path and Zero-Point Calibration: Determine the OCT zero optical path, cover glass interface depth, and optimal focal plane for main imaging using a standard slide or sample blank area. Spatial offset of OCT spot relative to camera exposure position .

[0078] Step 3, Preview and Positioning: Obtain a tissue area mask by scanning at low magnification or low resolution, determine the scanning path that requires real-time focus tracking, and identify blank areas, tissue edges, and high-risk areas.

[0079] Step 4, High-speed A-scan acquisition: During continuous XY motion or block acquisition, the OCT depth detection module continuously outputs a one-dimensional depth profile and binds each A-scan with a timestamp and XY position code.

[0080] Step 5, Tissue layer identification: The control calculation module extracts the target layer depth from the A-scan and calculates the confidence level, and marks bubbles, blank areas, highly reflective areas and low signal-to-noise ratio areas.

[0081] Step 6, Focus Target Generation: Based on the calibration bias, refractive index correction, channel parameters, and scanning timing, the focus target is generated. And write it to the focus queue bound to the XY coordinates.

[0082] Step 7, Delay Compensation: Based on the OCT acquisition and calculation delay, Z-axis actuator response delay, OCT spot spatial offset, and XY scanning speed, generate the Z-axis target command for the future exposure position.

[0083] Step 8, Z-axis control: Drive the objective lens, stage, or focusing lens to the target position before or during camera exposure, and superimpose closed-loop feedback and velocity feedforward if necessary.

[0084] Step 9, Image Acquisition and Quality Monitoring: Camera 13 acquires bright field or fluorescence images according to the scanning plan, while the system monitors image sharpness indicators, OCT confidence level, Z-axis tracking error, and platform stability.

[0085] Step 10, Data Recording: Save the focus height map, OCT confidence map, Z-axis control trajectory, abnormal area markers, and quality log for subsequent quality traceability, rescanning decisions, and algorithm optimization.

[0086] Example 2 In a bright-field whole-slice scanner, a 1310nm OCT sample arm is introduced into the scanning objective lens 11 via an optical fiber circulator 22, a collimating lens (i.e., a sample arm collimator 24), and a dichroic mirror 31. The dichroic mirror 31 uses 900nm as a dividing line to reflect OCT light greater than 900nm into the scanning objective lens 11, while keeping bright-field light less than 900nm transmitted.

[0087] Before the scan begins, the system establishes the optimal focal point between the OCT target layer and the image on a standard slice. During the actual scanning, the XY stage moves continuously along the scan path, and the OCT depth detection module acquires depth data at an A-scan frequency of 80kHz. The control calculation module fuses multiple A-scans in units of camera exposure cycles to obtain the tissue layer height of the current or future exposure area, and drives the Z-axis execution module to adjust the focus in real time.

[0088] When there is slight warping in a local area of ​​the slice, the OCT depth curve will change continuously with the XY coordinates, and the system directly converts this change into a Z-axis trajectory. Compared with traditional discrete multi-point fitting, this method does not require the acquisition of multiple Z-plane images, nor does it rely on sparse focal surface extrapolation, thus improving local clarity while maintaining scanning speed.

[0089] Example 3 In the fluorescence scanner, the fluorescence switching module is used to switch between bright field and fluorescence modes. The fluorescence excitation and emission light are located below 900 nm and pass through the dichroic mirror 31, which simultaneously reflects 1310 nm OCT light to make it coaxial with the scanning objective lens 11.

[0090] The system uses OCTA-scan to obtain the tissue layer height before each channel exposure, and selects the corresponding parameters based on the objective magnification, fluorescence channel filter group, and sample refractive index. For weak fluorescence channels, the system uses only OCT depth data to drive the focus, avoiding sharpness searches through multiple fluorescence exposures.

[0091] When multiple fluorescence channels need to be scanned, a high-density focal height map is generated during the first channel scan. Subsequent channels use this height map as feedforward and continue to use OCTA-scan to correct thermal drift, platform repetition error and local sample changes in real time.

[0092] Example 4 For scanners employing segmented image stitching, OCT continuously acquires multiple A-scans within a short time window before each field of view is exposed. The control calculation module completes tissue layer identification and Z-axis positioning before camera exposure, ensuring that the current field of view is already in the target focal plane at exposure time. Because the OCT sampling frequency is much higher than the camera frame rate, even if only a few milliseconds are reserved for each field of view, enough A-scans can be obtained for stable estimation.

[0093] In block scanning, the system associates the OCT depth of each field of view center, edge, or pre-aiming position with the coordinates of the field of view to be acquired. If there are significant height variations within the field of view, the system selects multiple short-window A-scans to estimate local tilt trends before field of view exposure and sets the focus to a weighted target position that satisfies the overall sharpness of the field of view.

[0094] Example 5 When OCTA-scan detects target peak loss, strong reflectivity saturation, or multiple peaks with similar heights in a localized area, the system first determines whether neighborhood interpolation or the previous effective focus can be used based on confidence level. If continuous anomalies exceed a set distance or set time, the control calculation module triggers low-cost secondary image focusing, such as acquiring low-exposure bright-field images only at a few Z positions, or using low-dose pre-exposure images in fluorescence mode for sharpness verification.

[0095] Secondary focus results can be used to correct the current area. Alternatively, a local height map can be generated and fed back to the subsequent OCT layer recognition algorithm to form an adaptive correction. This strategy ensures real-time performance while avoiding the entire scan from going out of focus due to a single OCT depth misjudgment.

[0096] Example 6 In OCT measurements, the A-scan depth is the optical path length, which needs to be divided by the refractive index of the corresponding medium to obtain the geometric thickness. For a typical pathological slide stack structure, the axial path from the upper surface of the coverslip to the tissue layer passes sequentially through the coverslip (refractive index approximately 1.515), the mounting medium (refractive index approximately 1.47 to 1.52), and the tissue layer (refractive index approximately 1.35 to 1.40).

[0097] The calibration process includes the following steps: First, with the objective lens magnification and imaging channel selected, place the standard calibration sample on the stage and complete the OCT zero optical path calibration. Second, OCTA-scans are acquired at multiple known Z-axis positions, while bright-field or fluorescence images at different Z-positions are acquired using the main camera. Third, use the sharpness index to determine the optimal focal point of the main image; Fourth, extract the optical depth of the target interface from the A-scan and calculate the geometric depth based on the refractive index correction; Fifth, calculate the bias at each calibration point, and obtain the calibration bias by taking the mean or least squares fitting. The calibration biases for different objective magnifications and different fluorescence channels are saved as lookup tables, which are automatically retrieved during scanning based on the current configuration.

[0098] Example 7 In serpentine or bidirectional line scans, the scan direction reverses at the end of each line. The fixed spatial offset vector of the OCT measurement spot relative to the camera exposure center is denoted as... At the beginning of each scan line, based on the unit vector of the current line direction. calculate Effective space offset Substitute into the delay compensation formula .

[0099] To address the issue of increased reverse line delay, the system employs the following strategies: setting a pre-scan distance at the beginning of the line so that the OCT obtains the depth data of the future area before entering the effective exposure area; triggering or reducing the initial speed of the reverse line delay camera; calling the focus height map formed in the previous line as the initial feedforward value, and using the current A-scan for closed-loop correction.

[0100] Example 8 Signal-to-noise ratio score The calculation method is as follows ,in Take 6dB, The threshold is set to 15 dB. The peak half-width at half-maximum (FWHM) score is calculated based on the relationship between the target peak's FWHM and the system's axial resolution, with an allowable range of 1 to 4 times the axial resolution. The interslice distance score is determined based on prior knowledge such as coverslip thickness, tissue layer thickness, and slide position. The depth continuity score is calculated based on the difference between the current depth and adjacent A-scan depths. The prediction consistency score is calculated based on the difference between the current depth and the Kalman filter prediction. The weights and thresholds for each component can be adjusted using calibrated samples or validation sets of different tissue types.

[0101] Example 9 In the depth measurement accuracy verification, glass standard slides with step heights of 10μm, 25μm, and 50μm were used for testing. After refractive index correction, the mean absolute error of OCT depth measurement could be controlled within approximately 1.2μm, and the repeatability standard deviation could be controlled within approximately 0.8μm, indicating that the A-scan depth information is sufficient to meet the focus control requirements of high numerical aperture pathological scanning.

[0102] In the scanning efficiency comparison verification, the sharpness focusing of traditional multi-Z-plane image focusing was compared with the continuous OCT A-scan focusing of the present invention. For a simulated full slice area of ​​the same size, the traditional method requires the acquisition of multiple additional Z-plane images, while the focus acquisition method of the present invention is completed synchronously with the main scan, and the focus acquisition related time is negligible.

[0103] In the verification of the delay compensation effect, a sinusoidal warped height trajectory with an amplitude of approximately ±30μm and a spatial period of approximately 8mm was constructed, and the combined OCT processing delay and Z-axis response delay were set to approximately 18ms. Without delay compensation, the root mean square error of focus tracking for high-speed line scanning was approximately 4.8μm; after enabling the spatial pre-aiming and feedforward compensation of this invention, the root mean square error could be reduced to approximately 1.5μm, and the overshoot at the beginning, end, and commutation segments was significantly reduced.

[0104] In image sharpness verification, pathological sections with simulated folds and local warping were used for testing. In folded and warped areas, enabling OCT focus tracking improved sharpness metrics by approximately 20% to 40%, and the proportion of out-of-focus fields below the threshold was reduced from approximately 10% to 15% to approximately 2% to 5%.

[0105] Example 10 The real-time focus tracking method executed by the control computing module of the present invention can be implemented by an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the various steps of the aforementioned method.

[0106] The computer program can also be stored on a computer-readable storage medium, such as a magnetic disk, optical disk, read-only memory, random access memory, flash memory, or any other storage medium known in the art. When the computer program is executed by a processor, it implements all the steps of the aforementioned real-time focus tracking method.

[0107] 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.

[0108] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.

Claims

1. A real-time focus tracking method for a pathological slide scanner, characterized in that, Includes the following steps: One-dimensional A-scan depth information of the sample along the optical axis is obtained by using a fixed-spot OCT detection optical path coaxially set with the main scanning objective lens; wherein, the fixed-spot OCT detection optical path does not have a transverse scanning mechanism, but only performs axial ranging at a fixed transverse position; The depth of the target tissue layer is identified based on the one-dimensional A-scan depth information. The depth of the target tissue layer is converted into the position of the main imaging focus target based on the pre-calibrated focus mapping relationship; Based on the scanning motion parameters and system delay parameters, generate delay-compensated Z-axis control commands; The Z-axis drive module keeps the tissue layers of the pathological section on the main imaging focal plane. The confidence level of the identification result of the target tissue layer depth is calculated, and the confidence level is evaluated based on at least one of the following: signal-to-noise ratio of OCT signal, target peak shape, reasonableness of interlayer distance, depth continuity and / or consistency with predicted trajectory; When the confidence level is lower than a preset threshold, at least one of the following strategies is executed: maintaining the previous effective focus, performing neighborhood interpolation, reducing the scanning speed, triggering image-based secondary focusing, or outputting a quality alarm. The delay compensation includes: Acquire the spatial offset between the OCT measurement spot and the camera exposure position in the scanning direction, the current scanning speed, the OCT signal processing delay, and the response delay of the Z-axis actuator; The spatial aiming time is determined based on the spatial offset and the current scanning speed, and the equivalent total delay is calculated by combining the OCT signal processing delay and the Z-axis actuator response delay. Based on this, Z-axis control commands for future exposure positions are generated.

2. The method as described in claim 1, characterized in that, The fixed-spot OCT detection optical path uses a near-infrared light source, and the near-infrared band is isolated from the imaging band of the main imaging system.

3. The method as described in claim 2, characterized in that, The coaxiality is achieved through an optical path coupling module, which includes a dichroic mirror configured to reflect the OCT probe light in the near-infrared band to enter the main scanning objective lens and transmit the imaging beam of the main imaging system.

4. The method as described in claim 1, characterized in that, The steps for identifying the depth of the target tissue layer include: In each control cycle, multiple consecutive A-scans are fused. The fusion process includes median filtering, mean filtering, confidence weighting, and / or outlier removal to obtain a stable depth estimate.

5. The method as described in claim 1, characterized in that, Also includes: In multi-channel fluorescence scanning mode, the focal height distribution generated during the first fluorescence channel scan is used as a feedforward reference. The feedforward reference is reused in subsequent fluorescence channel scans, and local corrections are made based on the real-time acquired target tissue layer depth.

6. An apparatus for implementing the real-time focus tracking method for pathological slide scanners according to any one of claims 1 to 5, characterized in that, include: The main imaging module is used to acquire images of pathological slides; The OCT depth detection module is used to output one-dimensional A-scan depth information of the sample along the optical axis. The OCT depth detection module uses near-infrared detection light to measure the depth at a fixed lateral position and does not have an OCT lateral scanning mechanism. An optical path coupling module is used to make the sample arm beam of the OCT depth detection module coaxial with the main scanning objective of the main imaging module, and to isolate the working band of the OCT depth detection module from the working band of the main imaging module. The sample carrying and scanning module is used to carry the pathological slide and move it along a predetermined XY scanning trajectory; The Z-axis execution module is used to adjust the focal plane position of the main imaging module; as well as The control and calculation module is connected to the OCT depth detection module, the sample carrying and scanning module, and the Z-axis execution module, respectively. It is used to identify the depth of the target tissue layer based on the one-dimensional A-scan depth information, and convert the depth of the target tissue layer into the main imaging focus target position according to the pre-calibrated focus mapping relationship, so as to generate focus control commands to drive the Z-axis execution module.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Autofocus system

    CN106255911A

  • Automatic focusing method and system of cell slide scanner

    CN121933422A