OCT optical distortion correction method based on deep learning, medium and equipment
By automatically learning the distortion features of OCT images through the U-Net deep learning network, the problem of imaging distortion caused by optical distortion in OCT imaging is solved. It achieves high-precision and low-complexity distortion correction, is applicable to a variety of imaging environments, and improves the automation and efficiency of OCT equipment.
Patent Information
- Application Number
- CN202511405936.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-29
AI Technical Summary
In existing OCT imaging technologies, optical distortion leads to distorted imaging results, affecting measurement accuracy and reliability. Traditional distortion correction methods have poor adaptability in complex environments and high computational complexity.
By employing deep learning-based convolutional neural networks, especially the U-Net network, and through adaptive convolutional layers and weighted loss functions, distortion features are automatically learned and a nonlinear mapping relationship is established between the coordinates of the marked points and the undistorted marked points, thereby achieving automated correction of optical distortion.
It improves the accuracy and efficiency of distortion correction, reduces computational complexity, is highly adaptable, is suitable for complex imaging environments, and enhances the automation level and working efficiency of OCT equipment.
Smart Images

Figure CN120876334A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical distortion correction technology, and in particular to a deep learning-based OCT optical distortion correction method, medium, and device. Background Technology
[0002] Optical coherence tomography (OCT), a high-precision optical imaging method, is widely used in medical imaging, industrial inspection, materials science, and other fields, playing a particularly important role in precision geometric measurement and internal defect detection. OCT technology utilizes the coherence of light to achieve high-resolution depth imaging and non-destructively acquire information about the internal structure of objects. However, in practical applications, OCT is often affected by optical distortion, leading to distorted imaging results and severely impacting the accuracy and reliability of measurements. Therefore, employing effective distortion correction methods to address the distortion problem in OCT imaging is crucial.
[0003] Currently, traditional distortion correction methods for optical distortion in OCT imaging are typically based on calibration using optical distortion parameters. While these methods can achieve distortion correction to some extent, their accuracy and stability are often limited. For example, traditional methods may result in unsatisfactory correction effects when dealing with complex distortion types, and they also have high computational complexity. Furthermore, these methods usually rely on manual calibration and parameter adjustments, making them difficult to adapt to changes in different imaging environments and equipment, thus limiting their adaptability and application scenarios. Summary of the Invention
[0004] To address one of the aforementioned technical problems, the present invention adopts the following technical solution: According to one aspect of the present invention, a deep learning-based OCT optical distortion correction method is provided, the method comprising the following steps: The distorted calibration plate image obtained using the OCT imaging unit to be corrected is input into the target convolutional neural network to generate the corrected calibration plate image. Based on the difference between the pixel coordinates corresponding to each calibration point in the distorted calibration board image and the corrected calibration board image, the corrected pixel difference corresponding to each calibration point is generated; the corrected pixel difference includes horizontal pixel difference and vertical pixel difference; Based on the transformation relationship between the pixel coordinate system and the OCT coordinate system, the corrected pixel difference corresponding to each calibration point is transformed into the scan position correction difference corresponding to each calibration point; the scan position correction difference includes the horizontal scan position correction difference and the vertical scan position correction difference; Based on the transformation relationship between the OCT coordinate system and the optical galvanometer driving voltage, the scanning position correction difference corresponding to each calibration point is converted into the X-axis driving compensation voltage and Y-axis driving compensation voltage corresponding to each calibration point. The driving voltage of the optical galvanometer in the OCT imaging unit to be calibrated is corrected using the X-axis drive compensation voltage and Y-axis drive compensation voltage corresponding to each calibration point.
[0005] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the aforementioned deep learning-based OCT optical distortion correction method.
[0006] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned deep learning-based OCT optical distortion correction method.
[0007] This invention has at least one of the following beneficial effects: The technical solution of this invention introduces deep learning networks, especially convolutional neural networks (CNNs), to process the coordinates of distorted marker points. The network structure employs a multi-layered CNN, including multiple adaptive convolutional layers, pooling layers, and fully connected layers. During training, known distorted marker images and their corresponding standard undistorted marker images are used, and supervised learning is employed to optimize the network parameters. This ensures that the network can automatically learn the distortion features and establish a non-linear mapping relationship between the coordinates of distorted and undistorted marker points. This non-linear mapping relationship can stably generate the corrected pixel difference corresponding to each calibration point, significantly improving the accuracy and efficiency of distortion correction. Simultaneously, the application of deep learning networks automates and refines the distortion correction process, effectively solving the problems of insufficient accuracy, processing complexity, and poor stability in existing optical distortion correction techniques, demonstrating significant beneficial effects. Furthermore, compared to traditional methods relying on manual calibration and preset parameters, this invention avoids manual intervention, simplifies the entire process, and significantly reduces computational complexity.
[0008] Secondly, the technical solution of this invention has broad applicability in OCT imaging systems. Through a deep learning-based image distortion correction method, this invention can handle various types of optical distortion, exhibiting strong stability and robustness, especially in complex imaging environments.
[0009] Finally, the automated correction system designed in this invention significantly improves the automation level and efficiency of the optical distortion correction process, adapting to the batch and standardized operation requirements of OCT equipment. This system can automatically complete image correction without manual intervention, improving the overall system efficiency and making it particularly suitable for applications requiring large-scale production and high precision, such as medical imaging and industrial inspection. Overall, this invention not only optimizes the accuracy and efficiency of optical distortion correction but also promotes the further application and development of OCT technology in multiple fields. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating a deep learning-based OCT optical distortion correction method provided in an embodiment of the present invention; Figure 2 A schematic diagram of a U-Net network provided in an embodiment of the present invention; Figure 3 A schematic diagram of deformable adaptive convolutional kernels in the U-Net network provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the working principle of optical galvanometer-controlled scanning imaging provided in an embodiment of the present invention; Figure 5 This diagram illustrates a comparison of the effects of traditional distortion correction and the distortion correction based on deep learning proposed in this patent. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] Optical components in OCT equipment, such as lenses and optical path systems, can cause distortions in the geometric shape of the acquired images, primarily radial and tangential distortion. Radial distortion typically results in a sharper image in the center, while the edges appear stretched or shrunken; tangential distortion is commonly caused by tilting of the imaging system or optical path errors. Optical distortion severely affects image quality and the accuracy of subsequent measurements. Therefore, to ensure the accuracy and reliability of the data, effective distortion correction of the images is essential.
[0014] As one possible embodiment of the present invention, such as Figure 1 As shown, a deep learning-based OCT optical distortion correction method is provided, which includes the following steps: S100: Input the distorted calibration plate image obtained using the OCT imaging unit to be corrected into the target convolutional neural network to generate the corrected calibration plate image.
[0015] The target convolutional neural network can be a CNN (Convolutional Neural Network), with a multi-layered structure including multiple adaptive convolutional layers, pooling layers, and fully connected layers. During training, known distorted calibration board images and their corresponding standard distortion-free calibration board images are used to form training samples and labels. Supervised learning is employed to optimize the network parameters. Thus, through training the CNN, the network is ensured to automatically learn distortion features and establish a non-linear mapping between the coordinates of distorted and distortion-free marker points. In other words, it addresses how to correct distorted marker points at different locations in the image to their standard positions.
[0016] Specifically, such as Figure 2 and Figure 3 As shown, the target convolutional neural network in this embodiment includes a U-Net network. The standard convolutional kernels in the U-Net network are replaced with deformable adaptive convolutional kernels.
[0017] In the convolutional operations of traditional U-Net networks, the size and weights of the convolutional kernels are fixed (e.g., a standard 3×3 convolutional kernel). This type of network architecture is suitable for segmentation tasks of most regular, distortion-free images. However, when images are distorted (e.g., stretched or compressed in the X and Y directions), traditional convolution may not be able to effectively handle these changes and extract the corresponding distortion features. In this use case, in addition to the optical elements in the OCT device causing image distortion, the scanning components of the OCT device also exhibit reciprocating motion patterns of acceleration, constant speed, and deceleration along the scanning path during the scanning process. This leads to distortion (stretching or compression) caused by changes in motion state during the acceleration and deceleration phases. This distortion typically occurs along the scanning path, that is, it may appear in the horizontal direction (X direction) or the vertical direction (Y direction). Therefore, to adapt to the characteristics of this distortion, the traditional standard convolutional kernel needs to be replaced with a deformable adaptive convolutional kernel.
[0018] Adaptive convolution can handle image distortion using kernels of different scales. Especially in the X and Y directions of an image, distortion may manifest as stretching or compression. Adaptive convolution can adjust the scale of the kernel to make adaptive responses to different regions, thus better capturing local features. For example, when processing distortion in different regions of an image, the kernel can automatically scale according to the changes in the region, ensuring that feature extraction during the convolution process is not affected by differences in distortion in the X or Y directions. Therefore, the improved U-Net network in this embodiment can more accurately extract different distortion features in distorted images during training, thereby improving the model's final correction accuracy for distorted images.
[0019] In addition, the training images used in the training process are usually distorted calibration board images and their corresponding standard distortion-free calibration board images. In these training images, it is necessary to obtain the center coordinates of the image corresponding to each marker point in the calibration board image so that the model can learn.
[0020] Specifically, the pixel coordinates corresponding to each calibration point in the calibration board image are obtained according to the following steps: S101: Convert the calibration board image to a grayscale image to remove interference from color information and highlight the geometry of the calibration board.
[0021] S102: Gaussian filtering is used to smooth the grayscale image to reduce image noise interference and ensure that the outlines of the marker points are clearly visible.
[0022] S103: Use thresholding to convert the grayscale image into a binary image to clearly separate the marker points from the background area. Specifically, the grayscale threshold can be determined according to actual needs. Since there is a very obvious grayscale difference between the marker points and the background area, thresholding can be used to easily and quickly segment the image corresponding to the marker points.
[0023] S104: The least squares method is used to fit the edge data of the marked points in the grayscale image in order to optimize the coordinate position of the edge points.
[0024] Because OCT images (i.e., calibration board images with distortion) contain a certain degree of distortion, the least squares method is used to fit the edge data and optimize the coordinate positions of the edge points when extracting marker points, taking into account the impact of distortion on edge localization. Least squares fitting is used to fit an optimal continuous curve or straight line from a set of discrete, noisy edge points, and recalculate the precise position of each point accordingly, thereby obtaining more accurate, smoother, and more physically accurate coordinate positions of the marker points.
[0025] S105: Apply a contour detection algorithm to extract the edges of the marker points and calculate the center coordinates of the marker points.
[0026] Based on the aforementioned S101-S104 processing, contour detection algorithms (such as Canny, Sobel, Laplacian) are applied to extract the edges of the marked points and calculate their center coordinates.
[0027] Furthermore, the distortion in the OCT images used in this application exhibits spatially uneven distribution, particularly at the image edges where distortion is often more severe, while the distortion in the central region is relatively milder. To effectively handle these differences during distortion correction, traditional uniform loss functions cannot provide sufficiently fine-tuning. Correspondingly, this invention proposes a weighted loss function design, allowing the model to apply different levels of attention to different regions of the image during training, thereby achieving precise optimization of distortion in different regions.
[0028] Specifically, the loss function used in the training process of the target convolutional neural network is a weighted loss function, which satisfies the following conditions: .
[0029] Where L is the total loss, Loss(x,y) is the distortion error of the image at pixel (x,y), and W(x,y) is the weighting coefficient of the image at pixel (x,y).
[0030] W(x,y) is the key to enabling the model to apply different levels of attention to different regions of the image during the training process. The specific calculation method of W(x,y) can be any of the following three methods.
[0031] Firstly .
[0032] Where r is the radial distance from pixel (x, y) to the image center, and α and β are the first and second adjustment coefficients, respectively, used to control the weighting intensity of the loss function at different locations. By adjusting these two coefficients, the weighting ratio between the center and edge regions can be flexibly adjusted, ensuring that the network can effectively optimize distortion correction in all regions. α and β can be determined during model training.
[0033] Polar coordinate system transformation: To effectively identify different regions in an image, especially the edges and center, this invention transforms the image coordinates from Cartesian coordinates to polar coordinates. In polar coordinates, each pixel of the image can be described not only by radial distance (the distance from the image center to the pixel) but also by angle. This helps to clearly show the distribution characteristics of distortion at different locations, especially when the distortion varies radially.
[0034] Weighted Loss Allocation: By introducing a polar coordinate system, the loss weights are adjusted based on the radial distance of each pixel. Specifically, regions farther from the image center exhibit more pronounced distortion; therefore, these regions are assigned higher loss weights during training. This weighting strategy ensures that the network focuses more on the image edges during optimization, thereby achieving higher accuracy in distortion correction at edge regions.
[0035] This weighted loss scheme based on polar coordinates not only helps the network focus more on the edge regions with severe distortion when correcting distortion in OCT images, but also effectively improves the overall image correction accuracy, especially in cases of complex distortion distribution.
[0036] Secondly Replace with: .
[0037] Where (x0,y0) are the center coordinates of the image, (x,y) are the coordinates of any pixel in the image, and σ is the standard deviation of the distance between pixels, used to control the rate of weight decay.
[0038] Third Replace with: .
[0039] Where (x0, y0) are the center coordinates of the image, (x, y) are the coordinates of any pixel in the image, and σ x σ is the standard deviation of the horizontal distance between pixels. y It is the standard deviation of the distance between pixels in the vertical direction.
[0040] The weights calculated using the second and third methods also increase with distance from the center. The weights in the second method follow a Gaussian distribution, which better reflects the spatial distribution of distortions around the image center. The weights in the third method follow an elliptical distribution, σ... x and σ y By controlling the weight decay in the horizontal and vertical directions separately, the magnitude of the weights at different positions can be adjusted more flexibly, which can adapt to the distortion distribution of different shapes.
[0041] Before inputting the distorted calibration plate image acquired using the OCT imaging unit to be corrected into the target convolutional neural network in S100, the method further includes: S110: If the distortion degree of the distorted calibration plate image obtained by the OCT imaging unit to be corrected is greater than the preset distortion threshold, then the geometric correction method is used to perform preliminary correction processing on the distorted calibration plate image.
[0042] In this embodiment, the degree of distortion can be obtained as follows: draw a horizontal straight line at a certain marker point in the distorted calibration plate image, and take the number of marker points falling on the straight line as the degree of distortion, or calculate the distance from the row of marker points to the straight line as the degree of distortion.
[0043] To achieve better correction results, OCT images with severe geometric distortion are typically pre-processed using classic geometric correction methods before being input into a deep learning model. For trapezoidal distortion, homography transformation is used to adjust the trapezoidal regions of the image into rectangles; for nonlinear distortion, nonlinear transformation is used to further correct the image's geometric structure. After these preprocessing steps, most of the geometric distortion in the image is eliminated, providing a more standardized input for the subsequent training of the deep learning model.
[0044] S200: Based on the difference between the pixel coordinates corresponding to each calibration point in the distorted calibration board image and the corrected calibration board image, generate the corrected pixel difference corresponding to each calibration point. The corrected pixel difference includes horizontal pixel difference and vertical pixel difference.
[0045] S300: Based on the transformation relationship between the pixel coordinate system and the OCT coordinate system, the corrected pixel difference corresponding to each calibration point is converted into the scan position correction difference corresponding to each calibration point. The scan position correction difference includes the horizontal scan position correction difference and the vertical scan position correction difference.
[0046] S400: Based on the conversion relationship between the OCT coordinate system and the optical galvanometer driving voltage, the scanning position correction difference corresponding to each calibration point is converted into the X-axis driving compensation voltage and Y-axis driving compensation voltage corresponding to each calibration point.
[0047] The transformation relationship between pixel coordinate system (image coordinate system) and OCT coordinate system is as follows:
[0048] Where: X OCT and Y OCT The target coordinates in the OCT coordinate system, X grid and Y grid These are the original pixel coordinates. R01 and R11 are the rotation angle coefficients for transforming the image coordinate system to the OCT coordinate system, and Tx and Ty are the translation coefficients for transforming the image coordinate system to the OCT coordinate system.
[0049] The relationship between OCT coordinates and optical galvanometer voltage conversion is as follows:
[0050] Where VX0 and VY0 are the output voltages of the optical galvanometer after transformation in the X and Y directions, and s is a scaling factor used to adjust the scale of the coordinate system. It determines the proportional relationship between each unit in the OCT coordinate system and the corresponding unit in the optical galvanometer voltage coordinate system.
[0051] S500: Use the X-axis drive compensation voltage and Y-axis drive compensation voltage corresponding to each calibration point to correct the drive voltage of the optical galvanometer in the OCT imaging unit to be calibrated.
[0052] The image distortion correction method of this invention directly obtains a distortion correction mapping model through the reasoning ability of deep learning networks, rather than relying on traditional optical distortion equations and preset parameters. According to Figure 4The scanning imaging principle illustrated here involves transforming the pixel coordinate system in the image to the OCT coordinate system and establishing a relationship matrix between the X and Y coordinates of the OCT coordinate system and the output voltage of the optical galvanometer in the X and Y directions, thereby achieving correction. Specifically, firstly, image processing algorithms extract distortion features from the image and map them into the OCT coordinate system. Then, using a trained deep learning model, the output voltage of the optical galvanometer in the X and Y directions is corrected based on the mapping relationship between the input distortion coordinates and the output standard coordinates. This approach avoids manual intervention and complex parameter calibration, while improving the efficiency and accuracy of distortion correction.
[0053] Since the target convolutional neural network can correct images based on prior experience gained during training, the horizontal and vertical pixel distances between the same calibration point before and after correction represent the distortion direction and magnitude at that calibration point. Therefore, based on this corrected pixel difference, the distortion compensation amount corresponding to the distortion at that location can be obtained. Then, through coordinate system transformation, the distortion compensation amount corresponding to the scan position of the corresponding marker point in the OCT coordinate system, as well as the compensation amount corresponding to the optical galvanometer driving voltage, are obtained.
[0054] This method utilizes a deep learning model to predict "voltage pre-distortion (obtained by correcting pixel differences)," and then pre-adjusts the galvanometer's driving voltage to precisely offset this pre-distortion, ultimately correcting the OCT scan. It cleverly combines coordinate transformation with deep learning modeling to achieve end-to-end closed-loop correction from "observed distortion" to "control parameter adjustment." Instead of directly "repairing" distortion through post-processing on the image, it learns the relationship between "ideal image coordinates" and "required galvanometer voltage," and then adjusts the galvanometer's driving signal accordingly, thus generating a distortion-free image in the next scan. Specifically, the comparison results between the image corrected by the method proposed in this embodiment and the image corrected by the traditional Zhang Zhengyou calibration method are as follows: Figure 5 As shown in the figure, the image distortion correction effect of the correction method proposed in this embodiment is better.
[0055] As another embodiment of the present invention, after correcting the driving voltage of the optical galvanometer in the OCT imaging unit to be corrected using the X-axis driving compensation voltage and Y-axis driving compensation voltage corresponding to each calibration point in S500, the method further includes: S600: Compare the calibrated calibration plate image acquired by the calibrated OCT imaging unit with the distortion-free calibration plate image to generate the total loss error.
[0056] S700: Uses the error backpropagation mechanism to continue optimizing the target convolutional neural network model.
[0057] The total loss error Loss satisfies the following condition: .
[0058] Where λ1 and λ2 are weighting coefficients.
[0059] .
[0060] Among them, Loss 直线度 For straightness distortion error, m n C is the slope of the fitted line of the nth row of marker points in the calibrated image. n It is the intercept of the fitted line of the nth row marker point in the corrected calibration plate image, x i gtn and y i gtn is the position coordinate of the i-th marker in the n-th row of the calibration plate image after correction, and N is the number of markers.
[0061] .
[0062] Among them, Loss 平行度 For parallelism distortion error, m i and m j These are the slopes of the fitted lines corresponding to the i-th and j-th rows in the calibrated calibration plate image, respectively.
[0063] Ideally, if the correction is very effective, each row or column of calibration points on the calibration board should be strictly aligned on the same horizontal or vertical line, and the lines between different rows or columns should be parallel. However, correction often fails to achieve this effect, thus requiring the calculation of the loss. 直线度 and Loss 平行度 To conduct an evaluation.
[0064] Specifically, Loss 直线度 and Loss 平行度 All calculations are based on the calibrated calibration plate image. A straight line is fitted to each row in the calibrated calibration plate image, and the straightness of each row is determined by calculating the distance from each calibration point to the straight line. The parallelism is evaluated by calculating the difference in slope between any two rows.
[0065] .
[0066] Among them, Loss 像素坐标 x represents the pixel position error. i and y i The coordinates of the i-th marker point in the distortion-free calibration plate image are x. i gt and y i gtIt represents the position coordinates of the i-th marker point in the calibrated calibration plate image.
[0067] To further improve correction accuracy, this embodiment proposes an error assessment-based optimization strategy to re-optimize the target convolutional neural network, thereby performing a secondary correction on the corrected OTC imaging unit. Specifically, the geometric distortion and pixel position error are calculated by comparing the corrected image with the actual geometry of the calibration board (a standard distortion-free calibration board image). Geometric distortion is assessed by the difference in Euclidean distance between the corrected marker coordinates and the actual marker coordinates, while pixel position error is assessed by calculating the positional deviation of the marker points in the image. Based on these errors, the deep learning model is further optimized using an error backpropagation mechanism, aiming to minimize distortion error and pixel position deviation. The introduction of the error assessment and optimization mechanism further improves correction accuracy, minimizing the error between the corrected image and the actual geometry of the calibration board, ensuring high accuracy of the measurement results, and thus improving correction accuracy, stability, and reliability.
[0068] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0069] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0070] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0071] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as “circuit,” “module,” or “system.”
[0072] An electronic device according to this embodiment of the invention. The electronic device is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the invention.
[0073] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and buses connecting different system components (including memory and processor).
[0074] The memory stores program code that can be executed by a processor, causing the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.
[0075] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0076] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0077] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.
[0078] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0079] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the present invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the present invention described in the "Exemplary Methods" section above.
[0080] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0081] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0082] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0083] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0084] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0085] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0086] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A deep learning-based OCT optical distortion correction method, characterized in that, The method includes the following steps: The distorted calibration plate image obtained using the OCT imaging unit to be corrected is input into the target convolutional neural network to generate the corrected calibration plate image. Based on the difference between the pixel coordinates corresponding to each calibration point in the distorted calibration board image and the corrected calibration board image, a corrected pixel difference is generated for each calibration point; the corrected pixel difference includes horizontal pixel difference and vertical pixel difference. Based on the transformation relationship between the pixel coordinate system and the OCT coordinate system, the corrected pixel difference corresponding to each calibration point is transformed into the scan position correction difference corresponding to each calibration point; the scan position correction difference includes the horizontal scan position correction difference and the vertical scan position correction difference; Based on the transformation relationship between the OCT coordinate system and the optical galvanometer driving voltage, the scanning position correction difference corresponding to each calibration point is converted into the X-axis driving compensation voltage and Y-axis driving compensation voltage corresponding to each calibration point. The driving voltage of the optical galvanometer in the OCT imaging unit to be calibrated is corrected using the X-axis drive compensation voltage and Y-axis drive compensation voltage corresponding to each calibration point.
2. The method according to claim 1, characterized in that, The target convolutional neural network includes a U-Net network; In the U-Net network, the standard convolutional kernels are replaced with deformable adaptive convolutional kernels.
3. The method according to claim 1, characterized in that, The loss function during the training of the target convolutional neural network is a weighted loss function, which satisfies the following condition: ; Where L is the total loss, Loss(x,y) is the distortion error of the image at pixel (x,y), and W(x,y) is the weighting coefficient of the image at pixel (x,y). ; Where r is the radial distance from pixel (x,y) to the image center, and α and β are the first and second adjustment coefficients, respectively, used to control the weighting intensity of the loss function at different locations.
4. The method according to claim 3, characterized in that, Replace with: ; Where (x0,y0) are the center coordinates of the image, (x,y) are the coordinates of any pixel in the image, and σ is the standard deviation of the distance between pixels, used to control the rate of weight decay.
5. The method according to claim 3, characterized in that, Replace with: ; Where (x0, y0) are the center coordinates of the image, (x, y) are the coordinates of any pixel in the image, and σ x σ is the standard deviation of the horizontal distance between pixels. y It is the standard deviation of the distance between pixels in the vertical direction.
6. The method according to claim 2, characterized in that, After correcting the driving voltage of the optical galvanometer in the OCT imaging unit to be corrected using the X-axis and Y-axis driving compensation voltages corresponding to each calibration point, the method further includes: The image of the calibrated calibration plate obtained by the calibrated OCT imaging unit is compared with the image of the undistorted calibration plate to generate the total loss error. The target convolutional neural network is further optimized using the backpropagation mechanism. The total loss error Loss satisfies the following condition: ; Where λ1 and λ2 are weighting coefficients; ; Among them, Loss 直线度 For straightness distortion error, m n C is the slope of the fitted line of the nth row of marker points in the calibrated image. n It is the intercept of the fitted line of the nth row marker point in the corrected calibration plate image, x i gtn and y i gtn is the position coordinate of the i-th marker in the n-th row of the calibration plate image after correction, and N is the number of markers; ; Among them, Loss 平行度 For parallelism distortion error, m i and m j These are the slopes of the fitted lines corresponding to the i-th and j-th rows in the calibrated calibration plate image, respectively. ; Among them, Loss 像素坐标 x represents the pixel position error. i and y i The coordinates of the i-th marker point in the distortion-free calibration plate image are x. i gt and y i gt It represents the position coordinates of the i-th marker point in the calibrated calibration plate image.
7. The method according to claim 1, characterized in that, Before inputting the distorted calibration plate image acquired using the OCT imaging unit to be corrected into the target convolutional neural network, the method further includes: If the distortion degree of the calibration plate image obtained by the OCT imaging unit to be corrected is greater than the preset distortion threshold, then the geometric correction method is used to perform preliminary correction processing on the distorted calibration plate image.
8. The method according to claim 1, characterized in that, The pixel coordinates corresponding to each calibration point in the calibration board image are obtained according to the following steps: Convert the calibration board image to a grayscale image; Gaussian filtering is used to smooth the grayscale image; Thresholding is used to convert the grayscale image into a binary image to clearly separate the marker points from the background area; The least squares method is used to fit the edge data of the marked points in the grayscale image in order to optimize the coordinate position of the edge points; A contour detection algorithm is applied to extract the edges of the marked points and calculate the center coordinates of the marked points.
9. A non-transitory computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a deep learning-based OCT optical distortion correction method as described in any one of claims 1 to 8.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a deep learning-based OCT optical distortion correction method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Improved SD-OCT (spectral domain-optical coherence tomography) system
CN103698301A
Stereo visual calibration method integrating neural network and virtual target
CN106127789A
Oct image processing
CN110473265A
Source applicator modularization method for shallow X-ray radiotherapy
CN118079253A
AUPO793897A0