OCT volume data axial motion artifact correction method
By constructing an effective set of frames and decomposing the absolute displacement into terrain trend and jitter components, the error accumulation problem in the axial motion artifact correction of OCT volume data was solved, and stable correction of three-dimensional volume data and restoration of retinal layer structure were achieved.
Patent Information
- Application Number
- CN202611600576.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-16
- Publication Date
- 2026-11-24
AI Technical Summary
Existing methods for correcting axial motion artifacts in OCT volumetric data cannot achieve global consistency correction of three-dimensional volumetric data, resulting in layer structure drift and tilt at the end of the scan sequence, and the smoothing process cannot distinguish between motion jitter and real anatomical terrain.
By constructing an effective set of frames, measuring the inter-frame axial displacement and assigning confidence weights, and adaptively adjusting the global weighted least squares adjustment and regularization coefficients, the absolute displacement is decomposed into terrain trend components and jitter components. Only the jitter component is used as the axial translation correction amount to reconstruct the corrected OCT volume data.
It achieves axial motion artifact correction of three-dimensional volume data, maintains the integrity of real anatomical topography such as physiological concavity of the optic disc, avoids error chain accumulation, and ensures the physical continuity and smoothness of the retinal layer structure.
Smart Images

Figure CN123160732A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method for correcting axial motion artifacts in OCT volume data. Background Technology
[0002] Optical coherence tomography (OCT) is an imaging technique that uses the principle of low-coherence optical interference to acquire high-resolution tomographic images of biological tissues. OCT acquires two-dimensional grayscale tomographic images (hereinafter referred to as tomographic images) frame by frame along a scanning sequence for target areas such as the optic disc. This data can be used to construct three-dimensional volumetric data for clinical applications such as quantitative analysis of retinal layer structures, three-dimensional reconstruction, and visualization of continuous lateral views. However, during the acquisition of three-dimensional volumetric data, eye movement, signal attenuation, and loss of hardware triggers can cause relative displacement in the axial direction (depth direction) of each tomographic image, forming axial motion artifacts. This is accompanied by the generation of bad or missing frames, disrupting the physical continuity and smoothness of the retinal layer structure in the depth direction of the three-dimensional volumetric data. Therefore, correction for axial motion artifacts in the three-dimensional volumetric data is necessary.
[0003] Correction of axial motion artifacts in OCT volumetric data can be achieved using a pairwise frame registration method. This involves calculating the normalized cross-power spectrum phase correlation or spatial gray-level cross-correlation between two adjacent tomographic images, then obtaining the relative axial displacement between the two frames through the correlation peak positions, and finally chaining these values along the scanning sequence to obtain the absolute displacement of each frame. In addition, methods such as inter-frame geometric transformation estimation based on Scale-Invariant Feature Transform (SIFT) / Speed-Up Robust Features (SURF) feature point matching, registration based on vascular features guided by frontal fundus projection images or simultaneous fundus photography, and methods that actively compensate for eye movements at the acquisition end using real-time hardware eye-tracking technology are also employed.
[0004] The displacement measurements of the aforementioned frame-by-frame registration method are based on single-frame pairs and single regions, lacking global consistency constraints. Displacement estimation is propagated frame by frame along the scanning sequence, and errors from any single measurement are chained together and amplified frame by frame, leading to layered drift and tilting at the end of the scanning sequence. Furthermore, these methods lack a mechanism to distinguish between real anatomical terrain and motion errors when suppressing motion jitter; applying smoothing processes will smooth out real terrain features such as physiological optic disc concavity along with the jitter. In summary, the above schemes cannot correct axial motion artifacts in three-dimensional volume data. Summary of the Invention
[0005] This application provides a method for correcting axial motion artifacts in OCT volumetric data to solve the problem that it is impossible to correct axial motion artifacts in three-dimensional volumetric data.
[0006] This application provides a method for correcting axial motion artifacts in OCT volumetric data, comprising: acquiring multiple target frame images, wherein the target frame images are images corresponding to the physical scan positions of OCT volumetric data in the scan sequence direction, the target frame images are two-dimensional grayscale images, and the horizontal direction of the target frame images is the arrangement direction of the axial scan lines in each frame image, the axial direction is the dimension to be registered, and the target frame images correspond to known physical scan coordinates; constructing a set of valid frames based on the target frame images, the set of valid frames including multiple frame pairs, each frame pair consisting of two valid frames in the set of valid frames, and the frame number difference between the two valid frames in the frame pair in the scan sequence direction does not exceed a preset span threshold; measuring the inter-frame axial displacement between the two valid frames constituting the frame pair to obtain multiple inter-frame displacement measurement values; determining the confidence weight of the inter-frame displacement measurement values according to the measurement reliability statistical characteristics, correlation response peak amplitude, and physical span corresponding to the inter-frame displacement measurement values; the measurement reliability statistical characteristics characterize the inter-frame axial displacement. The number and dispersion of effective measurement points for displacement measurement are determined, and the physical span is the absolute value of the difference between the physical scan coordinates of the two effective frames constituting the frame pair. A regularization coefficient is determined based on the global missing rate and the local maximum missing rate of the OCT volume data. The global missing rate is determined based on the number of effective frames and the total number of physical scan positions, and the local maximum missing rate is determined based on the minimum proportion of non-effective frames within the window sliding along the scan sequence direction. Using the axial displacement of the effective frames as the unknown quantity, the normal equation for global weighted least squares adjustment is solved based on the inter-frame displacement measurement value, confidence weight, and regularization coefficient to obtain the absolute displacement of all effective frames. The absolute displacement is decomposed into a terrain trend component and a jitter component. The terrain trend component represents low-frequency terrain undulations along the scan sequence direction, and the jitter component is the difference between the absolute displacement and the terrain trend component. Using the jitter component as an axial translation correction amount, axial translation correction is applied to the frame image of the effective frames, and resampling is performed to reconstruct the corrected OCT volume data.
[0007] In some feasible embodiments, determining the confidence weight of the inter-frame displacement measurement value based on the measurement reliability statistical characteristics, the peak amplitude of the correlation response, and the physical span corresponding to the inter-frame displacement measurement value includes: determining the inliers participating in the inter-frame displacement measurement, wherein the inliers are measurement points whose axial coordinate difference deviates from the median within a preset inlier threshold, and the median is the median of the axial coordinate differences of all measurement points; calculating the measurement reliability statistical characteristics based on the number of inliers and the inlier standard deviation; obtaining the peak amplitude of the correlation response corresponding to the inter-frame displacement measurement value; calculating the span confidence factor, wherein the span confidence factor is the reciprocal of the sum of the physical span and the division-to-zero constant; and calculating the confidence weight of the inter-frame displacement measurement value, wherein the confidence weight is the product of the measurement reliability statistical characteristics, the peak amplitude of the correlation response, and the span confidence factor.
[0008] In some feasible embodiments, determining the regularization coefficient based on the global missing rate and local maximum missing rate of the OCT volume data includes: calculating the global missing rate, which is the ratio of the difference between the total number of physical scan positions and the number of valid frames to the total number of physical scan positions; calculating the local maximum missing rate, which is the minimum percentage of valid frames within each sliding window, wherein the sliding window slides along the scan sequence direction with a preset window length; determining an amplification coefficient based on a preset missing rate interval where the local maximum missing rate is located; and calculating the regularization coefficient, which is the product of the baseline regularization coefficient and the amplification coefficient.
[0009] In some feasible embodiments, the decomposition of the absolute displacement into a terrain trend component and a jitter component includes: interpolating to obtain a grid displacement sequence, the grid displacement sequence being the sequence of the absolute displacement interpolated to an equally spaced physical grid; fitting a polynomial, the polynomial being obtained by fitting a preset order within a neighborhood window centered on each grid point on the equally spaced physical grid, the coefficients of the polynomial being solved by least squares; calculating the terrain trend component, the terrain trend component being the fitted value of the polynomial at the center point; interpolating the terrain trend component from the equally spaced physical grid back to the original physical scan position; and calculating the jitter component, the jitter component being the difference between the absolute displacement and the terrain trend component after interpolation back to the original physical scan position.
[0010] In some feasible embodiments, applying axial translation correction and resampling to the frame images of the effective frames using the jitter component as the axial translation correction amount includes: applying a first pass of axial translation correction to the frame images of each effective frame according to the jitter component to generate intermediate images of each effective frame; measuring the residual displacement, where the residual displacement is the axial displacement between the intermediate images of adjacent frames; solving the residual displacement field, where the residual displacement field is obtained by global weighted least squares adjustment; calculating the standard deviation of the residual displacement field; when the standard deviation is less than a preset threshold, superimposing the residual displacement field and the jitter component as the axial translation correction amount to perform the resampling; and when the standard deviation is greater than or equal to the preset threshold, performing the resampling using the jitter component as the axial translation correction amount.
[0011] In some feasible embodiments, before performing the resampling by superimposing the residual displacement field and the jitter component as an axial translation correction amount when the standard deviation is less than a preset threshold, the method further includes: when the local maximum missing rate reaches a preset upper limit of missing rate, turning off the measurement of the residual displacement and the solution of the residual displacement field, and performing the resampling by using the jitter component as an axial translation correction amount.
[0012] In some feasible embodiments, constructing a valid frame set based on the target frame image includes: determining a target frame pair, wherein the target frame pair is a frame pair in which the subsequent frame number is greater than the previous frame number and the frame number difference does not exceed a preset span threshold, and the target frame pair is used to perform the inter-frame axial displacement measurement; determining a refined frame pair, wherein the refined frame pair is a frame pair in which the subsequent frame number is greater than the previous frame number and the frame number difference does not exceed a refined span threshold, and the refined frame pair is used to perform residual displacement measurement, and the refined span threshold is less than the preset span threshold; and determining multiple frame pairs in the valid frame set based on the target frame pair and the refined frame pair.
[0013] In some feasible embodiments, measuring the inter-frame axial displacement between the two valid frames constituting the frame pair includes: calculating a normalized cross-power spectrum, which is obtained based on the Fourier transform of the images of the two valid frames constituting the frame pair; calculating the axial displacement measurement value of the entire image region, where the entire image region is the image region of the two valid frames constituting the frame pair, and the axial displacement measurement value of the entire image region is determined based on the peak position of a correlation function, which is obtained by performing an inverse Fourier transform on the normalized cross-power spectrum; dividing the image into sub-blocks, where each sub-block is a non-overlapping region obtained by dividing the images of the two valid frames constituting the frame pair into equal horizontal intervals of a predetermined number; calculating the axial displacement measurement value of each sub-block, where the axial displacement measurement value of each sub-block is determined based on the peak position of the correlation function corresponding to the sub-block; and calculating the inter-frame axial displacement of the frame pair, where the inter-frame axial displacement of the frame pair is the median of the axial displacement measurement value of the entire image region and the axial displacement measurement value of the sub-block.
[0014] In some feasible embodiments, the reconstructed and corrected OCT volume data includes: dividing the scan sequence into multiple sub-segments with consecutive missing segments as boundaries, wherein the length of the consecutive missing segments exceeds a preset length threshold; performing the normal equation of global weighted least squares adjustment on each sub-segment to obtain the absolute displacement of the effective frames within the sub-segment; determining the overall offset of each sub-segment relative to a reference based on the mean difference of the layer lines in the overlapping areas of adjacent sub-segments, wherein the reference is the first sub-segment and the layer line is the depth position line of the retinal layer structure in the axial direction; and reconstructing and correcting the OCT volume data after performing global rigid body alignment on each sub-segment.
[0015] In some feasible embodiments, measuring the inter-frame axial displacement between the two valid frames constituting the frame pair includes: extracting feature points from the images of the two valid frames constituting the frame pair to obtain feature point matching pairs; calculating the matching distance ratio of the feature point matching pairs, wherein the matching distance ratio is the ratio of the nearest neighbor matching distance to the second nearest neighbor matching distance; retaining the feature point matching pairs when the matching distance ratio is less than a preset ratio threshold; calculating the axial difference, wherein the axial difference is the difference between the axial coordinates of the feature points in the later frame and the axial coordinates of the corresponding feature points in the previous frame among the two valid frames constituting the frame pair; determining inliers, wherein the inliers are matching pairs whose axial difference deviates from the median of the axial differences of all retained feature point matching pairs within a preset inlier threshold; and calculating the inter-frame axial displacement of the frame pair based on the axial difference of the inliers, wherein the inter-frame axial displacement is the mean of the axial differences of each inlier.
[0016] As can be seen from the above technical solutions, this application provides a method for correcting axial motion artifacts in OCT volumetric data. The method uses frame pairs in the effective frame set as measurement units, constructs multi-scale inter-frame displacement measurements with limited span along the scanning sequence direction, and weights the inter-frame displacement measurements by the in-point statistical characteristics, the peak amplitude of the correlation response, and the physical span. The regularization coefficient is adaptively adjusted with the global missing rate and the local maximum missing rate. Global weighted least squares adjustment is used to place all inter-frame displacement measurements under the same objective function, solve the absolute displacement of all effective frames at once, and distribute the measurement error evenly in the global range rather than accumulating in a chain along the scanning sequence. Layer structure drift and tilt no longer appear at the end of the scanning sequence. After the absolute displacement is decomposed into topographic trend components and jitter components, only the jitter component is used as the axial translation correction amount. The real anatomical topography such as the physiological concavity of the optic disc is completely preserved in the correction. The adaptive regularization driven by bad frames, the double-pass refinement of the threshold decision, and the segmented registration of long missing segments jointly ensure stable convergence under high missing rate environment. The three-dimensional volumetric data restores the physical continuity and smoothness of the retinal layer structure in the axial direction. Attached Figure Description
[0017] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating the OCT volumetric data axial motion artifact correction method provided in this application embodiment; Figure 2 This is a schematic diagram illustrating the construction of target frame pairs in the valid frame set provided in the embodiments of this application; Figure 3 A comparison diagram of a region C-Scan view provided for an embodiment of this application; Figure 4 Another C-Scan view comparison diagram of the region provided in the embodiments of this application; Figure 5 A comparison of C-Scan views of a region under extreme conditions provided for embodiments of this application; Figure 6 A C-Scan view comparison diagram of another region under extreme conditions provided in the embodiments of this application. Detailed Implementation
[0019] The 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 numbers in different drawings represent the same or similar elements. The embodiments described in the following examples do not represent all embodiments consistent with this application.
[0020] This application is used in the post-processing of images after volume data acquisition of a target area using ophthalmic OCT imaging equipment. The target area includes retinal regions such as the optic disc and macula, and can also extend to areas such as the anterior segment. The volume data imaging scene can be constructed using frame-by-frame scanning. The processing object of this application is OCT volume data, which is acquired frame-by-frame along the scanning sequence direction. The processing action involves performing axial motion artifact correction on the volume data in the post-processing stage after acquisition, without involving optical path adjustment, scanning timing control, or eye movement compensation at the acquisition end.
[0021] Registration methods based on vascular features in frontal fundus projection or simultaneous fundus photography rely on reference images other than volumetric data. Hardware real-time eye-tracking technology actively tracks fundus features during acquisition to compensate for eye movements at the acquisition end. Neither method relies on the layered structure information of the volumetric data itself for registration at the post-processing end, which differs from the application scenario of this application. The method of this application can be used to correct volumetric data that exhibits axial relative displacement in the scanning sequence direction due to subject movement, signal attenuation, or hardware trigger loss.
[0022] Taking the acquisition and post-processing workflow of OCT volume data in the visual disc area as an example, the OCT device is set with N along the scanning sequence direction. total At each physical scan location, a two-dimensional grayscale tomographic image, or C-Scan image, is acquired. The horizontal direction of the C-Scan image is the fast axis, corresponding to the arrangement direction of the axial scan lines within that physical scan location. The vertical direction is the axial direction, i.e., the depth direction, which is the dimension to be registered. The C-Scan images from all physical scan locations are arranged in the scan sequence to form three-dimensional volume data, which is used for quantitative analysis of retinal layer structure, three-dimensional reconstruction, and visualization of continuous side views.
[0023] During data acquisition, eye movements cause relative axial displacement between adjacent frames. Opacity of the refractive media or obstruction of the incident signal by deep tissues leads to localized signal attenuation. Abnormal trigger synchronization causes hardware trigger loss. These factors cause some frames to be identified as bad or missing frames by the external quality control module. After acquisition, the volume data enters the post-processing stage for axial motion artifact correction.
[0024] When performing axial motion artifact correction on volumetric data, a pairwise registration method calculates the normalized cross-power spectrum phase correlation or spatial gray-level cross-correlation of adjacent C-Scan images. The relative axial displacement between the two frames is obtained through the position of the correlation peak. Then, the absolute displacement of each frame is obtained by chain accumulation along the scanning sequence. The frames are then translated in reverse according to the absolute displacement. A frame-to-frame geometric transformation estimation method based on feature point matching, a registration method guided by vascular features of fundus reference images, and a hardware method for actively compensating for eye movements at the acquisition end all mitigate motion artifacts from different aspects.
[0025] The displacement measurement in the above-mentioned frame-by-frame registration method is based on a single frame pair and a single region. There is no global consistency constraint between inter-frame displacement measurements. The displacement estimation is passed frame by frame along the scanning sequence. The error of any measurement enters the absolute displacement of subsequent frames and is amplified frame by frame in the chain accumulation. At the end of the scanning sequence, retinal layer structure drift and tilt appear. When smoothing is applied to this type of method to suppress motion jitter, the absolute displacement includes both motion-induced jitter and the undulations of real anatomical terrain along the scanning sequence direction, such as physiological optic disc cupping. Smoothing smooths both, making the optic disc cupping shallower in the corrected volume data, and distorting the quantitative analysis of terrain. Bad frames or missing frames cause the displacement measurement between adjacent frames to lose its direct observation object. Chain accumulation is forced to cross the missing region, and the interpolation error increases synchronously with the increase of the missing length. The layer structure on both sides of the missing segment is misaligned. Therefore, the axial motion artifact correction of OCT volume data needs to solve three aspects at the same time: error chain accumulation, real terrain preservation, and missing data completion.
[0026] To address the aforementioned issues, this application provides a method for correcting axial motion artifacts in OCT volumetric data. The method described herein employs multi-span redundant measurement, confidence weight allocation, adaptive regularization of missing rate, global weighted least squares adjustment, decoupling of terrain trend and jitter, and secure double-pass refinement to construct a processing flow from inter-frame displacement measurement to volumetric data reconstruction. Figure 1 As shown, the OCT volume data axial motion artifact correction method provided in this application embodiment includes the following steps S101-S108.
[0027] S101: Acquire multiple target frame images.
[0028] The target frame image is the image corresponding to the physical scan position of the OCT volume data in the scanning sequence direction. Each target frame image is a two-dimensional grayscale image. The horizontal direction of the image is the arrangement direction of the axial scan lines in each frame image. The axial direction of the image is the dimension to be registered. Each target frame image corresponds to known physical scan coordinates.
[0029] The physical scan coordinates record the physical position of the frame in the scan sequence direction. In one embodiment, the physical scan coordinates are represented by the frame number. In subsequent steps, the physical span of the frame pair is calculated based on the difference in the physical scan coordinates of the two valid frames. The global missing rate and the local maximum missing rate are statistically analyzed based on the physical scan position. The calculation of the span confidence factor and the regularization coefficient both depend on the continuous calibration of the physical scan coordinates.
[0030] The target frame image is acquired by reading the volume data output by the OCT device. The volume data stores two-dimensional grayscale images of each physical scan position in the scanning order. During reading, the quality control markers for each frame from the external quality control module are acquired simultaneously. These markers are used to identify bad or missing frames for subsequent construction of a valid frame set. The target frame image uses the layer structure information of the volume data itself as the measurement object, without requiring a reference image outside the volume data.
[0031] In one embodiment, after acquiring the target frame image, the image is subjected to proportional scaling and logarithmic transformation: the scaling factor s1 is set to 0.5, and proportional scaling is performed on the image; after scaling, the image is then... A logarithmic transformation is performed, which stretches the grayscale levels in dark areas to improve contrast in areas with weak texture. Proportional scaling reduces the computational cost of a single measurement, while the logarithmic transformation further stretches the grayscale levels in dark areas, improving the phase correlation response in these regions. All subsequent measurements are performed in the scaled image space, and the measured bits are removed and restored to the original pixel scale using a scaling factor s1. Integer peak localization provides integer pixel displacements, and sub-pixel precision is obtained by interpolating or fitting the neighborhood of the correlation function peak, refining the result to the sub-pixel level based on the integer peak values.
[0032] Specifically, define the scaling factor. With s1 set to 0.5, the scaled image is as follows: ; in, This is the scaled image of the i-th frame. Let be the original image of the i-th frame, and x and y be the x and y coordinates of the original image. , These are the x and y coordinates of the scaled image. This is the scaling factor.
[0033] After applying the logarithmic transformation, the image is as follows: ; in, This is the scaled image of the i-th frame. , These are the x and y coordinates of the scaled image.
[0034] For volumetric data with significant differences in image quality between frames, the scaling factor in the preprocessing stage can be adaptively determined based on the frame signal-to-noise ratio. A larger scaling factor is used for frames with a signal-to-noise ratio lower than a preset threshold to retain more grayscale levels, while a uniform downsampling ratio is maintained for frames with sufficient signal-to-noise ratio to control the computational load. Alternatively, a limited contrast adaptive histogram equalization can be superimposed after scaling to enhance weak texture areas with excessively low local contrast.
[0035] The above processing improves the peak amplitude of the correlation response of low-quality frames. Combined with the confidence weight allocation involving the peak amplitude of the correlation response in subsequent steps, the measurements of low-quality frames will be deweighted in the global adjustment even if they are retained, thus preventing measurement noise from entering the absolute displacement solution.
[0036] S102: Based on the target frame image, construct a set of valid frames.
[0037] The original acquired OCT volume data has a total of N in the scanning sequence direction. total The physical scan locations constitute the original universal set index U={1,2,…,N} total Due to eye movement, signal attenuation, or hardware trigger loss, some frames are identified as bad or missing frames by the external quality control module, and their set is denoted as B. After removing bad or missing frames from the original complete set U, the remaining frames constitute the valid frame set V = U / B, and the number of valid frames N = |V|. Frame pairs in the valid frame set consist of two valid frames, and the frame number difference between the two valid frames in the frame pair in the scanning sequence direction does not exceed a preset span threshold.
[0038] Limiting the frame number difference to a preset span threshold restricts inter-frame displacement measurement to a span within which the image content remains correlated. When the span is too large, the difference in retinal layer structure between two frames increases, and tissue deformation caused by eye movement and blood flow accumulates between frames, weakening and broadening the correlation function peak, thus reducing the reliability of displacement measurement. The preset span threshold strikes a balance between measurement coverage and measurement reliability; measurement combinations with insufficient reliability are excluded during the construction phase and do not proceed to subsequent measurement and adjustment stages.
[0039] In some embodiments, constructing a valid frame set includes determining target frame pairs and refined frame pairs: target frame pairs are frame pairs where the subsequent frame number is greater than the previous frame number and the frame number difference does not exceed a preset span threshold, and the target frame pairs are used to perform inter-frame axial displacement measurement; refined frame pairs are frame pairs where the subsequent frame number is greater than the previous frame number and the frame number difference does not exceed a refined span threshold, and the refined frame pairs are used to perform residual displacement measurement, and the refined span threshold is less than a preset span threshold; based on the target frame pairs and refined frame pairs, multiple frame pairs in the valid frame set are determined.
[0040] Inter-frame displacement measurement employs a fixed neighborhood, forward, multi-span strategy, constructing only frame pairs where the subsequent frame number is greater than the preceding frame number, ensuring that the same frame pair is not measured repeatedly. In one embodiment, a preset span threshold of 3 is used, meaning that adjacent frame pairs, frame pairs separated by one frame, and frame pairs separated by two frames are measured. The i-th frame, together with the (i+1), (i+2), and (i+3)-th frames, constitutes the target frame pair. The three span frame pairs provide redundant coverage of the same scan sequence: adjacent frame pairs provide baseline observations of displacement, and frame pairs separated by two frames provide backup observations when adjacent frame pairs fail to measure due to local signal attenuation. The absolute displacement of the same frame is constrained by measurements across multiple spans, preventing gross errors from a single frame pair from dominating the global adjustment results.
[0041] like Figure 2 As shown, taking a valid frame set containing frames 1 to 8 and a preset span threshold of 3 as an example, the target frame pairs are constructed in a forward multi-span manner: For frame 1, the frames whose frame number difference does not exceed 3 in its subsequent frames are frame 2, frame 3, and frame 4, thus forming three target frame pairs (frame 1, frame 2), (frame 1, frame 3), and (frame 1, frame 4), with frame number differences of 1, 2, and 3 respectively; similarly, frame 2 forms three target frame pairs (frame 2, frame 3), (frame 2, frame 4), and (frame 2, frame 5); the remaining valid frames are constructed according to the same rules. Figure 2 The solid arcs represent the three target frame pairs of frame 1, and the dashed lines represent the target frame pairs (frame 2, frame 3) of frame 2 with a span of 1. The other target frame pairs are represented similarly.
[0042] The refinement span threshold is less than the preset span threshold, which is set to 2 in one embodiment. The refinement frame pair is only used in the double refinement stage to measure the residual displacement between adjacent frames after the first correction. The magnitude of the residual displacement is smaller than the initial displacement, and a smaller span can cover it. Reducing the refinement span threshold can reduce the number of measurements in the refinement stage and reduce the computational overhead.
[0043] S103: Measure the inter-frame axial displacement between the two valid frames constituting the frame pair to obtain multiple inter-frame displacement measurement values.
[0044] In inter-frame axial displacement measurement, each inter-frame displacement measurement corresponds to a relative displacement constraint in the global adjustment. The quantity and quality of measurements determine the accuracy of the global adjustment solution. Inter-frame axial displacement measurement can employ a block phase correlation method combining the whole image and sub-blocks, or a feature point matching method. It can also switch to execution when the peak value of the block phase correlation fails.
[0045] In some embodiments, the inter-frame axial displacement is measured using a block-based phase correlation method: The normalized cross-power spectrum is calculated based on the Fourier transform of the images of the two valid frames constituting the frame pair; the axial displacement measurement of the entire image region is then calculated, where the entire image region is the image region of the two valid frames constituting the frame pair, and the axial displacement measurement of the entire image region is determined based on the peak position of the correlation function, which is obtained by performing an inverse Fourier transform on the normalized cross-power spectrum; the image pair is divided into sub-blocks, which are non-overlapping regions obtained by dividing the images of the two valid frames constituting the frame pair into equal horizontal sections at a predetermined interval; the axial displacement measurement of each sub-block is calculated based on the peak position of the correlation function corresponding to the sub-block; the inter-frame axial displacement of the frame pair is the median of the axial displacement measurement of the entire image region and the axial displacement measurement of the sub-blocks.
[0046] Let the scaled images of the two valid frames that constitute the frame pair be respectively and The normalized cross power spectrum is given by the following formula: ; in, The normalized cross-power spectrum, where u and v are frequency domain coordinates. For Fourier transform, To prevent division by zero, for example, take a small constant, such as 1 × 10⁻⁶. -6 .
[0047] Performing an inverse Fourier transform on the normalized cross-power spectrum yields the correlation function. The location of the peak value of the correlation function is the measured value of the axial displacement in that region. See the following formula: ; in, This is the reference x-coordinate of the sub-block in the horizontal direction. The coordinates are the axial search direction coordinates.
[0048] The entire image region provides a global estimate of the frame-to-frame displacement, but local lesions, large blood vessel shadows, or strongly reflective areas within the entire image region can cause the peak position of the correlation function to deviate from the true displacement. Dividing the image horizontally into K sub-blocks and combining them with the entire image yields measurements for K+1 regions. The median is taken as a robust estimate of the inter-frame axial displacement, as shown in the following equation: ; in, Let be the inter-frame axial displacement of frame pair (i,j). These are the axial displacement measurements for the entire map area. Here are the axial displacement measurements for each sub-block, K is the number of sub-blocks, and Median(·) is the median value.
[0049] The median is not sensitive to gross errors in individual sub-blocks. Even when the peak values in individual sub-blocks are inaccurate due to weak texture or lesions, the median estimate remains stable. The entire image region and K sub-blocks form a multi-region redundant measurement for the same frame. The measurements of each region are fused using the median to output a single displacement estimate.
[0050] In one embodiment, K is 5; the preset quantity is a positive integer, which can be between 3 and 10, and must ensure that the width of each sub-block is sufficient to perform phase correlation. Sub-blocks are divided according to equally spaced boundaries, the width of the sub-blocks is uniform, and adjacent sub-blocks are connected end to end and do not overlap.
[0051] In one embodiment, the inter-frame axial displacement measurement is subject to validity constraints: the phase correlation peak response must be no less than 0.05, there must be at least 3 in-cell points with a standard deviation of less than 2 pixels, and the inter-frame absolute displacement must not exceed 60 pixels. Measurements exceeding these constraints are considered invalid and will not be included in subsequent confidence weight allocation. Invalid measurements are eliminated at the observation layer, blocking gross errors from entering the global adjustment process.
[0052] In some embodiments, the feature point matching method is used to measure the inter-frame axial displacement: feature points are extracted from the images of the two valid frames that constitute a frame pair to obtain feature point matching pairs; the matching distance ratio of the feature point matching pairs is calculated, which is the ratio of the nearest neighbor matching distance to the second nearest neighbor matching distance; when the matching distance ratio is less than a preset ratio threshold, the feature point matching pairs are retained; the axial difference is calculated, which is the difference between the axial coordinates of the feature points in the later frame and the corresponding axial coordinates of the feature points in the previous frame in the two valid frames that constitute a frame pair; and the inlier is determined, which is a matching pair whose axial difference deviates from the median of the axial differences of all retained feature point matching pairs within a preset inlier threshold.
[0053] After extracting feature points using scale-invariant feature transformation and completing the initial matching, the Lowe ratio test is used to screen feature point matching pairs. The matching distance ratio is the ratio of the nearest neighbor matching distance to the second nearest neighbor matching distance. If the matching distance ratio is less than a preset ratio threshold, the feature point matching pair is retained, as shown in the following formula: ; in, The nearest neighbor matching distance, The next nearest neighbor matching distance. This is a preset ratio threshold.
[0054] Let the set of qualified matching point pairs be... ,in, Let x and y be the x and y coordinates of the m-th feature point in the first frame. These are the x and y coordinates of the corresponding matching feature points in the second frame.
[0055] Next, calculate the axial difference for each feature point matching pair. The axial difference is the difference between the axial coordinates of the feature point in the next frame and the axial coordinates of the corresponding feature point in the previous frame, as shown in the following formula: ; in, The axial difference of the matching pair of the m-th feature point. Let m be the axial coordinate of the m-th feature point in the next frame. The axial coordinates of the corresponding feature point in the previous frame.
[0056] The average of the axial differences between all interior points is taken as the inter-frame axial displacement, as shown in the following formula: ; in, Let be the inter-frame axial displacement of frame pair (i,j). Let be the set of interior points. The number of interior points, This represents the axial difference between the matching pairs of the m-th feature point.
[0057] The set of interior points satisfies Where h is the set of axial differences for all preserved feature point matching pairs. The median of the axial differences. This is the preset interior point threshold.
[0058] Feature point matching is used as an alternative to block phase correlation method. Feature points can be extracted using scale-invariant feature transformation or local feature extraction methods with scale invariance, such as accelerated robust features.
[0059] In one embodiment, a preset ratio threshold is used. A threshold of 0.75 is used to retain only matching pairs whose nearest neighbor distance is significantly smaller than the second nearest neighbor distance, while ambiguous matches with insufficient descriptor discrimination are eliminated. An inlier threshold of 3-5 pixels is preset, and the average axial difference of the inlier points is used as the inter-frame axial displacement. The feature point matching method can still establish correspondences even with large inter-frame displacements or local nonlinear deformations, complementing the block phase correlation method: the block phase correlation method has low computational cost and is sensitive to overall translation, while the feature point matching method is highly adaptable to local deformations. The two methods switch according to the measurement state of the frame pair, ensuring the usability of the observation layer under different image conditions.
[0060] S104: Determine the confidence weight of the inter-frame displacement measurement value based on the measurement reliability statistical characteristics, correlation response peak amplitude, and physical span corresponding to the inter-frame displacement measurement value.
[0061] Before inter-frame displacement measurements are included in the global adjustment, confidence weights must be assigned. Measurement reliability statistics characterize the number and dispersion of valid measurement points in the inter-frame displacement measurement; the peak amplitude of the correlation response reflects the signal strength of the correlation response during the measurement; and the physical span is the absolute value of the difference between the physical scan coordinates of the two valid frames constituting the frame pair. These three factors each characterize the reliability of the same measurement from different perspectives, and the confidence weights unify them into a single scalar. The global adjustment allocates the contribution of each measurement to the absolute displacement solution according to its confidence weight.
[0062] In some embodiments, determining the confidence weight includes: determining the inliers participating in the inter-frame displacement measurement, wherein the inliers are measurement points whose axial coordinate differences deviate from the median within a preset inlier threshold, and the median is the median of the axial coordinate differences of all measurement points; calculating the measurement reliability statistical characteristics based on the number of inliers and the inlier standard deviation; obtaining the peak amplitude of the correlation response corresponding to the inter-frame displacement measurement value; calculating the span confidence factor, which is the reciprocal of the sum of the physical span and the division-to-zero constant; and calculating the confidence weight of the inter-frame displacement measurement value, wherein the confidence weight is the product of the measurement reliability statistical characteristics, the peak amplitude of the correlation response, and the span confidence factor.
[0063] The median is used as the benchmark for determining inlier points. The median is unaffected by individual gross error measurement points. Deviation determination, centered on the median and with a preset inlier threshold as tolerance, excludes gross error measurement points from the inlier set. The inlier set represents the valid measurement points that meet the consistency requirements for the measurement. The statistical characteristics of measurement reliability consist of the number of inlier points and the standard deviation of the inlier points. A larger number of inlier points indicates more valid measurement points supporting the measurement, while a smaller standard deviation indicates better consistency among the valid measurement points.
[0064] In one embodiment, the statistical characteristics of measurement reliability are taken as follows: ,in, This represents the number of inliers involved in the confidence weight calculation during the inter-frame displacement measurement. Let be the interior standard deviation, and ε be a small constant to prevent division by zero.
[0065] Peak amplitude of the correlation response The strength of the peak value of the correlation function in the frame pair measurement is considered. A stronger peak value indicates a more realistic correlation between the two frames at the corresponding displacement, while measurements at weak peak values are more likely to originate from noise. The span confidence factor is taken as... ,in The physical span is two frames. To prevent division by zero, a constant is used, for example, 0.5. For frame pairs with smaller frame number differences, the difference in layer structure between the two frames is smaller, and the reliability of the displacement measurement is higher. The span confidence factor causes the weight to decrease along the direction of increasing span. The confidence weight is formed by multiplying the three factors, as shown in the following formula: ; in, As confidence weights, This represents the number of inliers involved in the confidence weight calculation during the inter-frame displacement measurement. Let be the interior standard deviation, and ε be a small constant to prevent division by zero. The peak amplitude of the relevant response. for The physical span is two frames. To prevent division by zero of constants.
[0066] Measurements with more interior points, smaller dispersion, stronger peaks, and shorter spans receive higher weights, while unreliable measurements are automatically downweighted, eliminating the need to set separate reliability criteria for each measurement.
[0067] The following example illustrates this step using a specific implementation scenario: In the scanning sequence of OCT volume data in the visual disc region, the frame pair consisting of frames 100 and 101 spans a region of vitreous opacity. The correlation peak amplitude of this frame pair is only 0.06, and two of the five sub-blocks are inaccurate due to weak texture peaks. The number of inliers involved in the measurement is 4, and the standard deviation of the inliers is 1.8 pixels. The frame pair consisting of frames 100 and 102 is located in a region with a clear layer structure. The correlation peak amplitude is 0.85, the number of inliers is 6, and the standard deviation of the inliers is 0.4 pixels. According to the above formula, the confidence weight of the former is approximately 0.05, while that of the latter is approximately 12.7, a difference of more than two orders of magnitude. After entering global adjustment, the influence of the measurement of weak signal frame pairs on the absolute displacement solution is compressed to a negligible level. Reliable measurements in regions with clear layer structures dominate the adjustment results, and the measurement noise of single frame pairs no longer propagates downstream in the sequence.
[0068] To address the issue of a generally low number of valid measurement points in high-missing-rate volumetric data, a preset inlier threshold is adaptively broadened based on the missing rate. In one embodiment, the preset inlier threshold is... ,in, The baseline in-point threshold is set within the range of 2-5 pixels; for example, 3.0 pixels. The global missing rate, This represents the local maximum missing rate.
[0069] The higher the missing rate, the sparser the effective measurement points. Judging by a fixed inlier threshold will cause a large number of usable measurements to be discarded as a whole. Insufficient observations will in turn worsen the stability of global adjustment. Adaptively relaxing the inlier threshold achieves a balance between the number of measurements and measurement reliability. After relaxation, the retained measurements are still constrained by the product of the three confidence weights. Measurements with insufficient reliability will be downweighted even if they are retained. In conjunction with the confidence weight allocation mechanism, this further solves the problem of insufficient effective observations in the context of high missing rate.
[0070] S105: Determine the regularization coefficient based on the global missing rate and the local maximum missing rate of the OCT body data.
[0071] The normal equation for global weighted least squares adjustment includes a smoothing regularization term. The regularization coefficient determines the trade-off between fitting inter-frame displacement measurements and maintaining the smoothness of the displacement sequence in the adjustment solution. Bad or missing frames are not uniformly distributed in the scan sequence. For two volumes of data with the same global missing rate, the impact of concentrated versus uniform distribution of missing frames on adjustment stability differs significantly. The regularization coefficient must reflect both the total amount of missing frames and the degree of concentration of missing frames. The global missing rate is determined based on the number of valid frames and the total number of physical scan positions, while the local maximum missing rate is determined by the minimum proportion of non-valid frames within a window sliding along the scan sequence direction.
[0072] In some embodiments, determining the regularization coefficient includes: calculating the global missing rate, which is the ratio of the difference between the total number of physical scan positions and the number of valid frames to the total number of physical scan positions; calculating the local maximum missing rate, which is the minimum proportion of invalid frames within each sliding window, wherein the sliding window slides along the scan sequence direction with a preset window length; determining the amplification coefficient based on the preset missing rate interval where the local maximum missing rate is located; and calculating the regularization coefficient, which is the product of the baseline regularization coefficient and the amplification coefficient.
[0073] The global missing rate reflects the overall intensity of missing data in the volume. It is the following formula: ; Where N is the number of valid frames. This represents the total number of physical scan locations.
[0074] Local maximum missing rate reflects the intensity of the most severe continuous missing segment in the scanned sequence. See the following formula: ; Where L is the preset window length, the window slides position by position along the scanning sequence direction, and the minimum percentage of valid frames within each window is taken; t is the starting frame position of the sliding window along the scanning sequence direction, and t takes values from 1 to N. total -L+1.
[0075] In one embodiment, the magnification factor is based on The preset missing rate range is 0.1-0.5. The value is 1.0. Take 1.2 at this time. Take 1.5 at a time. The value is taken as 1.8; the regularization coefficient λ is the product of the baseline regularization coefficient λ0 and the amplification factor, and is given in the following formula: ; in, The base regularization coefficient is 0.1-10.
[0076] ; in, This is a balance coefficient, for example, ranging from 0.1 to 10, with a baseline of 1. This represents the total number of inter-frame displacement measurements. The average measurement weight is given by N, where N is the number of valid frames and N-2 is the number of second-order differences. To measure the typical standard deviation of the residuals, the unit is pixels. It is the typical standard deviation of the second-order difference of the displacement, in pixels.
[0077] The baseline regularization coefficient is related to the magnitude of the measurement weights, the number of inter-frame displacement measurements, and the number of valid frames. In one embodiment, the weight matrix W is first normalized so that the typical value of the weights is 1, and then the ratio of the number of inter-frame displacement measurements to the number of valid frames is used. The typical scale λ0 for the second-order difference of displacement is determined, with λ0 ranging from 0.1 to 10. The higher the missing rate, the sparser the available inter-frame displacement measurements, and the larger the condition number of the coefficient matrix of the normal equation. Increasing the regularization coefficient can improve the positive definiteness of the coefficient matrix, suppress the oscillation of the adjustment solution near the missing segment, and keep the displacement of the missing segment continuous under the smoothing constraint.
[0078] In one embodiment, the interval division of the amplification coefficient can be replaced with a continuous form, where the interval amplification coefficient is replaced with a continuous function that monotonically increases along the direction of increasing local maximum missing rate, such as a regularization coefficient. ,in, The baseline regularization coefficient is denoted by , and c and k1 are preset positive constants, with k1 taking values between 1 and 3. Continuous processing can eliminate jumps in the regularization coefficient at interval boundaries, and volume data with missing rates close to the interval boundaries maintain consistent adjustment behavior between adjacent batches, establishing a continuous mapping between regularization strength and missing value strength.
[0079] S106: Using the axial displacement of the effective frames as the unknown quantity, solve the normal equation of global weighted least squares adjustment based on the inter-frame displacement measurement value, confidence weight and regularization coefficient to obtain the absolute displacement of all effective frames.
[0080] Let the axial displacement of effective frame i be z. i The axial displacements of all valid frames constitute the vector to be determined, z = [z1, z2, ..., zN]. T The m-th inter-frame displacement measurement corresponds to the frame pair (i,j), and a measurement matrix is constructed. With observation vector In the m-th row of A, The remaining elements are zero; the m-th element of b is the inter-frame displacement measurement value of that frame pair. Each row of the measurement matrix represents an inter-frame relative displacement constraint. These measurements together form a relative observation network for the axial displacement of all valid frames.
[0081] Based on the relative observation network, a smoothing regularization constraint is introduced to construct a second-order difference matrix. In the k-th row of D, Each row of the second-order difference matrix represents the curvature constraint of the displacements of three adjacent frames. The smaller the second-order difference of the displacement sequence, the smoother the displacement curve. The second-order difference needs to be constructed for three consecutive frames. The matrix D has N-2 rows. The first and last frames are not used as the difference center points, but they appear in the difference elements of the first and last rows, respectively. The smoothing regularization term forms an indirect constraint on the first and last frames.
[0082] Construct the objective function, which includes a weighted measurement term, a smoothing regularization term, and a damping term, as shown in the following equation: ; in, Let W be the objective function of the globally weighted least squares adjustment, and let W be the weight matrix with confidence weights as diagonal elements. Let z be the measurement matrix, z be the axial displacement vector to be determined for each valid frame, and b be the observation vector. Here, μ is the regularization coefficient, D is the second-order difference matrix, and μ is the damping term coefficient, for example, 1×10. -8 The damping term ensures that the coefficient matrix remains invertible even when the measurement is extremely sparse. The objective function is a convex quadratic function, and the optimal solution satisfies the normal equation, as shown below: ; in, This represents the absolute displacement vectors of all valid frames obtained through global weighted least squares adjustment. The transpose of the measurement matrix is given by W, which is a weight matrix with confidence weights as diagonal elements. For the measurement matrix, The regularization coefficient is . Let be the transpose of the second-order difference matrix, D be the second-order difference matrix, μ be the damping coefficient, I be the identity matrix with the same dimension as the displacement vector z, and b be the observation vector.
[0083] All inter-frame displacement measurements and smoothing regularization constraints are incorporated into the same set of equations, solving for the absolute displacement of all valid frames in one go. In the chain accumulation method, the absolute displacement of the k-th frame is obtained frame by frame from the measurements of the previous k-1 frames. The error of a single measurement is continuously accumulated along the propagation path, and the error amplitude increases monotonically along the sequence. In the global weighted least squares adjustment, the absolute displacement of each frame is determined by all inter-frame displacement measurements related to it. The error of a single measurement is distributed to the global solution according to its confidence weight. The error is evenly distributed globally rather than accumulated in a chain along the scan sequence, and layer structure drift and tilt no longer appear at the end of the scan sequence.
[0084] The following example illustrates a specific implementation scenario: In a certain OCT volumetric dataset, the effective frame count is N=300, and the target frame pairs are approximately 880. One frame pair has a gross error of +5 pixels due to a local lesion. The confidence weight of this frame pair is reduced to the order of one percent of the reliable measurement. In the chain-accumulation method, this gross error is directly incorporated into the absolute displacement of all subsequent frames. If the gross error appears at the beginning of the sequence, the structural position at the end of the sequence is synchronously shifted by 5 pixels. In the global weighted least squares adjustment, the residual term corresponding to this measurement has an extremely low weight. It is covered by the constraints of surrounding reliable measurements in the normal equation, and its impact on the global solution is compressed to the sub-pixel level. Simultaneously, the smoothing regularization term uses second-order difference constraints to extrapolate the displacement curve in long missing regions, maintaining curvature continuity in the displacements on both sides of the missing segment. The adjustment solution maintains a smooth transition even in sparsely observed regions.
[0085] S107: Decompose the absolute displacement into terrain trend components and jitter components.
[0086] The absolute displacement obtained by global adjustment is superimposed with two types of components: one is the inter-frame jitter caused by eye movement, which has a high frequency and small amplitude; the other is the real topographic undulation of the retinal layer structure along the scanning sequence direction, which has a low frequency and large amplitude. The depression of the layer structure at the physiological concavity of the optic disc is a typical topographic undulation.
[0087] If reverse translation correction is performed directly using absolute displacement that includes terrain undulations, the real terrain will be smoothed out along with the jitter, resulting in a shallower visual disk concavity in the corrected volume data and distorted quantitative terrain analysis. The absolute displacement is decomposed into a terrain trend component and a jitter component. The terrain trend component represents low-frequency terrain undulations along the scanning sequence direction, while the jitter component is the difference between the absolute displacement and the terrain trend component. Subsequent corrections are performed only using the jitter component, thus decoupling terrain fidelity from jitter removal.
[0088] In some embodiments, decomposing the absolute displacement into a terrain trend component and a jitter component includes: interpolating to obtain a grid displacement sequence, the grid displacement sequence being the sequence of absolute displacements interpolated to equally spaced physical grids; fitting a polynomial, the polynomial being obtained by fitting a preset order within a neighborhood window centered on each grid point on equally spaced physical grids, the coefficients of the polynomial being solved using least squares; calculating the terrain trend component, the terrain trend component being the fitted value of the polynomial at the center point; interpolating the terrain trend component from the equally spaced physical grids back to the original physical scan position; and calculating the jitter component, the jitter component being the difference between the absolute displacement and the terrain trend component after interpolation back to the original physical scan position.
[0089] When bad or missing frames exist, the physical scan coordinates of the valid frames are discontinuous along the sequence direction. Direct filtering of the absolute displacement along the original physical position will be affected by the distribution of missing positions. Therefore, the absolute displacement is first interpolated to an equally spaced physical grid. The resulting grid displacement sequence is shown in the following equation: ; in, Let t be the equidistant physical grid point, i.e., the center point. It is a linear interpolation function. Let be the physical scan coordinates of the i-th valid frame. Let be the absolute displacement of the i-th valid frame. This represents the total number of points in the equally spaced physical grid, with the grid spacing being the physical spacing of the original scan sequence.
[0090] Interpolation can be linear, and Savitzky-Golay filtering can be performed on an equally spaced grid: for each center point Fit a p-order polynomial within a neighborhood window of width 2M+1, as shown in the following equation: ; in, Center point The fitted polynomial is q, where q is the power of the polynomial. Let be the coefficient of the q-th term. is the horizontal coordinate on the equally spaced physical grid, and p is the polynomial order, i.e., the preset order.
[0091] The polynomial coefficients are solved using least squares, and the fitted values at the center points are obtained. for A special case when q=0, namely the value of the polynomial at the center point, which is the topographic trend value at that point.
[0092] Savitzky-Golay filtering approximates the signal polynomially within the fitting window, preserving low-frequency fluctuations at the neighborhood window scale while filtering out high-frequency jitter below the window scale. Polynomial fitting results in less distortion of peak and valley shapes compared to moving average. The terrain trend on the grid is then inversely interpolated back to the original physical scan position to obtain the terrain trend components for each valid frame. See the following formula: ; in, For the terrain trend component of the i-th valid frame, For grid points Topographic trend value at the location, Let be the physical scan coordinates of the i-th valid frame.
[0093] The jitter component is given by the following formula: ; in, This represents the jitter component of the i-th valid frame, i.e., the axial translation correction amount. Let be the absolute displacement of the i-th valid frame. Let be the terrain trend component of the i-th valid frame.
[0094] In one embodiment, M is set to 45 and p to 3, corresponding to a window length of 2M+1=91. p can be between 2 and 5, and M can be between 20 and 60. The window length must be an odd number and not exceed the number of frames in the sequence. The parameter selection rules are as follows: the steeper the viewport terrain, the smaller M should be or the larger p should be to preserve the true edge shape of the depression; the stronger the motion jitter, the larger M should be or the smaller p should be to remove the jitter more thoroughly; when the number of frames is small, M should be reduced accordingly. In practice, M can be selected within the range of 30-50 and p 3 to balance terrain preservation and jitter removal.
[0095] The following example illustrates this step in a specific implementation scenario: A optic disc scan sequence traverses a physiological depression along the nasal to temporal direction. The layered structure at the depression is sunken by approximately 40 pixels, and the terrain on both sides of the depression is gentle. If a moving average is applied to the absolute displacement and the result is used as a correction, the depression is treated as motion error compensation. After correction, the depression depth is less than half of the original depth, distorting the indicators in quantitative terrain analysis that rely on the depression depth. Using the decomposition method described in this step, the Savitzky-Golay filter with M=45 and p=3 smoothly outputs the low-frequency terrain trend across the depression. The depression morphology is completely preserved in the terrain trend component, and the jitter component amplitude is within ±3 pixels. After decomposing the absolute displacement into the terrain trend component and the jitter component, they belong to different frequency bands in terms of frequency and amplitude. After correcting only the jitter component, the depression depth remains unchanged, the inter-frame layered structure breakage disappears, and the anatomical morphology relied upon for quantitative terrain analysis remains consistent before and after correction.
[0096] The neighborhood window length and polynomial order can be adaptively determined according to the steepness of the terrain. In one embodiment, a decomposition is first performed with the default window and order to calculate the maximum slope of the terrain trend component along the scanning sequence direction. When the maximum slope of the terrain trend component exceeds a preset slope threshold, the window length is reduced or the polynomial order is increased, and the decomposition is performed again until the maximum slope falls within the preset slope range. Steep terrain regions may be smoothed by polynomial smoothing under fixed parameters. Adaptive decomposition can reduce the risk of real concave edges being mistakenly removed as jitter, and can further ensure the fidelity of the real dissected terrain.
[0097] S108: Using the jitter component as the axial translation correction amount, apply axial translation correction to the frame image of the effective frame and resample to reconstruct the corrected OCT volume data.
[0098] For each valid frame i, with jitter components The axial translation transformation is constructed and resampled as the axial translation correction amount. The corrected image is as follows: ; in, For the corrected i-th frame image, To correct the image of the i-th frame, This is the jitter component of the i-th valid frame, i.e., the axial translation correction amount.
[0099] Resampling employs bilinear interpolation. After frame-by-frame translation correction and resampling, the corrected images are arranged according to the physical scan coordinates of each frame, and the corrected OCT volume data is reconstructed. The volume data restores the physical continuity and smoothness of the retinal layer structure along the axis. The correction measures the jitter component rather than the absolute displacement that includes topographic trend components, so topographic undulations such as physiological cupping of the optic disc are fully preserved after correction.
[0100] In some embodiments, applying axial translation correction and resampling includes: applying a first pass of axial translation correction to the frame images of each valid frame based on the jitter component to generate an intermediate image of each valid frame; measuring the residual displacement, which is the axial displacement between the intermediate images of adjacent frames; solving the residual displacement field, which is obtained by global weighted least squares adjustment; calculating the standard deviation of the residual displacement field; when the standard deviation is less than a preset threshold, superimposing the residual displacement field and the jitter component as the axial translation correction amount for resampling; when the standard deviation is greater than or equal to the preset threshold, using the jitter component as the axial translation correction amount for resampling.
[0101] The first pass of correction eliminates most motion jitter, but residual displacements ranging from sub-pixels to several pixels may still exist between intermediate images. The residual displacement is then remeasured for intermediate images of adjacent frames, using the same method as for inter-frame axial displacement, with the frame pairs used being refined frames. The residual displacement field is solved using global weighted least squares adjustment, with the solution process consistent with that for absolute displacement. The confidence weights and regularization coefficients are either reused from the first pass or re-determined based on the measurement status of the intermediate images.
[0102] The standard deviation of the residual displacement field reflects the overall intensity of the residual jitter after the first correction. Calculate using the following formula: ; Where N is the number of valid frames. The residual displacement of each valid frame. This represents the mean of the residual displacement.
[0103] When the value is less than the preset threshold, the first correction is sufficient and the residual displacement field is reliable. The residual displacement field is then superimposed with the jitter component to perform the second compensation. When the residual displacement measurement is greater than or equal to the preset threshold, the reliability is insufficient, and forced superposition will introduce erroneous convergence. In this case, the first result should be retained, as shown in the following formula: ; in, To finally correct the displacement, Let r be the jitter component and r be the residual displacement field. The standard deviation of the residual displacement field. This is a preset threshold.
[0104] In one embodiment, the preset threshold is set to 3.0 pixels. The threshold decision ensures that double-pass refinement is only accepted when the residual error is sufficiently small, thus preventing erroneous convergence in areas with insufficient information. The first pass of correction, residual displacement measurement, threshold decision, and resampling reconstruction constitute a closed-loop process.
[0105] Furthermore, when the local maximum missing rate reaches the preset upper limit of the missing rate, the measurement of residual displacement and the solution of residual displacement field are turned off, and resampling is performed using the jitter component as the axial translation correction amount.
[0106] In one embodiment, the preset upper limit of the missing rate is set to 0.5, and the second round of refinement is forcibly turned off when the local maximum missing rate reaches 0.5. If adjacent valid frames in long missing regions are too far apart physically, the residual displacement measurement between intermediate images loses its layer structure correspondence, making the measurement results unreliable. Directly turning off the second round of refinement can avoid erroneous convergence.
[0107] In some embodiments, the reconstructed and corrected OCT volume data includes: dividing the scan sequence into multiple sub-segments with consecutive missing segments as boundaries, wherein the length of the consecutive missing segments exceeds a preset length threshold; performing the normal equation of global weighted least squares adjustment on each sub-segment to obtain the absolute displacement of the effective frames within the sub-segment; determining the overall offset of each sub-segment relative to the reference based on the mean difference of the layer lines in the overlapping areas of adjacent sub-segments, wherein the reference is the first sub-segment and the layer line is the depth position line of the retinal layer structure in the axial direction; and reconstructing and correcting the OCT volume data after performing global rigid alignment on each sub-segment.
[0108] In segments where the length of consecutive missing segments exceeds a preset length threshold, there are no valid frame pairs. Inter-frame displacement measurements across these segments cannot be established, and global adjustment relies solely on extrapolation using a smoothing regularization term. The extrapolation error increases synchronously with the increase in missing segment length. The scan sequence is divided into multiple sub-segments using the long missing segment as the boundary. Each sub-segment independently performs the normal equation for global weighted least squares adjustment. The adjustment within a sub-segment does not cross the long missing segment and is unaffected by extrapolation errors. The overall offset between sub-segments is determined by the difference in the mean values of the layer lines in the overlapping region: adjacent sub-segments retain an overlapping region on each side of the long missing segment. This overlapping region represents the valid frame region on both sides of the missing segment. The depth position of the retinal layer lines within the overlapping region is extracted along the axial direction. The difference in the mean values of the layer lines between two adjacent sub-segments is calculated; this difference represents the overall offset of the subsequent sub-segment relative to the reference sub-segment. The reference is the first sub-segment. Apply a criterion to all valid frames within the s-th sub-segment. The global rigid body translation, after each segment is axially aligned to a unified datum, reconstructs the body data, as shown in the following formula: ; in, Let Δs be the axial displacement of the i-th valid frame in the s-th sub-segment, and let Δs be the overall offset of the s-th sub-segment relative to the reference sub-segment. This is the set of valid frame indices contained in the s-th subsegment.
[0109] In one embodiment, the preset length threshold can be a fixed value or a proportional value based on the total number of physical scan positions, such as 5% of the total. Both methods are acceptable. If the preset length threshold is too small, segment division becomes frequent, leading to accumulated alignment errors between segments and increased computational load. If the preset length threshold is too large, long missing segments are still filled in by global adjustment extrapolation, resulting in decreased accuracy of the filled displacement. The preset length threshold is determined by balancing the missing data distribution with the required segment alignment accuracy.
[0110] Furthermore, the displacement of the missing frame position is filled in using linear interpolation: for any missing frame k, find the nearest valid frame before and after it. and The complete displacement is shown in the following formula: ; in, The padding offset for the missing frame k. The final corrected offset is the position of the nearest valid frame before the missing frame k. This represents the final correction offset for the nearest valid frame after the missing frame k. The frame number of the most recent valid frame before the missing frame k. These are the frame numbers of the most recent valid frames.
[0111] The terrain trend component and the jitter component are interpolated in the same way to maintain the consistency of the signal decomposition structure. After completion, a complete displacement sequence covering all physical scan positions is obtained.
[0112] The grayscale image with missing frames can be completed by linear fusion of the corrected images from the preceding and following valid frames, as shown in the following formula: ; in, The image is the completed image of the missing frame k, where ω is the linear fusion weight. The image is the corrected version of the most recent valid frame before the missing frame k. This is the image after correction of the most recent valid frame after the missing frame k.
[0113] The linearly fused and completed image is only used for visualization of continuous side views. During formal quantitative analysis, the missing frame positions are left as pure black placeholders, without falsifying the original data. When reconstructing volume data, the positions of bad frames are filled with interpolated images when the completion function is enabled, and filled with pure black images when the completion function is disabled.
[0114] After frame-by-frame resampling, a complete volume data V is generated. Bad frame positions are filled with pure black by default (interpolated images are used when completion is enabled). The volume data is filled frame-by-frame according to the following rules: ; in, The image after correction for the kth valid frame. This is the completed image for the missing frame k, where H is the number of pixel rows along the axial (depth) direction of the frame image. This represents the number of pixels in the horizontal direction of the image.
[0115] The following example illustrates a specific implementation scenario: The global missing rate of a certain OCT volumetric data set reaches 20%, and a continuous missing segment causes a local maximum missing rate of 90%. After dividing the data according to a preset length threshold, two sub-segments are formed on either side of this long missing segment. Each sub-segment undergoes independent global weighted least squares adjustment, and there are no extrapolation errors across measurements within the missing segment. After determining the overall offset based on the difference in the layer mean values of the overlapping area between the two sub-segments and completing global rigid body alignment, the layer structure maintains consistent depth and position on both sides of the missing segment. The second pass of refinement is forcibly disabled at this local maximum missing rate, and the correction amount only takes the jitter component, avoiding the inclusion of unreliable measurements of residual displacement near the missing segment in the correction amount.
[0116] The corrected OCT volume data can be used to quantitatively evaluate the registration effect without a reference index. In one embodiment, the axial envelope signal of the corrected image of each effective frame is defined. The axial envelope signal is the distribution of the mean gray level along the horizontal direction of the frame image with respect to the axial depth, as shown in the following formula: ; in, Let be the axial envelope signal of the corrected image of the i-th valid frame at the axial depth y. This represents the number of pixels in the horizontal direction of the image. This is the grayscale value of the i-th frame image at coordinates (x, y) after correction.
[0117] Calculate the normalized cross-correlation function of the envelope signals of adjacent frames. s is the axial offset; the residual jitter index is the mean of the absolute values of the peak offsets of the cross-correlation functions of each effective adjacent frame pair, as shown in the following formula: ; in, Let be the normalized cross-correlation function of the envelope signals of frame i and frame i+1 at the axial offset s, and let P be the set of effective adjacent frame pairs. The number of valid adjacent frame pairs, This represents the axial offset corresponding to the peak value of the cross-correlation function.
[0118] Before registration, the residual jitter index was relatively large. After registration, the index dropped to below the preset threshold. Based on this, the success or failure of registration can be automatically and quantitatively judged without relying on any reference image, and the verification of the correction effect can be embedded into the automatic quality inspection link of the clinical process.
[0119] like Figure 3 As shown, Figure 3 In the middle 3a, it is a C-Scan view of the original OCT volume data acquired in a certain scanning area. The retinal layer structure shows misalignment and distortion due to axial motion artifacts. Figure 33b is a C-Scan view of the same region after correction using the method of this application, showing that the layer structure restores physical continuity and smoothness in the axial direction.
[0120] like Figure 4 As shown, Figure 4 4a is a C-Scan view of the original OCT volume data acquired in another scanning area. The layer structure in this area shows obvious wavy distortion and breakage due to eye movement. Figure 4 4b is a C-Scan view of the same region after correction using the method of this application. The distorted layer structure is straightened and the continuity at the fracture is restored.
[0121] The above comparison shows that the method of this application solves all inter-frame displacement measurements at once under the same objective function by global weighted least squares adjustment, eliminating the problem of chain accumulation of errors along the scanning sequence in the pair-by-pair registration method; at the same time, after decomposing the absolute displacement into terrain trend components and jitter components, only the jitter components are used for correction, and the real anatomical terrain such as the physiological concavity of the optic disc is completely preserved after correction, thus achieving decoupling of motion jitter removal and real terrain fidelity preservation.
[0122] like Figure 5 As shown, Figure 5 In the image 5a, the original C-Scan view of a certain scan area of the body data shows that the retinal layer structure is misaligned and distorted due to axial motion artifacts. Figure 5 Figure 5b shows a C-Scan view of the same region after correction by the method of this application. The horizontal stripes in the figure correspond to the positions of missing frames, and the effective frame layer structures on both sides of the missing frames are continuously aligned in the axial direction.
[0123] like Figure 6 As shown, Figure 6 In the middle 6a, the original C-Scan view of another scan area of the body data is shown. The layer structure shows obvious wavy distortion due to eye movement. Figure 6 In Figure 6b, the C-Scan view of the same region is corrected using the method of this application. The distorted layer structure is straightened, and the layer structures on both sides of the long missing segment maintain consistent depth and position after global rigid body alignment.
[0124] in, Figure 3 3b and Figure 4 4b represents the result under the condition that there are no missing values. Figure 5 5b and Figure 6 The results in 6b are under the extreme conditions of a global deletion rate of 20% and a maximum local deletion rate of 90%.
[0125] The comparison under the above extreme missing conditions shows that when the length of consecutive missing segments exceeds a preset length threshold, the method of this application divides the scanning sequence into multiple sub-segments with the long missing segment as the boundary. Each sub-segment independently performs global weighted least squares adjustment and then completes global rigid body alignment by the difference in the mean difference of the layer lines in the overlapping area, thus avoiding the accumulation of extrapolation errors in the long missing segment of the global adjustment. At the same time, when the local maximum missing rate reaches the preset upper limit of the missing rate, the second round of refinement is forcibly turned off, and the jitter component is used as the axial translation correction amount to avoid the inclusion of unreliable residual displacement measurements near the missing segment in the correction amount. Therefore, even under the extreme conditions of a global missing rate of 20% and a local maximum missing rate of 90%, the method of this application can still restore the physical continuity and smoothness of the retinal layer structure in the axial direction.
[0126] Through steps S101-S108 above, inter-frame displacement measurement forms redundant observations using multi-span frame pairs. Confidence weights quantify the measured inlier statistical characteristics, correlation response peak amplitude, and physical span in a unified manner. Regularization coefficients are adaptively adjusted according to the global missing rate and the local maximum missing rate. Global weighted least squares adjustment places all observations under the same objective function to solve for the absolute displacement of all valid frames at once. After decomposition, the absolute displacement is corrected only with jitter components and refined twice through threshold decision. The problems of error chain accumulation, real terrain fidelity, and missing data completion are solved within the same processing flow. The three-dimensional volume data restores the physical continuity and smoothness of the retinal layer structure along the axis.
[0127] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A method for correcting axial motion artifacts in OCT volumetric data, characterized in that, include: Multiple target frame images are acquired. Each target frame image is an image corresponding to the physical scanning position of OCT volume data in the scanning sequence direction. Each target frame image is a two-dimensional grayscale image. The horizontal direction of the target frame image is the arrangement direction of the axial scan lines in each frame image, the axial direction is the dimension to be registered, and the target frame image corresponds to known physical scan coordinates. Based on the target frame image, a set of valid frames is constructed. The set of valid frames includes multiple frame pairs. Each frame pair consists of two valid frames from the set of valid frames. The difference in frame number between the two valid frames in the frame pair in the scanning sequence direction does not exceed a preset span threshold. Measure the inter-frame axial displacement between the two valid frames that constitute the frame pair to obtain multiple inter-frame displacement measurement values; The confidence weight of the inter-frame displacement measurement value is determined based on the measurement reliability statistical characteristics, the peak amplitude of the correlation response, and the physical span corresponding to the inter-frame displacement measurement value. The measurement reliability statistical characteristics characterize the number and dispersion of the effective measurement points of the inter-frame displacement measurement, and the physical span is the absolute value of the difference between the physical scan coordinates of the two effective frames constituting the frame pair. The regularization coefficient is determined based on the global missing rate and the local maximum missing rate of the OCT volume data; the global missing rate is determined based on the number of valid frames and the total number of physical scan positions, and the local maximum missing rate is determined based on the minimum proportion of non-valid frames within the window sliding along the scan sequence direction. Using the axial displacement of the effective frames as the unknown quantity, the normal equation of global weighted least squares adjustment is solved based on the inter-frame displacement measurement value, confidence weight and regularization coefficient to obtain the absolute displacement of all effective frames. The absolute displacement is decomposed into terrain trend components and jitter components; The terrain trend component represents the low-frequency terrain undulations along the scanning sequence direction, and the jitter component is the difference between the absolute displacement and the terrain trend component. Using the jitter component as the axial translation correction amount, the frame image of the effective frame is subjected to axial translation correction and resampled to reconstruct the corrected OCT volume data.
2. The OCT volumetric data axial motion artifact correction method according to claim 1, characterized in that, The step of determining the confidence weight of the inter-frame displacement measurement value based on the measurement reliability statistical characteristics, correlation response peak amplitude, and physical span corresponding to the inter-frame displacement measurement value includes: The in-frame displacement measurement is determined by identifying the in-frame displacement points, where the axial coordinate difference deviates from the median within a preset in-frame displacement threshold. The median is the median of the axial coordinate differences of all measurement points. Based on the number of inliers and the standard deviation of the inliers, the statistical characteristics of measurement reliability are calculated. Obtain the peak amplitude of the correlation response corresponding to the inter-frame displacement measurement value; Calculate the span confidence factor, which is the reciprocal of the sum of the physical span and the division-to-zero constant; Calculate the confidence weight of the inter-frame displacement measurement, whereby the confidence weight is the product of the measurement reliability statistical characteristics, the peak amplitude of the correlation response, and the span confidence factor.
3. The method for correcting axial motion artifacts in OCT volumetric data according to claim 1, characterized in that, The step of determining the regularization coefficient based on the global missing rate and local maximum missing rate of the OCT volume data includes: Calculate the global missing rate, which is the ratio of the difference between the total number of physical scan locations and the number of valid frames to the total number of physical scan locations; Calculate the local maximum missing rate, which is the minimum percentage of invalid frames within each sliding window, wherein the sliding window slides along the scanning sequence direction with a preset window length; The amplification factor is determined based on the preset missing rate range in which the local maximum missing rate is located; Calculate the regularization coefficient, which is the product of the baseline regularization coefficient and the amplification coefficient.
4. The OCT volumetric data axial motion artifact correction method according to claim 1, characterized in that, The process of decomposing the absolute displacement into terrain trend components and jitter components includes: Interpolation yields a grid displacement sequence, which is the sequence of absolute displacements interpolated to equally spaced physical grids; A fitting polynomial is obtained by fitting a preset order onto the equally spaced physical grid, with each grid point as the center within a neighborhood window, and the coefficients of the polynomial are solved by least squares. Calculate the terrain trend component, which is the fitted value of the polynomial at the center point; The terrain trend component is interpolated back to the original physical scan position from the equally spaced physical grid; Calculate the jitter component, which is the difference between the absolute displacement and the terrain trend component after interpolation back to the original physical scan position.
5. The OCT volumetric data axial motion artifact correction method according to claim 1, characterized in that, The step of applying axial translation correction and resampling to the frame image of the effective frame using the jitter component as the axial translation correction amount includes: Based on the jitter components, a first pass of axial translation correction is applied to the frame image of each valid frame to generate an intermediate image of each valid frame. Measure the residual displacement, which is the axial displacement between intermediate images of adjacent frames; The residual displacement field is solved by the global weighted least squares adjustment. Calculate the standard deviation of the residual displacement field; When the standard deviation is less than a preset threshold, the residual displacement field and the jitter component are superimposed as the axial translation correction amount to perform the resampling; When the standard deviation is greater than or equal to the preset threshold, the resampling is performed using the jitter component as the axial translation correction amount.
6. The OCT volumetric data axial motion artifact correction method according to claim 5, characterized in that, Before performing the resampling by superimposing the residual displacement field and the jitter component as the axial translation correction amount when the standard deviation is less than a preset threshold, the method further includes: When the local maximum missing rate reaches the preset missing rate upper limit, the measurement of the residual displacement and the solution of the residual displacement field are turned off, and the resampling is performed using the jitter component as the axial translation correction amount.
7. The method for correcting axial motion artifacts in OCT volumetric data according to claim 1, characterized in that, The construction of a valid frame set based on the target frame image includes: Determine a target frame pair, which is a frame pair in which the sequence number of the later frame is greater than the sequence number of the earlier frame and the difference between the frame numbers does not exceed a preset span threshold. The target frame pair is used to perform the inter-frame axial displacement measurement. A refined frame pair is determined, wherein the refined frame pair is a frame pair in which the sequence number of the later frame is greater than the sequence number of the earlier frame and the difference between the frame numbers does not exceed the refined span threshold. The refined frame pair is used to perform the measurement of the residual displacement. The refined span threshold is less than the preset span threshold. Based on the target frame pair and the refined frame pair, multiple frame pairs in the valid frame set are determined.
8. The method for correcting axial motion artifacts in OCT volumetric data according to claim 1, characterized in that, The measurement of the inter-frame axial displacement between the two valid frames constituting the frame pair includes: Calculate the normalized cross-power spectrum, which is obtained based on the Fourier transform of the images of the two valid frames constituting the frame pair; Calculate the axial displacement measurement value of the entire image region, where the entire image region is the image region of the two valid frames constituting the frame pair. The axial displacement measurement value of the entire image region is determined based on the peak position of the correlation function, which is obtained by performing an inverse Fourier transform on the normalized cross-power spectrum. Divide the image into sub-blocks, where each sub-block is a non-overlapping region obtained by dividing the images of the two valid frames constituting the frame pair into equal intervals along the horizontal direction according to a preset number. The axial displacement measurement value of the sub-block is calculated, and the axial displacement measurement value of the sub-block is determined based on the peak position of the correlation function corresponding to the sub-block; Calculate the inter-frame axial displacement of the frame pair, where the inter-frame axial displacement of the frame pair is the median of the axial displacement measurement of the entire image region and the axial displacement measurement of the sub-block.
9. The method for correcting axial motion artifacts in OCT volumetric data according to claim 1, characterized in that, The reconstructed and corrected OCT volume data includes: The scan sequence is divided into multiple sub-segments using consecutive missing segments as boundaries, wherein the length of the consecutive missing segments exceeds a preset length threshold. The normal equations of global weighted least squares adjustment are applied to each of the sub-segments to obtain the absolute displacement of the effective frames within the sub-segments; Based on the difference in the mean value of the layer lines in the overlapping areas of adjacent sub-segments, the overall offset of each sub-segment relative to the reference is determined. The reference is the first sub-segment, and the layer line is the depth position line of the retinal layer structure in the axial direction. After performing global rigid body alignment on each segment, the corrected OCT volume data is reconstructed.
10. The method for correcting axial motion artifacts in OCT volumetric data according to claim 1, characterized in that, The measurement of the inter-frame axial displacement between the two valid frames constituting the frame pair includes: Feature points are extracted from the images of the two valid frames that constitute the frame pair to obtain feature point matching pairs; Calculate the matching distance ratio of the feature point matching pairs, where the matching distance ratio is the ratio of the nearest neighbor matching distance to the second nearest neighbor matching distance; When the matching distance ratio is less than a preset ratio threshold, the feature point matching pair is retained; Calculate the axial difference, which is the difference between the axial coordinates of the feature point in the latter frame and the axial coordinates of the corresponding feature point in the former frame among the two valid frames constituting the frame pair. Determine the inlier, which is a matching pair whose axial difference deviates from the median of the axial differences of all retained feature point matching pairs within a preset inlier threshold. Based on the axial difference of the inner points, the inter-frame axial displacement of the frame pair is calculated, and the inter-frame axial displacement is the average of the axial differences of each inner point.
