OCT image enhancement methods, devices, electronic equipment, and storage media

CN116664458BActive Publication Date: 2026-08-14PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]现有技术中,基于深度学习的思想训练OCT图像分割模型时,受限于OCT昂贵的扫描费用,病人样本的有限程度等,导致病变样式较少,训练样本有限,因而得到的OCT图像分割模型的泛化能力较差

Benefits of technology

[0050] The OCT image enhancement method, apparatus, electronic device, and storage medium provided by this invention obtain multiple sampled OCT images by sampling multiple times in an ocular OCT image using a sampling frame. This not only expands the number of training samples in the input network model but also reduces the redundancy of lateral information, making the distribution of longitudinal and lateral information more uniform. Secondly, by deforming the sampled OCT images, the homogeneity between slices of OCT tomographic scans from the same patient is broken down, simulating uneven slice thickness and lesions, thus expanding the diversity of slice morphology and further increasing the number of training samples. This allows the model to improve its generalization ability when training an ocular segmentation model based on the increased number of training samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116664458B_ABST
    Figure CN116664458B_ABST
Patent Text Reader

Abstract

This invention relates to image processing and digital healthcare, providing an OCT image enhancement method, apparatus, electronic device, and storage medium. By using a sampling frame to perform multiple samplings on an ocular OCT image to obtain multiple sampled OCT images, not only is the number of training samples in the input network model increased, but the redundancy of lateral information is also reduced, resulting in a more uniform distribution of vertical and lateral information. Secondly, by performing deformation processing on the sampled OCT images, the homogeneity between slices of OCT tomographic scans from the same patient is broken down, simulating uneven slice thickness and lesions, thus expanding the diversity of slice morphology and further increasing the number of training samples. This allows for improved generalization ability of the model when training an ocular segmentation model based on the increased number of training samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and specifically to an OCT image enhancement method, apparatus, electronic device, and storage medium. Background Technology

[0002] Optical coherence tomography (OCT), due to its non-contact and non-invasive nature, has become a routine examination in the diagnosis and treatment of eye diseases, providing doctors with images of retinal structures. Segmenting lesion areas in OCT images, such as subretinal fluid accumulation, intraretinal fluid accumulation, subretinal hyperreflective material, and pigment epithelium detachment, is fundamental for reliable diagnosis of fundus diseases.

[0003] Currently, many scholars have studied the segmentation of fundus structures in macular OCT scans, including the retinal nerve fiber layer (RNFL), the ganglion cell-inner reticular layer (GCIPL), and the choroid. With the innovation of computational methods, a large number of OCT image segmentation methods based on deep learning have also emerged.

[0004] In existing technologies, when training OCT image segmentation models based on deep learning, the limited cost of OCT scanning and the limited number of patient samples result in fewer lesion patterns and a limited number of training samples, thus leading to poor generalization ability of the obtained OCT image segmentation models. Summary of the Invention

[0005] In view of the above, it is necessary to propose an OCT image enhancement method, apparatus, electronic device and storage medium that can enhance OCT images, thereby expanding the number of OCT images.

[0006] A first aspect of the present invention provides an OCT image enhancement method, the method comprising:

[0007] Acquire OCT images of the eyes;

[0008] Determine the size of the sampling frame corresponding to the OCT image of the eye;

[0009] The sampling frame is used to sample the eye OCT image multiple times to obtain multiple sampled OCT images;

[0010] Each sampled OCT image is deformed to obtain an enhanced OCT image.

[0011] In an optional implementation, the deformation processing of each sampled OCT image to obtain an enhanced OCT image includes:

[0012] Perform an affine transformation on the sampled OCT image to obtain the transformed image;

[0013] For each pixel in the transformed image, a displacement in the x and y directions is generated to obtain a random displacement field;

[0014] The random displacement field is filtered;

[0015] Deformation control is applied to the filtered random displacement field based on a preset deformation control factor.

[0016] The sampled OCT image is processed based on the random displacement field after deformation to obtain an enhanced OCT image.

[0017] In an optional implementation, generating a displacement in the x and y directions for each pixel in the transformed image to obtain a random displacement field includes:

[0018] Obtain the coordinates of each pixel in the transformed image;

[0019] The range of the stated coordinate values ​​and the preset coordinate values ​​are compared to obtain the comparison result.

[0020] Based on the comparison results, the pixels are divided into middle pixels and edge pixels;

[0021] Generate a first displacement in the x and y directions for the intermediate pixel;

[0022] A second displacement in the x and y directions is generated for the edge pixel;

[0023] The random displacement field is obtained based on the first displacement and the second displacement;

[0024] Wherein, the first displacement is greater than the second displacement.

[0025] In an optional implementation, determining the size of the sampling frame corresponding to the eye OCT image includes:

[0026] Obtain the image width and image height of the OCT image of the eye;

[0027] The size of the sampling frame is determined based on the image width and the image height.

[0028] In an optional implementation, the step of using the sampling frame to sample the eye OCT image multiple times to obtain multiple sampled OCT images includes:

[0029] Determine the initial sampling position of the sampling frame in the OCT image of the eye;

[0030] Starting from the initial sampling position, the sampling frame is slid across the eye OCT image according to a preset step size;

[0031] Each time a swipe occurs, the first sampling region corresponding to the sampling frame in the eye OCT image is acquired;

[0032] The first sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

[0033] In an optional implementation, the step of using the sampling frame to sample the eye OCT image multiple times to obtain multiple sampled OCT images includes:

[0034] Multiple sampling points are specified in the OCT image of the eye;

[0035] The sampling position of the sampling frame is determined based on each of the sampling points;

[0036] Obtain the second sampling region in the eye OCT image corresponding to the sampling position;

[0037] The second sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

[0038] In an optional implementation, specifying multiple sampling points in the ocular OCT image includes:

[0039] Obtain the preset first filter kernel and the preset second filter kernel;

[0040] The horizontal gradient is obtained by convolving the preset first filter kernel with the eye OCT image.

[0041] The preset second filter kernel is used to perform convolution calculation with the eye OCT image to obtain the vertical gradient;

[0042] The plurality of sampling points are determined based on the horizontal gradient and the vertical gradient.

[0043] A second aspect of the present invention provides an OCT image enhancement apparatus, the apparatus comprising:

[0044] The acquisition module is used to acquire OCT images of the eye.

[0045] The determination module is used to determine the size of the sampling frame corresponding to the eye OCT image;

[0046] The sampling module is used to perform multiple samplings on the eye OCT image using the sampling frame to obtain multiple sampled OCT images;

[0047] The deformation module is used to perform deformation processing on each of the sampled OCT images to obtain an enhanced OCT image.

[0048] A third aspect of the present invention provides an electronic device including a processor and a memory, the processor being configured to implement the OCT image enhancement method when executing a computer program stored in the memory.

[0049] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program implementing the OCT image enhancement method when executed by a processor.

[0050] The OCT image enhancement method, apparatus, electronic device, and storage medium provided by this invention obtain multiple sampled OCT images by sampling multiple times in an ocular OCT image using a sampling frame. This not only expands the number of training samples in the input network model but also reduces the redundancy of lateral information, making the distribution of longitudinal and lateral information more uniform. Secondly, by deforming the sampled OCT images, the homogeneity between slices of OCT tomographic scans from the same patient is broken down, simulating uneven slice thickness and lesions, thus expanding the diversity of slice morphology and further increasing the number of training samples. This allows the model to improve its generalization ability when training an ocular segmentation model based on the increased number of training samples. Attached Figure Description

[0051] Figure 1 This is a flowchart of the OCT image enhancement method provided in Embodiment 1 of the present invention.

[0052] Figure 2 This is a schematic diagram of obtaining a sampled OCT image by sampling an eye OCT image, as provided in an embodiment of the present invention.

[0053] Figure 3 This is a structural diagram of the OCT image enhancement device provided in Embodiment 2 of the present invention.

[0054] Figure 4 This is a schematic diagram of the structure of the electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0055] To better understand the above-mentioned objects, features, and advantages of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing an embodiment in one alternative implementation and is not intended to be limiting of the invention.

[0057] The OCT image enhancement method provided in this embodiment of the invention is executed by an electronic device, and correspondingly, the OCT image enhancement device operates in the electronic device.

[0058] The embodiments of this invention can standardize data processing based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0059] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0060] Example 1

[0061] Figure 1 This is a flowchart of an OCT image enhancement method provided in an embodiment of the present invention. The OCT image enhancement method specifically includes the following steps. Depending on different needs, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0062] S11, acquire OCT image of the eye.

[0063] The ocular OCT image refers to an image obtained by scanning the eyes of a patient with an eye disease using optical coherence tomography (OCT) technology. The ocular OCT image can be a single raw ocular OCT image.

[0064] When the electronic device is an OCT device, the ocular OCT image can be obtained by the OCT device scanning the patient's eyes in real time. The OCT device acquires OCT images of the patient's eyes in real time and sends the OCT images to the electronic device. The electronic device acquires the OCT images and uses them as images to be enhanced.

[0065] When the electronic device is not an OCT device, the OCT device acquires OCT images of the patient's eyes and sends them to the electronic device. The electronic device first stores the OCT image in its database, and then retrieves the OCT image of the patient's eyes from the database as the image to be enhanced. That is, the OCT image of the eyes can be an OCT image of the eyes acquired by the electronic device in real time from the OCT device, or it can be a pre-stored OCT image of the eyes retrieved from the internal or external memory of the electronic device.

[0066] When this invention is applied to a medical setting, the ocular OCT images can be obtained from a digital medical database. This digital medical database can be a digital repository storing patient records in a hospital, or it can be a networked database of multiple hospitals; this invention does not impose any limitations.

[0067] S12, determine the size of the sampling frame corresponding to the eye OCT image.

[0068] The size of the sampling frame refers to the size of the sampling frame. The sampling frame is used to acquire image patches from eye OCT images, and the acquired image patches are the same size as the sampling frame.

[0069] Electronic devices need to acquire multiple image patches from OCT images of the eye, with each image patch having the same size as the sampling frame. A patch can be understood as an image block. When the resolution of the image to be processed is too large and resources are limited, such as video memory and computing power, the image can be divided into small blocks, and these small image blocks are patches.

[0070] In an optional implementation, determining the size of the sampling frame corresponding to the eye OCT image includes:

[0071] Obtain the image width and image height of the OCT image of the eye;

[0072] The size of the sampling frame is determined based on the image width and the image height.

[0073] Most OCT images of the eye are long and narrow, with dense horizontal information, which leads to redundancy in the horizontal information. Therefore, the size of the sampling box can be determined based on the image width and image height of the OCT image of the eye, so that image patches can be collected from the OCT image of the eye based on the sampling box of the determined size.

[0074] Specifically, the height of the sampling frame determined by the electronic device is consistent with the image height of the eye OCT image, and the width of the sampling frame can be a preset proportion of the image width of the eye OCT image, with the sampling frame width being smaller than the image width of the eye OCT image. For example, the width of the sampling frame is 1 / 5 of the image width of the eye OCT image.

[0075] The above-mentioned optional implementation method samples the eye OCT image by using a sampling frame that is consistent with the image height of the eye OCT image. The resulting sampled image can retain the integrity of information in the vertical direction, has sufficient layers, and reduces information redundancy in the horizontal direction.

[0076] S13, the sampling frame is used to perform multiple samplings on the eye OCT image to obtain multiple sampled OCT images.

[0077] The electronic device can use the sampling frame to perform multiple random samplings on the eye OCT image, obtaining multiple sampled OCT images. For example... Figure 2 As shown, multiple sampled OCT images are obtained by randomly sampling the original OCT image.

[0078] In an optional implementation, the step of using the sampling frame to sample the eye OCT image multiple times to obtain multiple sampled OCT images includes:

[0079] Determine the initial sampling position of the sampling frame in the OCT image of the eye;

[0080] Starting from the initial sampling position, the sampling frame is slid across the eye OCT image according to a preset step size;

[0081] Each time a swipe occurs, the first sampling region corresponding to the sampling frame in the eye OCT image is acquired;

[0082] The first sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

[0083] The electronic device can align the top-left vertex of the sampling frame with the pixels in the first row and first column of the eye OCT image to determine the initial sampling position of the sampling frame in the eye OCT image. That is, the sampling frame slides from the leftmost side of the eye OCT image to the right.

[0084] The electronic device can also align the top right corner of the sampling frame with the last pixel of the first row of the eye OCT image to determine the initial sampling position of the sampling frame in the eye OCT image. That is, the sampling frame slides from the rightmost side of the eye OCT image to the left.

[0085] The electronic device can also align the geometric center point of the sampling frame with the geometric center point of the eye OCT image to determine the initial sampling position of the sampling frame in the eye OCT image. That is, the sampling frame starts from the center of the eye OCT image and slides to the left, or to the right, or simultaneously to the left and right.

[0086] The preset step size refers to the distance the sampling frame slides each time, which is the distance between the previous position and the next position of the sampling frame.

[0087] The electronic device can set a preset step size less than the width of the sampling frame; for example, the preset step size can be 3 and the width of the sampling frame can be 5. Alternatively, the electronic device can set a preset step size equal to the width of the sampling frame; for example, the preset step size can be 5 and the width of the sampling frame can be 5. Or, the electronic device can set a preset step size greater than the width of the sampling frame; for example, the preset step size can be 8 and the width of the sampling frame can be 5.

[0088] When the electronic device sets the preset step size to be less than the width of the sampling frame, it uses the sampling frame to perform overlapping sliding in the eye OCT image. That is, in the multiple sampled OCT images obtained by the electronic device, every two adjacent sampled OCT images have some identical content. When the electronic device sets the preset step size to be greater than or equal to the width of the sampling frame, it uses the sampling frame to perform non-overlapping sliding in the eye OCT image.

[0089] In the above optional embodiments, by determining the initial sampling position of the sampling frame in the eye OCT image, and starting from the initial sampling position, sliding the sampling frame according to a preset step size, the eye OCT image is sampled once using the sampling frame during each slide, thereby obtaining multiple sampled OCT images. Sliding the sampling frame according to the preset step size achieves regular sliding of the sampling frame, thus enabling regular sampling of the eye OCT image. The obtained sampled OCT images can essentially contain all the information of the original eye OCT image. Therefore, enhancing the multiple sampled OCT images obtained based on regular sampling and using them to train the eye segmentation model can improve the segmentation performance of the eye segmentation model.

[0090] In an optional implementation, the step of using the sampling frame to sample the eye OCT image multiple times to obtain multiple sampled OCT images includes:

[0091] Multiple sampling points are specified in the OCT image of the eye;

[0092] The sampling position of the sampling frame is determined based on each of the sampling points;

[0093] Obtain the second sampling region in the eye OCT image corresponding to the sampling position;

[0094] The second sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

[0095] The electronic device can randomly specify multiple sampling points in an eye OCT image. After specifying multiple sampling points, a sampling position can be determined based on each specified sampling point. Multiple sampling points determine multiple sampling positions, and the number of sampling positions is the same as the number of sampling points.

[0096] The electronic device can define each sampling point as an interior point of a sampling frame corresponding to a sampling position. That is, each sampling position corresponding to a sampling frame includes a specified sampling point. The electronic device can also define a preset number of sampling points as interior points of a sampling frame corresponding to a sampling position. That is, each sampling position corresponding to a sampling frame includes a preset number of specified sampling points. The preset number can be 2. Preferably, each sampling point can be defined as the center point of the sampling frame corresponding to a sampling position.

[0097] The above-described optional implementation specifies multiple sampling points in the eye OCT image and determines a sampling position of the sampling box based on each sampling point. This allows sampling to be performed using the sampling box within the region corresponding to the sampling position in the eye OCT image, resulting in multiple sampled OCT images with strong randomness. Therefore, enhancing these multiple sampled OCT images with strong randomness and using them to train the eye segmentation model can improve the generalization ability of the eye segmentation model.

[0098] In an optional implementation, specifying multiple sampling points in the ocular OCT image includes:

[0099] Obtain the preset first filter kernel and the preset second filter kernel;

[0100] The horizontal gradient is obtained by convolving the preset first filter kernel with the eye OCT image.

[0101] The preset second filter kernel is used to perform convolution calculation with the eye OCT image to obtain the vertical gradient;

[0102] The plurality of sampling points are determined based on the horizontal gradient and the vertical gradient.

[0103] The preset first filter core and the preset second filter core can be preset in the electronic device, or they can be adjusted by the user according to the needs. This embodiment of the invention does not impose specific restrictions on the preset first filter core and the preset second filter core.

[0104] The first and second preset filter kernels are either the Sobel kernel, the Privette kernel, or the Roberts kernel, etc.

[0105] For example, suppose the first filter kernel is a transverse Sobel kernel:

[0106]

[0107] For example, suppose the preset second filter kernel is a longitudinal Sobel kernel:

[0108]

[0109] OCT images of the eye are represented by FA, ​​where Gx and Gy represent the grayscale values ​​of the image after horizontal and vertical edge detection, respectively. In other words, Gx represents the horizontal gradient and Gy represents the vertical gradient. The calculation formula is as follows:

[0110]

[0111] It should be noted that the horizontal and vertical gradients are calculated for each pixel (x, y) in the eye OCT image.

[0112] Multiple sampling points in an eye OCT image are determined by calculating the horizontal and vertical gradients. Specifically, a gradient vector is obtained based on the horizontal and vertical gradients, where the gradient vector is (horizontal gradient, vertical gradient). The gradient magnitude is calculated based on the gradient vector. Each gradient magnitude is compared with a preset magnitude threshold, and a target gradient magnitude greater than the preset magnitude threshold is obtained. The target gradient magnitude is then determined as the sampling point.

[0113] In the above optional embodiments, a preset amplitude threshold is used to measure the edge sharpness of the eye OCT image. When the gradient amplitude of a pixel is greater than the preset amplitude threshold, it indicates that the edge image corresponding to that pixel is sharp; when the gradient amplitude of a pixel is greater than the preset amplitude threshold, it indicates that the edge image corresponding to that pixel is blurry. Therefore, sampling using pixels with sharp edge images as sampling points can yield sampled OCT images with sharp edge images. When multiple sampled OCT images with sharp edge images are enhanced and used to train the eye segmentation model, the segmentation performance of the eye segmentation model can be improved.

[0114] S14, each of the sampled OCT images is deformed to obtain an enhanced OCT image.

[0115] After obtaining multiple sampled OCT images, electronic devices need to perform deformation processing on each sampled OCT image to enhance the sampled OCT image.

[0116] Before deforming the sampled OCT image, the electronic device can also perform grayscale transformation and / or angle transformation on the sampled OCT image. The electronic device can perform grayscale transformation on the sampled OCT image by applying histogram processing. A histogram is a function of grayscale levels, describing the number of pixels at a given grayscale level in the image. During grayscale equalization, the range of grayscale values ​​for the image pixels is first determined, and the grayscale values ​​are divided into several levels using appropriate grayscale intervals. Grayscale levels with a large number of pixels in the image are broadened, while grayscale levels with a small number of pixels are compressed, thereby expanding the dynamic range of pixel values, improving contrast and grayscale tone variation, and making the image clearer. The electronic device can preset an angle range, randomly select an angle within the preset angle range, and rotate the sampled OCT image counterclockwise or clockwise by that angle. The electronic device then performs deformation processing on the sampled OCT image after grayscale transformation and / or angle transformation to obtain an enhanced OCT image.

[0117] In an optional implementation, the deformation processing of each sampled OCT image to obtain an enhanced OCT image includes:

[0118] Perform an affine transformation on the sampled OCT image to obtain the transformed image;

[0119] For each pixel in the transformed image, a displacement in the x and y directions is generated to obtain a random displacement field;

[0120] The random displacement field is filtered;

[0121] Deformation control is applied to the filtered random displacement field based on a preset deformation control factor.

[0122] The sampled OCT image is processed based on the random displacement field after deformation to obtain an enhanced OCT image.

[0123] Affine transformations in spatial transformations correspond to five types of transformations: translation, scaling, rotation, flipping, and shearing. The process of transforming the original image into the transformed image using these five transformations can be described using an affine transformation matrix. This transformation process can be obtained by multiplying the original image by a 2x3 matrix. Affine transformations are existing technology and will not be elaborated upon in detail here.

[0124] The electronic device can generate a displacement in the x and y directions for each pixel in the transformed image in a random manner, resulting in a random displacement field. The displacement in the x direction is denoted as Δx, and the displacement in the y direction is denoted as Δy, both randomly generated for each pixel in the transformed image. The ranges of displacements Δx and Δy are between (-1, 1). Generating displacements randomly enhances the diversity of displacements, thereby enhancing the diversity of the random displacement field, and consequently, the enhanced OCT image obtained by processing the sampled OCT image based on the random displacement field possesses greater diversity.

[0125] Electronic devices can use a Gaussian distribution to perform a convolution operation on the generated random displacement field, thereby achieving smoothing of the random displacement field, that is, filtering of the random displacement field.

[0126] After filtering the random displacement field, the electronic device obtains a pre-set deformation control factor α, and multiplies the deformation control factor α with each displacement in the filtered random displacement field to control the deformation intensity of the random displacement field.

[0127] Finally, the sampled OCT image is processed based on the deformed random displacement field to obtain an enhanced OCT image. Specifically, each pixel in the sampled OCT image is acquired, and the deformation displacement corresponding to each pixel is obtained from the deformed random displacement field. This deformation displacement is then used to perform a translation transformation on the corresponding pixel. Once all pixels in the sampled OCT image have undergone this translation transformation, the enhanced OCT image is obtained.

[0128] In an optional implementation, generating a displacement in the x and y directions for each pixel in the transformed image to obtain a random displacement field includes:

[0129] Obtain the coordinates of each pixel in the transformed image;

[0130] The range of the stated coordinate values ​​and the preset coordinate values ​​are compared to obtain the comparison result.

[0131] Based on the comparison results, the pixels are divided into middle pixels and edge pixels;

[0132] Generate a first displacement in the x and y directions for the intermediate pixel;

[0133] A second displacement in the x and y directions is generated for the edge pixel;

[0134] The random displacement field is obtained based on the first displacement and the second displacement.

[0135] The first displacement is greater than the second displacement.

[0136] A planar coordinate system can be pre-constructed, with the top-left corner of the transformed image as the origin, the horizontal line containing the width of the transformed image as the x-axis, and the vertical line containing the height of the transformed image as the y-axis. After establishing the planar coordinate system, the electronic device acquires the coordinate values ​​of each pixel in the transformed image within the planar coordinate system. The coordinate value of each pixel is represented as (xb, yb), where xb is the x-coordinate and yb is the y-coordinate.

[0137] The range of preset coordinate values ​​includes the range of preset horizontal coordinate values ​​and the range of preset vertical coordinate values. The range of preset horizontal coordinate values ​​is [xf1, xf2], and the range of preset vertical coordinate values ​​is [yf1, yf2].

[0138] The comparison of the range of the coordinate values ​​and the preset coordinate values ​​includes: comparing the range of the horizontal coordinate values ​​in the coordinate values ​​with the range of the preset horizontal coordinate values, and comparing the range of the vertical coordinate values ​​in the coordinate values ​​with the range of the preset vertical coordinate values.

[0139] When the x-coordinate value of the coordinates is within the range of preset x-coordinate values ​​and the y-coordinate value of the coordinates is within the range of preset y-coordinate values, the comparison result is: the coordinates are within the range of preset coordinate values.

[0140] When the x-coordinate value in the coordinate values ​​is not within the range of the preset x-coordinate values, and / or the y-coordinate value in the coordinate values ​​is within the range of the preset y-coordinate values, the comparison result is: the coordinate values ​​are not within the range of the preset coordinate values.

[0141] For a given pixel, if the comparison result indicates that the coordinate value is within the range of preset coordinate values, the pixel is classified as an intermediate pixel. For a given pixel, if the comparison result indicates that the coordinate value is not within the range of preset coordinate values, the pixel is classified as an edge pixel.

[0142] Since the first displacement is greater than the second displacement, a larger displacement in the x and y directions is generated for the middle pixels, and a smaller displacement in the x and y directions is generated for the edge pixels. Generally, the lesion area is mostly located in the middle part of the image, while the edge parts are relatively blurry. Therefore, a larger displacement is used for the middle pixels, resulting in greater deformation of the middle pixels, while a smaller displacement is used for the edge pixels, resulting in less deformation of the edge pixels. Otherwise, if a larger displacement is used for the edge pixels, the deformation of the edge pixels will be greater, making the edge parts increasingly blurry.

[0143] In one optional implementation, after obtaining the enhanced OCT images, the electronic device can train an eye segmentation model based on multiple enhanced OCT images. A deep convolutional neural network (DNN) can be used as the network architecture for the eye segmentation model. First, the lesion regions in the enhanced OCT images are labeled. The labeled enhanced OCT images are then input into the DNN for training. The DNN outputs predicted lesion regions, and the difference between the labeled and predicted lesion regions is calculated as a loss value. Based on this loss value, a gradient descent algorithm is used to iteratively train the DNN. Upon completion of the iterative training, the eye segmentation model is obtained. When the number of iterations reaches a threshold, the iterative training is complete, and the training process for the DNN ends.

[0144] In an optional implementation, the electronic device can also use a trained eye segmentation model to segment the OCT image of the eye to be tested. The OCT image of the eye to be tested is the object for which lesion region segmentation is required. The OCT image of the eye to be tested is input into the eye segmentation model, and the eye segmentation model outputs the lesion region in the OCT image of the eye to be tested.

[0145] In existing technologies, when training an eye segmentation model, the entire original eye OCT image is used as a training sample and input into the network model for training. This results in dense lateral information and information redundancy. Furthermore, eye OCT images are generally tomographically cropped, and the homogeneity between the lower layers of the eye is relatively strong, resulting in fewer lesion patterns. Consequently, the number of samples used as training samples is small, and the generalization ability of the trained eye segmentation model is poor.

[0146] The method provided in this invention firstly expands the number of training samples in the input network model by using a sampling frame to perform multiple samplings in the ocular OCT image, and reduces the redundancy of lateral information, making the distribution of vertical and lateral information more uniform. Secondly, by using deformation, the homogeneity between layers of OCT tomographic scans from the same patient is broken down, simulating uneven layer thickness and lesions, expanding the diversity of layer morphology, increasing the number of training samples, and improving the generalization ability of the model.

[0147] Furthermore, in existing technologies, the image size is normalized (resized) to reduce the image resolution before the entire original eye OCT image is input into the network model as a training sample. However, resizing is mostly an image interpolation process, essentially a form of filtering, which blurs the image and causes loss at the pixel level. That is, the pixel value at some location is calculated by weighting multiple locations, thus limiting the upper limit of the model's prediction results. Since the images used for model training are inherently inaccurate, the performance of the trained model is naturally poor.

[0148] The method provided in this embodiment of the invention simply divides the original eye OCT image into individual image patches. These image patches are still a part of the original eye OCT image, and the pixel values ​​are not changed. Therefore, the performance of the trained model is higher than that of the model obtained based on resizing.

[0149] The method described in this invention can be applied to the field of digital medical technology to assist in the treatment of eye diseases, thereby promoting the development of smart cities.

[0150] Example 2

[0151] Figure 3 This is a structural diagram of the OCT image enhancement device provided in an embodiment of the present invention.

[0152] In some embodiments, the OCT image enhancement device 30 may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the OCT image enhancement device 30 may be stored in the memory of an electronic device and executed by at least one processor to perform (see details). Figure 1 (Description) OCT image enhancement features.

[0153] In this embodiment, the OCT image enhancement device 30 can be divided into multiple functional modules according to its functions. These functional modules may include: an acquisition module 301, a determination module 302, a sampling module 303, and a deformation module 304. The term "module" in this invention refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory. In this embodiment, the functions of each module will be detailed in subsequent embodiments.

[0154] The acquisition module 301 is used to acquire OCT images of the eye.

[0155] The ocular OCT image refers to an image obtained by scanning the eyes of a patient with an eye disease using optical coherence tomography (OCT) technology. The ocular OCT image can be a single raw ocular OCT image.

[0156] When the electronic device is an OCT device, the ocular OCT image can be obtained by the OCT device scanning the patient's eyes in real time. The OCT device acquires OCT images of the patient's eyes in real time and sends the OCT images to the electronic device. The electronic device acquires the OCT images and uses them as images to be enhanced.

[0157] When the electronic device is not an OCT device, the OCT device acquires OCT images of the patient's eyes and sends them to the electronic device. The electronic device first stores the OCT image in its database, and then retrieves the OCT image of the patient's eyes from the database as the image to be enhanced. That is, the OCT image of the eyes can be an OCT image of the eyes acquired by the electronic device in real time from the OCT device, or it can be a pre-stored OCT image of the eyes retrieved from the internal or external memory of the electronic device.

[0158] When this invention is applied to a medical setting, the ocular OCT images can be obtained from a digital medical database. This digital medical database can be a digital repository storing patient records in a hospital, or it can be a networked database of multiple hospitals; this invention does not impose any limitations.

[0159] The determining module 302 is used to determine the size of the sampling frame corresponding to the eye OCT image.

[0160] The size of the sampling frame refers to the size of the sampling frame. The sampling frame is used to acquire image patches from eye OCT images, and the acquired image patches are the same size as the sampling frame.

[0161] Electronic devices need to acquire multiple image patches from OCT images of the eye, with each image patch having the same size as the sampling frame. A patch can be understood as an image block. When the resolution of the image to be processed is too large and resources are limited, such as video memory and computing power, the image can be divided into small blocks, and these small image blocks are patches.

[0162] In an optional implementation, determining the size of the sampling frame corresponding to the eye OCT image includes:

[0163] Obtain the image width and image height of the OCT image of the eye;

[0164] The size of the sampling frame is determined based on the image width and the image height.

[0165] Most OCT images of the eye are long and narrow, with dense horizontal information, which leads to redundancy in the horizontal information. Therefore, the size of the sampling box can be determined based on the image width and image height of the OCT image of the eye, so that image patches can be collected from the OCT image of the eye based on the sampling box of the determined size.

[0166] Specifically, the height of the sampling frame determined by the electronic device is consistent with the image height of the eye OCT image, and the width of the sampling frame can be a preset proportion of the image width of the eye OCT image, with the sampling frame width being smaller than the image width of the eye OCT image. For example, the width of the sampling frame is 1 / 5 of the image width of the eye OCT image.

[0167] The above-mentioned optional implementation method samples the eye OCT image by using a sampling frame that is consistent with the image height of the eye OCT image. The resulting sampled image can retain the integrity of information in the vertical direction, has sufficient layers, and reduces information redundancy in the horizontal direction.

[0168] The sampling module 303 is used to perform multiple samplings on the eye OCT image using the sampling frame to obtain multiple sampled OCT images.

[0169] The electronic device can use the sampling frame to perform multiple random samplings on the eye OCT image, obtaining multiple sampled OCT images. For example... Figure 2 As shown, multiple sampled OCT images are obtained by randomly sampling the original OCT image.

[0170] In an optional implementation, the step of using the sampling frame to sample the eye OCT image multiple times to obtain multiple sampled OCT images includes:

[0171] Determine the initial sampling position of the sampling frame in the OCT image of the eye;

[0172] Starting from the initial sampling position, the sampling frame is slid across the eye OCT image according to a preset step size;

[0173] Each time a swipe occurs, the first sampling region corresponding to the sampling frame in the eye OCT image is acquired;

[0174] The first sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

[0175] The electronic device can align the top-left vertex of the sampling frame with the pixels in the first row and first column of the eye OCT image to determine the initial sampling position of the sampling frame in the eye OCT image. That is, the sampling frame slides from the leftmost side of the eye OCT image to the right.

[0176] The electronic device can also align the top right corner of the sampling frame with the last pixel of the first row of the eye OCT image to determine the initial sampling position of the sampling frame in the eye OCT image. That is, the sampling frame slides from the rightmost side of the eye OCT image to the left.

[0177] The electronic device can also align the geometric center point of the sampling frame with the geometric center point of the eye OCT image to determine the initial sampling position of the sampling frame in the eye OCT image. That is, the sampling frame starts from the center of the eye OCT image and slides to the left, or to the right, or simultaneously to the left and right.

[0178] The preset step size refers to the distance the sampling frame slides each time, which is the distance between the previous position and the next position of the sampling frame.

[0179] The electronic device can set a preset step size less than the width of the sampling frame; for example, the preset step size can be 3 and the width of the sampling frame can be 5. Alternatively, the electronic device can set a preset step size equal to the width of the sampling frame; for example, the preset step size can be 5 and the width of the sampling frame can be 5. Or, the electronic device can set a preset step size greater than the width of the sampling frame; for example, the preset step size can be 8 and the width of the sampling frame can be 5.

[0180] When the electronic device sets the preset step size to be less than the width of the sampling frame, it uses the sampling frame to perform overlapping sliding in the eye OCT image. That is, in the multiple sampled OCT images obtained by the electronic device, every two adjacent sampled OCT images have some identical content. When the electronic device sets the preset step size to be greater than or equal to the width of the sampling frame, it uses the sampling frame to perform non-overlapping sliding in the eye OCT image.

[0181] In the above optional embodiments, by determining the initial sampling position of the sampling frame in the eye OCT image, and starting from the initial sampling position, sliding the sampling frame according to a preset step size, the eye OCT image is sampled once using the sampling frame during each slide, thereby obtaining multiple sampled OCT images. Sliding the sampling frame according to the preset step size achieves regular sliding of the sampling frame, thus enabling regular sampling of the eye OCT image. The obtained sampled OCT images can essentially contain all the information of the original eye OCT image. Therefore, enhancing the multiple sampled OCT images obtained based on regular sampling and using them to train the eye segmentation model can improve the segmentation performance of the eye segmentation model.

[0182] In an optional implementation, the step of using the sampling frame to sample the eye OCT image multiple times to obtain multiple sampled OCT images includes:

[0183] Multiple sampling points are specified in the OCT image of the eye;

[0184] The sampling position of the sampling frame is determined based on each of the sampling points;

[0185] Obtain the second sampling region in the eye OCT image corresponding to the sampling position;

[0186] The second sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

[0187] The electronic device can randomly specify multiple sampling points in an eye OCT image. After specifying multiple sampling points, a sampling position can be determined based on each specified sampling point. Multiple sampling points determine multiple sampling positions, and the number of sampling positions is the same as the number of sampling points.

[0188] The electronic device can define each sampling point as an interior point of a sampling frame corresponding to a sampling position. That is, each sampling position corresponding to a sampling frame includes a specified sampling point. The electronic device can also define a preset number of sampling points as interior points of a sampling frame corresponding to a sampling position. That is, each sampling position corresponding to a sampling frame includes a preset number of specified sampling points. The preset number can be 2. Preferably, each sampling point can be defined as the center point of the sampling frame corresponding to a sampling position.

[0189] The above-described optional implementation specifies multiple sampling points in the eye OCT image and determines a sampling position of the sampling box based on each sampling point. This allows sampling to be performed using the sampling box within the region corresponding to the sampling position in the eye OCT image, resulting in multiple sampled OCT images with strong randomness. Therefore, enhancing these multiple sampled OCT images with strong randomness and using them to train the eye segmentation model can improve the generalization ability of the eye segmentation model.

[0190] In an optional implementation, specifying multiple sampling points in the ocular OCT image includes:

[0191] Obtain the preset first filter kernel and the preset second filter kernel;

[0192] The horizontal gradient is obtained by convolving the preset first filter kernel with the eye OCT image.

[0193] The preset second filter kernel is used to perform convolution calculation with the eye OCT image to obtain the vertical gradient;

[0194] The plurality of sampling points are determined based on the horizontal gradient and the vertical gradient.

[0195] The preset first filter core and the preset second filter core can be preset in the electronic device, or they can be adjusted by the user according to the needs. This embodiment of the invention does not impose specific restrictions on the preset first filter core and the preset second filter core.

[0196] The first and second preset filter kernels are either the Sobel kernel, the Privette kernel, or the Roberts kernel, etc.

[0197] For example, suppose the first filter kernel is a transverse Sobel kernel:

[0198]

[0199] For example, suppose the preset second filter kernel is a longitudinal Sobel kernel:

[0200]

[0201] OCT images of the eye are represented by FA, ​​where Gx and Gy represent the grayscale values ​​of the image after horizontal and vertical edge detection, respectively. In other words, Gx represents the horizontal gradient and Gy represents the vertical gradient. The calculation formula is as follows:

[0202]

[0203] It should be noted that the horizontal and vertical gradients are calculated for each pixel (x, y) in the eye OCT image.

[0204] Multiple sampling points in an eye OCT image are determined by calculating the horizontal and vertical gradients. Specifically, a gradient vector is obtained based on the horizontal and vertical gradients, where the gradient vector is (horizontal gradient, vertical gradient). The gradient magnitude is calculated based on the gradient vector. Each gradient magnitude is compared with a preset magnitude threshold, and a target gradient magnitude greater than the preset magnitude threshold is obtained. The target gradient magnitude is then determined as the sampling point.

[0205] In the above optional embodiments, a preset amplitude threshold is used to measure the edge sharpness of the eye OCT image. When the gradient amplitude of a pixel is greater than the preset amplitude threshold, it indicates that the edge image corresponding to that pixel is sharp; when the gradient amplitude of a pixel is greater than the preset amplitude threshold, it indicates that the edge image corresponding to that pixel is blurry. Therefore, sampling using pixels with sharp edge images as sampling points can yield sampled OCT images with sharp edge images. When multiple sampled OCT images with sharp edge images are enhanced and used to train the eye segmentation model, the segmentation performance of the eye segmentation model can be improved.

[0206] The deformation module 304 is used to perform deformation processing on each sampled OCT image to obtain an enhanced OCT image.

[0207] After obtaining multiple sampled OCT images, electronic devices need to perform deformation processing on each sampled OCT image to enhance the sampled OCT image.

[0208] Before deforming the sampled OCT image, the electronic device can also perform grayscale transformation and / or angle transformation on the sampled OCT image. The electronic device can perform grayscale transformation on the sampled OCT image by applying histogram processing. A histogram is a function of grayscale levels, describing the number of pixels at a given grayscale level in the image. During grayscale equalization, the range of grayscale values ​​for the image pixels is first determined, and the grayscale values ​​are divided into several levels using appropriate grayscale intervals. Grayscale levels with a large number of pixels in the image are broadened, while grayscale levels with a small number of pixels are compressed, thereby expanding the dynamic range of pixel values, improving contrast and grayscale tone variation, and making the image clearer. The electronic device can preset an angle range, randomly select an angle within the preset angle range, and rotate the sampled OCT image counterclockwise or clockwise by that angle. The electronic device then performs deformation processing on the sampled OCT image after grayscale transformation and / or angle transformation to obtain an enhanced OCT image.

[0209] In an optional implementation, the deformation processing of each sampled OCT image to obtain an enhanced OCT image includes:

[0210] Perform an affine transformation on the sampled OCT image to obtain the transformed image;

[0211] For each pixel in the transformed image, a displacement in the x and y directions is generated to obtain a random displacement field;

[0212] The random displacement field is filtered;

[0213] Deformation control is applied to the filtered random displacement field based on a preset deformation control factor.

[0214] The sampled OCT image is processed based on the random displacement field after deformation to obtain an enhanced OCT image.

[0215] Affine transformations in spatial transformations correspond to five types of transformations: translation, scaling, rotation, flipping, and shearing. The process of transforming the original image into the transformed image using these five transformations can be described using an affine transformation matrix. This transformation process can be obtained by multiplying the original image by a 2x3 matrix. Affine transformations are existing technology and will not be elaborated upon in detail here.

[0216] The electronic device can generate a displacement in the x and y directions for each pixel in the transformed image in a random manner, resulting in a random displacement field. The displacement in the x direction is denoted as Δx, and the displacement in the y direction is denoted as Δy, both randomly generated for each pixel in the transformed image. The ranges of displacements Δx and Δy are between (-1, 1). Generating displacements randomly enhances the diversity of displacements, thereby enhancing the diversity of the random displacement field, and consequently, the enhanced OCT image obtained by processing the sampled OCT image based on the random displacement field possesses greater diversity.

[0217] Electronic devices can use a Gaussian distribution to perform a convolution operation on the generated random displacement field, thereby achieving smoothing of the random displacement field, that is, filtering of the random displacement field.

[0218] After filtering the random displacement field, the electronic device obtains a pre-set deformation control factor α, and multiplies the deformation control factor α with each displacement in the filtered random displacement field to control the deformation intensity of the random displacement field.

[0219] Finally, the sampled OCT image is processed based on the deformed random displacement field to obtain an enhanced OCT image. Specifically, each pixel in the sampled OCT image is acquired, and the deformation displacement corresponding to each pixel is obtained from the deformed random displacement field. This deformation displacement is then used to perform a translation transformation on the corresponding pixel. Once all pixels in the sampled OCT image have undergone this translation transformation, the enhanced OCT image is obtained.

[0220] In an optional implementation, generating a displacement in the x and y directions for each pixel in the transformed image to obtain a random displacement field includes:

[0221] Obtain the coordinates of each pixel in the transformed image;

[0222] The range of the stated coordinate values ​​and the preset coordinate values ​​are compared to obtain the comparison result.

[0223] Based on the comparison results, the pixels are divided into middle pixels and edge pixels;

[0224] Generate a first displacement in the x and y directions for the intermediate pixel;

[0225] A second displacement in the x and y directions is generated for the edge pixel;

[0226] The random displacement field is obtained based on the first displacement and the second displacement.

[0227] The first displacement is greater than the second displacement.

[0228] A planar coordinate system can be pre-constructed, with the top-left corner of the transformed image as the origin, the horizontal line containing the width of the transformed image as the x-axis, and the vertical line containing the height of the transformed image as the y-axis. After establishing the planar coordinate system, the electronic device acquires the coordinate values ​​of each pixel in the transformed image within the planar coordinate system. The coordinate value of each pixel is represented as (xb, yb), where xb is the x-coordinate and yb is the y-coordinate.

[0229] The range of preset coordinate values ​​includes the range of preset horizontal coordinate values ​​and the range of preset vertical coordinate values. The range of preset horizontal coordinate values ​​is [xf1, xf2], and the range of preset vertical coordinate values ​​is [yf1, yf2].

[0230] The comparison of the range of the coordinate values ​​and the preset coordinate values ​​includes: comparing the range of the horizontal coordinate values ​​in the coordinate values ​​with the range of the preset horizontal coordinate values, and comparing the range of the vertical coordinate values ​​in the coordinate values ​​with the range of the preset vertical coordinate values.

[0231] When the x-coordinate value of the coordinates is within the range of preset x-coordinate values ​​and the y-coordinate value of the coordinates is within the range of preset y-coordinate values, the comparison result is: the coordinates are within the range of preset coordinate values.

[0232] When the x-coordinate value in the coordinate values ​​is not within the range of the preset x-coordinate values, and / or the y-coordinate value in the coordinate values ​​is within the range of the preset y-coordinate values, the comparison result is: the coordinate values ​​are not within the range of the preset coordinate values.

[0233] For a given pixel, if the comparison result indicates that the coordinate value is within the range of preset coordinate values, the pixel is classified as an intermediate pixel. For a given pixel, if the comparison result indicates that the coordinate value is not within the range of preset coordinate values, the pixel is classified as an edge pixel.

[0234] Since the first displacement is greater than the second displacement, a larger displacement in the x and y directions is generated for the middle pixels, and a smaller displacement in the x and y directions is generated for the edge pixels. Generally, the lesion area is mostly located in the middle part of the image, while the edge parts are relatively blurry. Therefore, a larger displacement is used for the middle pixels, resulting in greater deformation of the middle pixels, while a smaller displacement is used for the edge pixels, resulting in less deformation of the edge pixels. Otherwise, if a larger displacement is used for the edge pixels, the deformation of the edge pixels will be greater, making the edge parts increasingly blurry.

[0235] In one optional implementation, after obtaining the enhanced OCT images, the electronic device can train an eye segmentation model based on multiple enhanced OCT images. A deep convolutional neural network (DNN) can be used as the network architecture for the eye segmentation model. First, the lesion regions in the enhanced OCT images are labeled. The labeled enhanced OCT images are then input into the DNN for training. The DNN outputs predicted lesion regions, and the difference between the labeled and predicted lesion regions is calculated as a loss value. Based on this loss value, a gradient descent algorithm is used to iteratively train the DNN. Upon completion of the iterative training, the eye segmentation model is obtained. When the number of iterations reaches a threshold, the iterative training is complete, and the training process for the DNN ends.

[0236] In an optional implementation, the electronic device can also use a trained eye segmentation model to segment the OCT image of the eye to be tested. The OCT image of the eye to be tested is the object for which lesion region segmentation is required. The OCT image of the eye to be tested is input into the eye segmentation model, and the eye segmentation model outputs the lesion region in the OCT image of the eye to be tested.

[0237] In existing technologies, when training an eye segmentation model, the entire original eye OCT image is used as a training sample and input into the network model for training. This results in dense lateral information and information redundancy. Furthermore, eye OCT images are generally tomographically cropped, and the homogeneity between the lower layers of the eye is relatively strong, resulting in fewer lesion patterns. Consequently, the number of samples used as training samples is small, and the generalization ability of the trained eye segmentation model is poor.

[0238] The apparatus provided in this invention firstly expands the number of training samples in the input network model by using a sampling frame to perform multiple samplings in the ocular OCT image, and reduces the redundancy of lateral information, making the distribution of longitudinal and lateral information more uniform. Secondly, by using deformation, the homogeneity between layers of OCT tomographic scans from the same patient is broken down, simulating uneven layer thickness and lesions, expanding the diversity of layer morphology, increasing the number of training samples, and improving the generalization ability of the model.

[0239] Furthermore, in existing technologies, the image size is normalized (resized) to reduce the image resolution before the entire original eye OCT image is input into the network model as a training sample. However, resizing is mostly an image interpolation process, essentially a form of filtering, which blurs the image and causes loss at the pixel level. That is, the pixel value at some location is calculated by weighting multiple locations, thus limiting the upper limit of the model's prediction results. Since the images used for model training are inherently inaccurate, the performance of the trained model is naturally poor.

[0240] The device provided in this embodiment of the invention simply divides the original eye OCT image into individual image patches. These image patches are still part of the original eye OCT image, and the pixel values ​​are not changed. Therefore, the performance of the trained model is higher than that of the model obtained based on resizing.

[0241] The device described in this invention can be applied to the field of digital medical technology to assist in the treatment of eye diseases, thereby promoting the development of smart cities.

[0242] Example 3

[0243] This embodiment provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps described in the OCT image enhancement method embodiment, for example... Figure 1 S11-S14 as shown:

[0244] S11, acquire OCT image of the eye;

[0245] S12, determine the size of the sampling frame corresponding to the eye OCT image;

[0246] S13, use the sampling frame to perform multiple samplings on the eye OCT image to obtain multiple sampled OCT images;

[0247] S14, each of the sampled OCT images is deformed to obtain an enhanced OCT image.

[0248] Alternatively, when the computer program is executed by the processor, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 Modules 301-304 in the document:

[0249] The acquisition module 301 is used to acquire OCT images of the eye;

[0250] The determining module 302 is used to determine the size of the sampling frame corresponding to the eye OCT image;

[0251] The sampling module 303 is used to perform multiple samplings on the eye OCT image using the sampling frame to obtain multiple sampled OCT images;

[0252] The deformation module 304 is used to perform deformation processing on each sampled OCT image to obtain an enhanced OCT image.

[0253] Example 4

[0254] See Figure 4 The diagram shown is a structural schematic of an electronic device provided in an embodiment of the present invention. In a preferred embodiment of the present invention, the electronic device 4 includes a memory 41, at least one processor 42, at least one communication bus 43, and a transceiver 44.

[0255] Those skilled in the art should understand that Figure 4 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present invention. It can be a bus structure or a star structure. The electronic device 4 may also include more or fewer other hardware or software than shown, or different component arrangements.

[0256] In some embodiments, the electronic device 4 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital processors, and embedded devices. The electronic device 4 may also include client devices, including, but not limited to, any electronic product capable of human-computer interaction with a client via a keyboard, mouse, remote control, touchpad, or voice control device, such as personal computers, tablet computers, smartphones, and digital cameras.

[0257] The electronic device 4 described herein is merely an example. Other existing or future electronic products that are adaptable to this invention should also be included within the scope of protection of this invention and are incorporated herein by reference.

[0258] In some embodiments, the memory 41 stores a computer program that, when executed by the at least one processor 42, implements all or part of the steps in the OCT image enhancement method described above. The memory 41 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0259] Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application required for a function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.

[0260] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0261] In some embodiments, the at least one processor 42 is the control unit of the electronic device 4, connecting various components of the electronic device 4 via various interfaces and lines. It executes programs or modules stored in the memory 41 and calls data stored in the memory 41 to perform various functions and process data of the electronic device 4. For example, when the at least one processor 42 executes a computer program stored in the memory, it implements all or part of the steps of the OCT image enhancement method described in this embodiment of the invention; or it implements all or part of the functions of the OCT image enhancement device. The at least one processor 42 may be composed of integrated circuits, such as a single-packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.

[0262] In some embodiments, the at least one communication bus 43 is configured to enable communication between the memory 41 and the at least one processor 42, etc.

[0263] Although not shown, the electronic device 4 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 42 via a power management device, thereby enabling functions such as charging, discharging, and power consumption management. The power supply may also include one or more DC or AC power sources, a recharging device, a power fault detection circuit, a power converter or inverter, a power status indicator, or any other components. The electronic device 4 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0264] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) or processor to execute portions of the methods described in the various embodiments of the present invention.

[0265] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0266] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0267] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0268] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other elements, and the singular does not exclude the plural. Multiple elements or devices recited in the specification may also be implemented by a single element or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

[0269] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An OCT image enhancement method, characterized in that, The method includes: Acquire OCT images of the eyes; Determine the size of the sampling frame corresponding to the OCT image of the eye; Specifying multiple sampling points in the eye OCT image includes: obtaining a preset first filter kernel and a preset second filter kernel; performing convolution calculation with the eye OCT image using the preset first filter kernel to obtain a horizontal gradient; performing convolution calculation with the eye OCT image using the preset second filter kernel to obtain a vertical gradient; obtaining a gradient vector based on the horizontal and vertical gradients; calculating the gradient magnitude of each pixel in the eye OCT image based on the gradient vector; and determining the pixel corresponding to the gradient magnitude greater than a preset magnitude threshold as the sampling point. The sampling position of the sampling frame is determined based on each of the sampling points; The sampling frame is used to sample the eye OCT image multiple times to obtain multiple sampled OCT images; The process of deforming each sampled OCT image to obtain an enhanced OCT image includes: performing an affine transformation on the sampled OCT image to obtain a transformed image; generating a displacement in the x and y directions for each pixel in the transformed image to obtain a random displacement field; filtering the random displacement field; performing deformation control on the filtered random displacement field according to a preset deformation control factor; and processing the sampled OCT image according to the deformed random displacement field to obtain the enhanced OCT image. The step of generating displacements in the x and y directions for each pixel in the transformed image to obtain a random displacement field includes: obtaining the coordinate values ​​of each pixel in the transformed image; if the coordinate values ​​are within a preset range, determining the corresponding pixel as an intermediate pixel; if the coordinate values ​​are outside the preset range, determining the corresponding pixel as an edge pixel; generating a first displacement in the x and y directions for the intermediate pixel; generating a second displacement in the x and y directions for the edge pixel; and obtaining the random displacement field based on the first displacement and the second displacement, wherein the first displacement is greater than the second displacement.

2. The OCT image enhancement method as described in claim 1, characterized in that, Determining the size of the sampling frame corresponding to the OCT image of the eye includes: Obtain the image width and image height of the OCT image of the eye; The size of the sampling frame is determined based on the image width and the image height.

3. The OCT image enhancement method according to any one of claims 1 to 2, characterized in that, The step of using the sampling frame to perform multiple samplings on the eye OCT image to obtain multiple sampled OCT images includes: Determine the initial sampling position of the sampling frame in the OCT image of the eye; Starting from the initial sampling position, the sampling frame is slid across the eye OCT image according to a preset step size; Each time a swipe occurs, the first sampling region corresponding to the sampling frame in the eye OCT image is acquired; The first sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

4. The OCT image enhancement method according to any one of claims 1 to 2, characterized in that, The step of using the sampling frame to perform multiple samplings on the eye OCT image to obtain multiple sampled OCT images includes: Obtain the second sampling region in the eye OCT image corresponding to the sampling position; The second sampling region in the eye OCT image is cropped to obtain multiple sampled OCT images.

5. An OCT image enhancement apparatus, the apparatus being used to implement the OCT image enhancement method as described in any one of claims 1 to 4, characterized in that, The device includes: The acquisition module is used to acquire OCT images of the eye. The determination module is used to determine the size of the sampling frame corresponding to the eye OCT image; The sampling module is used to perform multiple samplings on the eye OCT image using the sampling frame to obtain multiple sampled OCT images; The deformation module is used to perform deformation processing on each of the sampled OCT images to obtain an enhanced OCT image.

6. An electronic device, characterized in that, The electronic device includes a processor and a memory, the processor being configured to implement the OCT image enhancement method as described in any one of claims 1 to 4 when executing a computer program stored in the memory.

7. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the OCT image enhancement method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Sampling method for seawater temperature field based on gradient analysis

    CN108846400A

  • Pathological section cell high-precision automatic segmentation method based on convolutional neural network and Dbscan

    CN115131785A

  • Model training method and device and electronic equipment

    CN115661053A