Image correction method, device, microscope image correction method and electronic equipment

By using light field prediction model to extract and correct the image, the brightness distortion and color distortion problems of a single image are solved, and high-quality image correction is achieved, especially in microscopic images, which improves the accuracy of the analysis results.

CN113706400BActive Publication Date: 2025-08-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110361857.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-02
Publication Date
2025-08-08
Estimated Expiration
2041-04-02

AI Technical Summary

Technical Problem

The prior art is difficult to effectively correct the background light field and color white balance on a single image, resulting in image brightness distortion and color distortion problems, especially in microscope images that affect the accuracy of the analysis results.

Method used

A light field prediction model trained based on multiple non-standard simulated image samples and three-channel background light field image samples is adopted to extract features of the corrected image, obtain brightness information and white balance information, and correct it based on these information to achieve synchronous background light field correction and color white balance of a single image.

Benefits of technology

The synchronous background light field correction and color white balance of a single image are achieved, the image quality is improved, the brightness distortion and color distortion are reduced, and the accuracy of image analysis is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113706400B_ABST
    Figure CN113706400B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image correction method, device, microscope image correction method, and electronic device, relating to the field of artificial intelligence technology. The method includes: obtaining an image to be corrected, performing feature extraction on the image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, the three-channel background light field image including brightness information and white balance information; correcting the image to be corrected based on the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected; wherein the light field prediction model is trained based on multiple non-standard simulated image samples and three-channel background light field image samples corresponding to each of the non-standard simulated image samples. The present disclosure can achieve synchronous background light field correction and color white balance for a single image, thereby improving image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an image correction method, an image correction device, a microscope image correction method, a computer-readable medium, and an electronic device. Background Art

[0002] Due to uneven light sources and camera imaging, the captured images often have uneven brightness and dark, which causes brightness distortion of the image. At the same time, due to the difference in warm and cold colors of the light source, color distortion occurs. For example, for images captured by a microscope, due to uneven light sources, warm and cold colors, and imaging reasons, the captured microscope images will have uneven brightness and dark and color distortion. Figure 1 The microscope image shown has darker shadow areas at its four corners, and the color of the entire image is darker, which will have a great impact on the accuracy of the analysis results of the microscope image.

[0003] At present, in order to correct the background and shadows in the image, relevant image correction tools are usually used for image correction, such as the Basic tool, etc. However, this correction method requires multiple different images with the same shooting conditions to estimate the background field, and cannot correct a single image. Of course, there is also a method of correcting images with uneven brightness and color distortion through machine learning models, but usually standard image samples without uneven brightness and color distortion and corresponding image samples with uneven brightness and color distortion are used to train the model, and then the trained model is used to process the image with uneven brightness and color distortion to directly obtain the corresponding corrected image. However, due to the insufficient number of training samples, the stability of the trained model is poor, which in turn causes the corrected image to still have uneven brightness and color distortion, and the correction effect is poor.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0005] The embodiments of the present disclosure provide an image correction method, an image correction device, a microscope image correction method, a computer-readable medium, and an electronic device, which can simultaneously achieve background light field correction and image white balance of the image, at least to a certain extent, and further improve image quality.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0007] According to one aspect of an embodiment of the present disclosure, there is provided an image correction method, comprising: acquiring an image to be corrected, performing feature extraction on the image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, the three-channel background light field image including brightness information and white balance information; correcting the image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected; wherein the light field prediction model is trained based on multiple non-standard simulated image samples and three-channel background light field image samples corresponding to each of the non-standard simulated image samples.

[0008] According to one aspect of an embodiment of the present disclosure, a method for correcting a microscope image is provided, comprising: acquiring a microscope image to be corrected, performing feature extraction on the microscope image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the microscope image to be corrected, the three-channel background light field image including brightness information and white balance information; correcting the microscope image to be corrected based on the three-channel background light field image to obtain a corrected image corresponding to the microscope image to be corrected; wherein the light field prediction model is trained based on multiple non-standard simulated microscope image samples and three-channel background light field image samples corresponding to each of the non-standard simulated microscope image samples.

[0009] According to one aspect of an embodiment of the present disclosure, an image correction device is provided, comprising: a model processing module, configured to acquire an image to be corrected, and perform feature extraction on the image to be corrected through a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; an image correction module, configured to correct the image to be corrected based on the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected; wherein the light field prediction model is trained based on simulated image samples and three-channel background light field image samples corresponding to the simulated image samples.

[0010] In some embodiments of the present disclosure, based on the above scheme, the model processing module is configured to: extract the background light field image information of the three color channels in the image to be corrected through an end-to-end fully convolutional neural network model, so as to determine the three-channel background light field image based on the extracted background light field image information of the three color channels.

[0011] In some embodiments of the present disclosure, based on the above scheme, the image correction module includes: a correction unit, used to correct the image information corresponding to the three color channels in the image to be corrected according to the three-channel background light field image, so as to obtain a corrected image corresponding to the image to be corrected.

[0012] In some embodiments of the present disclosure, the image to be corrected includes R channel image information, G channel image information and B channel image information; the three-channel background light field image includes R channel predicted background light field information, G channel predicted background light field information and B channel predicted background light field information; based on the above scheme, the correction unit is configured as: dividing the R channel image information by the R channel predicted background light field information to obtain R channel corrected image information; dividing the G channel image information by the G channel predicted background light field information to obtain G channel corrected image information; dividing the B channel image information by the B channel predicted background light field information to obtain B channel corrected image information; and obtaining the corrected image according to the R channel corrected image information, the G channel corrected image information and the B channel corrected image information.

[0013] In some embodiments of the present disclosure, based on the above scheme, the image correction device also includes: an information acquisition module, which is used to acquire a standard image set containing multiple standard images, and acquire the light field brightness variation range and the white balance coefficient value range; a parameter determination module, which is used to determine the simulated light field based on the light field brightness variation range, and at the same time determine the white balance sample information according to the white balance coefficient value range, wherein the simulated light field has the same size as the standard image; a three-channel background light field image sample generation module, which is used to determine the three-channel background light field image sample according to the simulated light field and the white balance sample information; a training module, which is used to superimpose the standard images in the standard image set according to the three-channel background light field image samples to obtain the non-standard simulated image samples, and train the light field prediction model to be trained according to the non-standard simulated image samples and the three-channel background light field image samples.

[0014] In some embodiments of the present disclosure, based on the above scheme, the simulated light field is a randomly generated Gaussian-like distributed image with a non-fixed center position and a non-fixed variance; the white balance sample information includes white balance coefficient samples corresponding to three color channels, and each of the white balance coefficient samples is a random number that conforms to a uniform distribution and is independent of each other.

[0015] In some embodiments of the present disclosure, the white balance sample information includes an R channel white balance coefficient, a G channel white balance coefficient, and a B channel white balance coefficient; based on the above scheme, the three-channel background light field image sample generation module is configured to: multiply the brightness information corresponding to each pixel in the simulated light field with the R channel white balance coefficient, the G channel white balance coefficient, and the B channel white balance coefficient respectively to obtain R channel background light field information, G channel background light field information, and B channel background light field information; determine the three-channel background light field image sample based on the R channel background light field information, the G channel background light field information, and the B channel background light field information.

[0016] In some embodiments of the present disclosure, based on the above scheme, the training module is configured to: input the non-standard simulated image samples into the light field prediction model to be trained, perform feature extraction on the non-standard simulated image samples through the light field prediction model to be trained to obtain a predicted three-channel background light field image; determine a first loss function based on the predicted three-channel background light field image and the three-channel background light field image samples corresponding to the non-standard simulated image samples; and optimize the parameters of the light field prediction model to be trained based on the first loss function to obtain the light field prediction model.

[0017] In some embodiments of the present disclosure, based on the above scheme, the image correction device is further configured to: construct a second loss function based on the image information corresponding to the three color channels of each pixel in the predicted three-channel background light field image; and optimize the parameters of the light field prediction model to be trained based on the first loss function and the second loss function to obtain the light field prediction model.

[0018] In some embodiments of the present disclosure, based on the above solution, the first loss function is calculated according to formula (1):

[0019]

[0020] Wherein, i is the RGB three channels, i=1,2,3, (x, y) is the position coordinate of any pixel in the non-standard simulated image sample or the predicted three-channel background light field image, M is the maximum value of the horizontal coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, N is the maximum value of the vertical coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, F i (x, y) is the three-channel background light field image sample corresponding to the non-standard simulated image sample, F i '(x,y) is the predicted three-channel background light field image.

[0021] In some embodiments of the present disclosure, based on the above solution, the second loss function is calculated according to formula (2):

[0022]

[0023] Wherein, i is the RGB three channels, i=1,2,3, (x, y) is the position coordinate of any pixel in the non-standard simulated image sample or the predicted three-channel background light field image, M is the maximum value of the horizontal coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, N is the maximum value of the vertical coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, F i '(x,y) is the predicted three-channel background light field image, is the difference operator.

[0024] In some embodiments of the present disclosure, based on the above scheme, the image correction device is further configured to: perform feature extraction on the corrected image through the light field prediction model to obtain a three-channel background light field image corresponding to the corrected image; re-correct the corrected image according to the three-channel background light field image corresponding to the corrected image to obtain an optimized corrected image; repeat the above steps to iteratively correct the optimized corrected image until the optimal corrected image is obtained.

[0025] According to one aspect of an embodiment of the present disclosure, a microscope image correction device is provided, comprising: a feature extraction module for acquiring a microscope image to be corrected, performing feature extraction on the microscope image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the microscope image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; a microscope image correction module for correcting the microscope image to be corrected based on the three-channel background light field image to obtain a corrected image corresponding to the microscope image to be corrected; wherein the light field prediction model is trained based on multiple non-standard simulated microscope image samples and three-channel background light field image samples corresponding to each of the non-standard simulated microscope image samples.

[0026] According to one aspect of an embodiment of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the image correction method or microscope image correction method provided in the above-mentioned optional implementation manner is implemented.

[0027] According to one aspect of an embodiment of the present disclosure, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the image correction method or microscope image correction method provided in the aforementioned optional implementation.

[0028] According to one aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method provided in the above-mentioned optional implementation manner.

[0029] In the technical solutions provided by some embodiments of the present disclosure, a light field prediction model to be trained is first trained to obtain a stable light field prediction model. Next, the light field prediction model is used to extract features from a single image to be corrected that has brightness and color distortion to obtain a corresponding three-channel background light field image. Accordingly, the three-channel background light field image includes brightness information and white balance information. Finally, the image to be corrected is corrected based on the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected. The technical solutions disclosed herein enable simultaneous background light field correction and color white balance for a single image, improving image quality.

[0030] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0032] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solutions of the embodiments of the present disclosure can be applied;

[0033] Figure 2 The following schematically shows a flow chart of an image correction method according to an embodiment of the present disclosure;

[0034] Figure 3 The following schematically shows a structural diagram of a light field prediction model according to an embodiment of the present disclosure;

[0035] Figure 4 The following schematically shows a flow chart of obtaining a rectified image according to an embodiment of the present disclosure;

[0036] Figure 5 The following schematically illustrates a flow chart of training a light field prediction model to be trained according to an embodiment of the present disclosure;

[0037] Figure 6 The following schematically illustrates a flow chart of training a light field prediction model to be trained based on non-standard simulated image samples and three-channel background light field image samples according to one embodiment of the present disclosure;

[0038] Figure 7 The following schematically shows a flow chart of a microscope image correction method according to an embodiment of the present disclosure;

[0039] Figure 8 Schematically shows an interface diagram of a microscope image correction method according to an embodiment of the present disclosure;

[0040] Figures 9A-9C Schematically illustrates an interface diagram of a non-standard simulated microscope image sample and a three-channel background light field image sample generated based on a standard glass slide image according to an embodiment of the present disclosure;

[0041] Figures 10A-10C Schematic diagram of an interface showing microscope images before and after correction according to one embodiment of the present disclosure;

[0042] Figure 11 A schematic diagram of an interface of a microscope image corrected by a correction method in the present disclosure and a correction method in the related art according to an embodiment of the present disclosure is schematically shown;

[0043] Figure 12 A block diagram of an image correction device according to an embodiment of the present disclosure is schematically shown;

[0044] Figure 13 A block diagram schematically illustrates a microscope image correction device according to an embodiment of the present disclosure;

[0045] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0046] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0047] In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present disclosure.

[0048] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0049] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0050] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solutions of the embodiments of the present disclosure can be applied is shown.

[0051] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102, and a server 103. The terminal device 101 may be a terminal device with a capture unit, such as a smartphone, a portable computer, a tablet computer, a video camera, a still camera, or a camera microscope. The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as a wired communication link, a wireless communication link, and the like. In the embodiment of the present disclosure, the network 102 between the terminal device 101 and the server 103 may be a wireless communication link, specifically a mobile network.

[0052] It should be understood that Figure 1The number of terminal devices, networks, and servers in the present disclosure is merely illustrative. Depending on the implementation requirements, any number of terminal devices, networks, and servers may be provided. It is worth noting that the server in the present disclosure may be an independent server or a server cluster formed by multiple servers.

[0053] In one embodiment of the present disclosure, after the user shoots the target scene through the shooting unit in the terminal device 101, the corresponding image can be obtained. Since there may be uneven light sources, cold and warm colors of the light sources, and camera imaging reasons of the terminal device during the shooting process, the captured image will have more or less brightness distortion and color distortion problems. For the image to be corrected with this problem, it can be sent from the terminal device 101 to the server 103 through the network 102, so that the image correction module installed in the server 103 can correct it and obtain a corrected image with corrected brightness distortion and color distortion. Specifically, a light field prediction model is provided in the image correction module of the server 103. The light field prediction model can perform feature extraction on the received image to be corrected to output a three-channel background light field image corresponding to it, and then the three-channel background light field image is removed from the image to be corrected to obtain the corrected image. Since the three-channel background light field image includes brightness information and white balance information, when the three-channel background light field image is removed from the image to be corrected, the brightness and chromaticity in the image to be corrected can be adjusted simultaneously to obtain a corrected image without brightness distortion and color distortion.

[0054] Specifically, the image to be corrected can be a microscope image obtained by photographing a slide image displayed in the eyepiece using a camera microscope. After extracting features from the microscope image using a light field prediction model to obtain a three-channel background light field image corresponding to the microscope image, the microscope image can be corrected based on the three-channel background light field image to obtain a standard microscope image. A standard microscope image means that the brightness of the microscope image can be restored to the brightness of a common scanned image, and the chromaticity can also achieve uniform chromaticity.

[0055] It should be noted that the image correction method and microscope image correction method provided in the embodiments of the present disclosure are generally executed by a server, and accordingly, the image correction device and microscope image correction device are generally installed in the server. However, in other embodiments of the present disclosure, the image correction method and microscope image correction device provided in the embodiments of the present disclosure can also be executed by a terminal device. In other words, after the terminal device obtains the image to be corrected, it can extract the three-channel background light field image from the image to be corrected through the built-in light field prediction model, and then remove the three-channel background light field image from the image to be corrected to obtain the corresponding corrected image.

[0056] As described in the background technology, in the related technologies in this field, the brightness and chromaticity in the image are mainly corrected by image correction tools. However, this correction method requires multiple different images with the same shooting conditions to estimate the background field, and cannot correct a single image. At the same time, in the related technologies in this field, there is also image processing through machine learning models to correct images with brightness distortion and color distortion. However, during model processing, the input image is first downsampled, and then prediction is made based on the downsampled image. In this way, even if the output image is upsampled to the original size, the accuracy of the output image is very poor and the image quality is reduced. That is, the output corrected image still has the problem of brightness distortion and color distortion. In addition, the number of training samples is not large enough, which will lead to poor stability of the trained model, which will lead to the corrected image still having uneven brightness and color distortion, and the correction effect is poor.

[0057] In view of the problems existing in the related art, the embodiments of the present disclosure provide an image correction method and a microscope image correction method, which are implemented based on machine learning. Machine learning is a type of artificial intelligence. Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0058] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0059] Computer vision (CV) is the science of making machines "see." Specifically, it refers to machine vision, where cameras and computers replace the human eye in identifying, tracking, and measuring objects. This involves further processing the images, transforming them into images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0060] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0061] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0062] The solution provided by the embodiments of the present disclosure involves artificial intelligence image processing technology, which is specifically described through the following embodiments:

[0063] The present disclosure first provides an image correction method. The following describes in detail the implementation of the technical solution of the present disclosure:

[0064] Figure 2 The flowchart of the image correction method according to one embodiment of the present disclosure is schematically shown. The image correction method can be executed by a server, which can be Figure 1 The service 103 shown in FIG. Figure 2 As shown, the image correction method includes at least steps S210 to S220, which are described in detail as follows:

[0065] In step S210, an image to be corrected is obtained, and features are extracted from the image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, where the three-channel background light field image includes brightness information and white balance information.

[0066] In one embodiment of the present disclosure, when capturing images, whether for indoor or outdoor scenes, there may be uneven brightness and darkness in the captured images due to uneven brightness of the light source and camera imaging, resulting in image brightness distortion, i.e., abnormal background light field. At the same time, due to the difference in warm and cold colors of the light source, the image color is distorted, i.e., abnormal white balance. In the embodiment of the present disclosure, images with brightness distortion and color distortion are named as images to be corrected. The images to be corrected not only have low image quality and affect the viewing experience, but may also have other disadvantages. For example, when the images to be corrected are pathological images, equipment damage images, etc., the brightness distortion and color distortion in the images may cause large errors in the final pathological analysis results and damage detection results, thereby causing errors in the final diagnostic conclusions and detection results. Therefore, it is necessary to correct images with brightness distortion and color distortion.

[0067] In one embodiment of the present disclosure, the correction of the image to be corrected can be divided into two steps: the first step: extracting a three-channel background light field image from the image to be corrected; the second step: correcting the image to be corrected based on the three-channel background light field image. For the first step, the embodiment of the present disclosure uses a light field prediction model to extract the three-channel background light field image. This light field prediction model can be an end-to-end fully convolutional network model with any network structure, such as U-Net, LinkNet, etc., where end-to-end means inputting the image to be corrected and outputting a corresponding three-channel background light field image of the same image size, rather than predicting information such as classification.

[0068] After inputting the image to be corrected into the light field prediction model, the model extracts features from the image to obtain background light field image information for its three color channels: R, G, and B. This information then determines the output three-channel background light field image based on the extracted R, G, and B channels. Next, we'll use LinkNet as an example to explain the structure and working principles of the light field prediction model.

[0069] Figure 3 The structural diagram of the light field prediction model is shown in FIG. Figure 3As shown, the light field prediction model includes a convolution layer 301, a maximum pooling layer 302, an encoding layer 303, a decoding layer 304, a full convolution layer 305, a convolution layer 306, and a full convolution layer 307, wherein the encoding layer 303 includes multiple encoding blocks (encoding block 1, encoding block 2, encoding block 3, and encoding block 4), and the decoding layer 304 includes decoding blocks (decoding block 1, decoding block 2, decoding block 3, and decoding block 4) with the same number as the encoding blocks, and each encoding block is connected to the decoding block, and the input of the encoding block is connected to the output of the corresponding decoding block. In addition, Figure 3 Parameters in the convolution layer 301, the maximum pooling layer 302, the full convolution layer 305, the convolution layer 306, and the full convolution layer 307 are also shown. It is worth noting that the parameter setting is only for exemplary purposes and can also be set to other parameter values. The embodiments of the present disclosure do not specifically limit this.

[0070] In adopting Figure 3 When the light field prediction model shown performs feature extraction on the image to be corrected, it first performs feature extraction and downsampling on the image to be corrected through the convolution layer 301. Then, the feature map output by the convolution layer 301 is pooled and downsampled through the maximum pooling layer 302. Then, the input pooled feature map is encoded and compressed through the encoding layer 303 to obtain low-dimensional low-level semantic feature information, such as color information and brightness information. After the encoding layer 303 completes the encoding and compression of the pooled feature map, the low-level semantic feature information can be input into the decoding layer 304, so that the decoding layer 304 performs decoding operations on the low-level semantic feature information. The feature information output by the decoding layer 304 is then extracted and upsampled in sequence through the full convolution layer 305, the convolution layer 306, and the full convolution layer 307, where the upsampling and downsampling multiples are the same, so as to output a three-channel background light field image with the same original size as the image to be corrected. Since each encoding block is connected to the decoding block, and the input of the encoding block is connected to the output of the corresponding decoding block, the encoding block can integrate the low-level semantic feature information into the decoding block, so that the decoding block integrates the low-level semantic feature information and the high-level semantic feature information, which can effectively reduce the spatial information lost during the downsampling operation. Moreover, the decoding block shares the parameters learned from each layer of the encoding block, so the parameters of the decoding block can be effectively reduced.

[0071] By analyzing the structure and working principle of the light field prediction model adopted in the embodiment of the present disclosure, it can be seen that in the embodiment of the present disclosure, after the input image to be corrected is down-sampled, the three-channel background light field information of the down-sampled image is predicted, and then up-sampled to restore it to the original size, and the image to be corrected is corrected based on the up-sampled three-channel background light field information. Since the three-channel background light field information is smooth and gradual, even if downsampling and upsampling occur during the model processing process, the corrected image obtained by correcting the image to be corrected based on the up-sampled three-channel background light field image also has high image quality.

[0072] In step S220 , the image to be corrected is corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected.

[0073] In one embodiment of the present disclosure, after acquiring a three-channel background light field image, the image to be corrected can be corrected based on the three-channel background light field image to obtain a corrected image with corrected brightness and color distortions. Specifically, when correcting the image to be corrected, the image information corresponding to the three color channels in the image to be corrected can be corrected based on the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected.

[0074] In an embodiment of the present disclosure, a three-channel background light field image is predicted by a light field prediction model based on the image to be corrected, which contains predicted background light field image information corresponding to the three color channels of R, G, and B, namely, the R channel predicted background light field information, the G channel predicted background light field information, and the B channel predicted background light field information. When correcting the image information corresponding to the three color channels in the image to be corrected according to the three-channel background light field image, the image information of the corresponding color channels in the image to be corrected can be corrected according to the R channel predicted background light field information, the G channel predicted background light field information, and the B channel predicted background light field information.

[0075] The relationship between uneven brightness and changes in brightness and darkness is usually a linear transformation, as shown in formula (1):

[0076] I 成像 (x,y)=I 真实 (x,y)×S(x,y)+D(x,y) (1)

[0077] Among them, I 成像 is the image captured with uneven light field, I 真实 is an ideal uniform brightness image, S is the multiplicative light intensity, D is the additive dark field, and (x, y) is the pixel at coordinate (x, y) in the image.

[0078] Since image processing is done pixel by pixel, from the perspective of linear transformation, 真实 The multiplication and addition operations of (x, y) can be transformed into a multiplication relationship, so formula (1) can be degenerated into a unified background light field (brightness information) M, as shown in formula (2):

[0079] I 成像 (x,y)=I 真实 (x,y)×M(x,y) (2)

[0080] Comparing formula (2) with formula (1), it can be seen that the transformation between the captured image with uneven light field and the ideal image with uniform brightness is still a linear relationship.

[0081] The above formula only considers the case of brightness distortion, that is, for a single grayscale image, there is a mathematical relationship between the image with uneven light field and the ideal image with uniform brightness, as shown in formulas (1) and (2). To obtain I 真实 (x,y), just according to I 成像 Just calculate (x,y) / M(x,y).

[0082] Because brightness changes vary from pixel to pixel, each pixel is assigned its own unique linear transformation coefficient M(x). Color distortion is also related to white balance, which refers to the ability to restore white objects to white regardless of light source. When a camera captures brightfield images, white typically refers to the visual response created by the light reflected into the human eye, which is composed of blue, green, and red light in equal proportions and with a certain brightness. In an RGB color image, this corresponds to the grayscale values of the three R, G, and B channels being similar. For example, when the grayscale values of all three R, G, and B channels are 255, the image appears pure white. As can be seen from the above description, differences in white balance are primarily due to differences in the coefficients corresponding to the different color channels for each pixel. Therefore, it can be assumed that for any pixel in the image, the background light field (brightness information) of the R, G, and B channels is uniform, with only differences in the white balance coefficients. Therefore, even when both brightness and color distortion are present, the captured image (the image to be corrected) and the ideal image (the corrected image) remain linearly correlated.

[0083] When considering both brightness distortion and color distortion, it is necessary to correct the image information corresponding to the three color channels in the image to be corrected based on the background light field information related to the three color channels to obtain a corrected image. In the embodiment of the present disclosure, the three-channel background light field image output by the light field prediction model for processing the image to be corrected includes R channel predicted background light field information, G channel predicted background light field information, and B channel predicted background light field information. At the same time, the image to be corrected includes R channel image information, G channel image information, and B channel image information. Therefore, the corrected image information of each color channel can be obtained based on the linear relationship of formula (2), and then the corrected image is determined based on the corrected image information of each color channel. The corrected image obtained after correction corrects the uneven brightness and color distortion of the image to be corrected, so that the image quality is higher and more in line with the real ideal image effect.

[0084] Figure 4 FIG. 4 shows a flow chart of obtaining a rectified image, as shown in FIG. Figure 4As shown, in step S401, the R channel image information is divided by the R channel predicted background light field information to obtain the R channel corrected image information; in step S402, the G channel image information is divided by the G channel predicted background light field information to obtain the G channel corrected image information; in step S403, the B channel image information is divided by the B channel predicted background light field information to obtain the B channel corrected image information; in step S404, a corrected image is obtained according to the R channel corrected image information, the G channel corrected image information and the B channel corrected image information.

[0085] It can be seen from the above embodiments that when performing image correction in the embodiments of the present disclosure, it is only necessary to input an image to be corrected with brightness distortion and color distortion into the light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, and then correct the image to be corrected based on the three-channel background light field image to obtain a corrected image. Compared with the method in the related art that requires obtaining multiple different images with the same shooting conditions to estimate the background field and correcting the image based on the background field, the image correction method in the embodiments of the present disclosure is more convenient, more efficient, and has better image quality.

[0086] In one embodiment of the present disclosure, before using the light field prediction model to extract features from the image to be rectified, the light field prediction model to be trained needs to be trained to obtain a stable light field prediction model. Figure 5 FIG. 4 shows a flow chart of training the light field prediction model to be trained, such as Figure 5 As shown, in step S501, a standard image set including multiple standard images is obtained, and a light field brightness variation range and a white balance coefficient value range are obtained; in step S502, a simulated light field is determined based on the light field brightness variation range, and white balance sample information is determined according to the white balance coefficient value range, wherein the simulated light field has the same size as the standard image; in step S503, a three-channel background light field image sample is determined according to the simulated light field and the white balance sample information; in step S504, the standard image in the standard image set is processed according to the three-channel background light field image sample to obtain a non-standard simulated image sample, and the light field prediction model to be trained is trained according to the non-standard simulated image sample and the three-channel background light field image sample.

[0087] Among them, the light field brightness variation range and the white balance coefficient value range in step S501 can be set according to actual needs. In the embodiment of the present disclosure, the light field brightness variation range can be set to [0.5, 1], and the white balance coefficient value range can be set to [0.7, 1.2]. Of course, other numerical ranges can also be used, and the present disclosure does not specifically limit this. In step S502, when determining the simulated light field based on the light field brightness variation range, a Gaussian-like distributed image with a non-fixed center position and a non-fixed scale (variance) can be randomly generated based on the values in the light field brightness variation range as the simulated light field. When determining the white balance sample information based on the white balance coefficient value range, three different random numbers can be arbitrarily determined from the white balance coefficient value range as white balance coefficient samples for the three color channels, and then the white balance sample information is obtained based on the white balance coefficient samples of the three color channels. It is worth noting that the white balance coefficient samples are random numbers that conform to a uniform distribution and are independent of each other. After determining the simulated light field and white balance sample information, three-channel background light field image samples can be determined based on the simulated light field and white balance sample information, and then the standard image can be processed based on the three-channel background light field image samples to obtain non-standard simulated image samples.

[0088] It is mentioned in the above embodiment that for any pixel in the image, the background light field (brightness information) of the three channels R, G, and B is unified, and there is only a difference in the white balance coefficient. Therefore, when there is both brightness distortion and color distortion, the captured image (image to be corrected) and the ideal image (corrected image) are still linearly correlated. In view of this, when constructing a three-channel background light field image sample, the background light field information of the R, G, and B channels can be obtained based on the white balance coefficients of the R, G, and B channels and the brightness information corresponding to each pixel, and then the three-channel background light field image sample is obtained based on the background light field information of the R, G, and B channels. Specifically, the brightness information corresponding to each pixel in the simulated light field can be multiplied with the R channel white balance coefficient, the G channel white balance coefficient, and the B channel white balance coefficient in the white balance sample information to obtain the R channel background light field information, the G channel background light field information, and the B channel background light field information. The specific calculation method is shown in formulas (3)-(5):

[0089] M R (x,y)=a1×M(x,y) (3)

[0090] M G (x,y)=a2×M(x,y) (4)

[0091] M B (x,y)=a3×M(x,y) (5)

[0092] Among them, M R (x, y) is the R channel background light field information, MG (x, y) is the background light field information of G channel, M B (x, y) is the B channel background light field information, a1 is the R channel white balance coefficient, a2 is the G channel white balance coefficient, a3 is the B channel white balance coefficient, and M(x, y) is the unified background light field, that is, brightness information.

[0093] Next, a three-channel background light field image sample can be determined based on the calculated R channel background light field information, G channel background light field information, and B channel background light field information.

[0094] The purpose of training the light field prediction model to be trained is to enable the model to extract the three-channel background light field image from the image to be corrected. That is, the image to be corrected is a non-standard image with brightness distortion and color distortion. Therefore, when training the light field prediction model to be trained, it is necessary to process the standard image to generate non-standard simulated image samples in order to train the light field prediction model to be trained. In an embodiment of the present disclosure, the standard image in the standard image set can be processed according to the three-channel background light field image samples to obtain the non-standard simulated image samples. When processing the standard image in the standard image set according to the three-channel background light field image samples, the R channel image information, G channel image information, and B channel image information in the standard image can be processed based on the R channel background light field information, G channel background light field information, and B channel background light field information in the three-channel background light field image samples to obtain non-standard simulated image information corresponding to the R, G, and B channels. Then, the non-standard simulated image samples containing brightness distortion and color distortion are obtained according to the non-standard simulated image information corresponding to the R, G, and B channels. Specifically, the mathematical expressions for obtaining the non-standard analog image information corresponding to the R, G, and B channels are shown in formulas (6)-(8):

[0095] I R 成像 (x,y)=I R 真实 (x,y)×M R (x,y)=I R 真实 (x,y)×(a1×M(x,y)) (6)

[0096] I G 成像 (x,y)=I G 真实 (x,y)×M G (x,y)=I G 真实 (x,y)×(a2×M(x,y)) (7)

[0097] I B成像 (x,y)=I B 真实 (x,y)×M B (x,y)=I B 真实 (x,y)×(a3×M(x,y)) (8)

[0098] Among them, I R 真实 (x, y) is the R channel image information in the standard image, I G 真实 (x, y) is the G channel image information in the standard image, I B 真实 (x, y) is the B channel image information in the standard image, I R 成像 (x, y) is the R channel non-standard analog image information, I G 成像 (x, y) is the non-standard analog image information of G channel, I B 成像 (x,y) is the non-standard analog image information of the B channel.

[0099] Finally, I R 成像 (x,y),I G 成像 (x,y) and I B 成像 (x,y) can be integrated to obtain non-standard simulated image samples.

[0100] From the above description, it can be seen that when correcting the corrected image, the inverse transformation of formulas (6)-(8) is used. This correction method is also the same as Figure 4 The process diagram of obtaining the corrected image shown in FIG is corresponding to that shown in FIG. , that is, the image information of the R, G, and B channels in the image to be corrected is divided by the R, G, and B channels in the three-channel background light field image corresponding to the image to be corrected. The specific mathematical expression formula is shown in formulas (9)-(11):

[0101] I R 矫正 (x,y)=I R 待矫正 (x,y) / M R’ (x,y)=I R 待矫正 (x,y) / (a1'×M'(x,y)) (9)

[0102] I G 矫正 (x,y)=I G待矫正 (x,y) / M G’ (x,y)=I G 待矫正 (x,y) / (a2'×M'(x,y)) (10)

[0103] I B 矫正 (x,y)=I B 待矫正 (x,y) / M B’ (x,y)=I B 待矫正 (x,y) / (a3'×M'(x,y)) (11)

[0104] Among them, I R 待矫正 (x, y) is the R channel image information in the image to be corrected, I G 待矫正 (x, y) is the G channel image information in the image to be corrected, I B 待矫正 (x, y) is the B channel image information in the image to be corrected, M R’ (x, y) is the background light field information predicted by the R channel, M G’ (x, y) is the background light field information predicted by the G channel, M B’ (x, y) is the background light field information predicted by the B channel, a1' is the white balance coefficient of the R channel in the image to be corrected, a2' is the white balance coefficient of the G channel in the image to be corrected, a3' is the white balance coefficient of the B channel in the image to be corrected, and M'(x, y) is the brightness information.

[0105] It's worth noting that, to reduce the amount of data required for model training, larger standard images can be cropped to reduce their size, thereby reducing the amount of data processing. Furthermore, the Gaussian-like distribution in this disclosure can be a Gaussian distribution or a multi-modal moderated Gaussian distribution. Of course, the simulated light field can also be other gradient distributions, which will not be further detailed in this disclosure.

[0106] Figure 6 FIG. 4 shows a flow chart of training a light field prediction model based on non-standard simulated image samples and three-channel background light field image samples, as shown in FIG. Figure 6As shown, in step S601, the non-standard simulated image samples are input into the light field prediction model to be trained, and the features of the non-standard simulated image samples are extracted by the light field prediction model to be trained to obtain a predicted three-channel background light field image; in step S602, a first loss function is determined according to the predicted three-channel background light field image and the three-channel background light field image samples corresponding to the non-standard simulated image samples; in step S603, the parameters of the light field prediction model to be trained are optimized based on the first loss function to obtain a light field prediction model.

[0107] When training the light field prediction model to be trained, the Adam optimization method can be used to train according to a preset learning rate. The learning rate can be set arbitrarily, for example, to 0.001, etc. In the embodiment of the present disclosure, the first loss function can be specifically the minimum mean square error, and the specific expression is shown in formula (12):

[0108]

[0109] Where i is the RGB three channels, i = 1, 2, 3, (x, y) is the position coordinate of any pixel in the non-standard simulated image sample or the predicted three-channel background light field image, M is the maximum horizontal coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, N is the maximum vertical coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, F i (x, y) is the three-channel background light field image sample corresponding to the non-standard simulated image sample, F i '(x,y) is the predicted three-channel background light field image.

[0110] In one embodiment of the present disclosure, since the simulated light field is a Gaussian-like distribution, the light field changes gradually. Even a non-uniform light field should change gradually, not suddenly. Therefore, to prevent sudden changes in the light field, a smoothness constraint can be added to the three-channel background light field image before outputting it. This smoothness constraint can be achieved by minimizing the difference between adjacent pixels in the three-channel background light field image. If the light field changes corresponding to all pixels are consistent, that is, a constant, the difference result is 0, indicating that the three-channel background light field image is smoothest. If there are sudden changes in adjacent pixels, the difference result is too large, indicating that the three-channel background light field image is not smooth. In this embodiment of the present disclosure, a difference coefficient c can be set as to control the light field change. The optimized value of the difference coefficient c can be determined by training a light field prediction model to be trained. Specifically, a second loss function can be constructed based on the image information corresponding to the three color channels of each pixel in the predicted three-channel background light field image. The parameters of the trained light field prediction model are then optimized based on the first and second loss functions to obtain the light field prediction model. The expression of the second loss function is shown in formula (13):

[0111]

[0112] Where i is the RGB three channels, i = 1, 2, 3, (x, y) is the position coordinate of any pixel in the non-standard simulated image sample or the predicted three-channel background light field image, M is the maximum horizontal coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, N is the maximum vertical coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, F i '(x,y) is the predicted three-channel background light field image, is the difference operator.

[0113] Furthermore, F in formulas (12)-(13) i '(x,y) is determined based on the background light field information of the R, G, and B channels determined according to formulas (3)-(5).

[0114] It is worth noting that in addition to using a simple adjacent pixel difference method to perform smoothing constraints in the embodiment of the present disclosure, the Sobel operator can also be used for smoothing constraints. Of course, other methods can also be used for smoothing constraints, and the embodiment of the present disclosure does not make specific limitations on this.

[0115] By iteratively training the light field prediction model to be trained, optimized model parameters can be obtained. The light field prediction model based on the optimized model parameters can accurately extract the three-channel background light field image in the image to be corrected, thereby ensuring the quality of the corrected image.

[0116] In one embodiment of the present disclosure, when the corrected image obtained through one round of correction does not achieve the ideal effect, the corrected image can be further corrected, and the number of corrections can be one or more times until the optimal corrected image is obtained. Specifically, the corrected image can be feature extracted using a light field prediction model to obtain a three-channel background light field image corresponding to the corrected image; then, the corrected image can be re-corrected based on the three-channel background light field image corresponding to the corrected image to obtain an optimized corrected image; and it is determined whether the optimized corrected image achieves the ideal effect. If not, the above steps are repeated to iteratively correct the optimized corrected image until the optimal corrected image is obtained.

[0117] The image correction method of the disclosed embodiment can be applied to multiple fields, and any image with brightness distortion and color distortion can be corrected using this method. In particular, the image correction method can be used to correct microscope images. For example, after a pathologist prepares a pathological tissue into a pathology slide, the pathology slide can be photographed using a camera microscope and the acquired pathology slide image can be analyzed to obtain the pathology analysis result. If brightness distortion and color distortion exist in the pathology slide image, the pathology analysis result may be biased, which has a significant impact on the accuracy of the final diagnosis result. Therefore, it is necessary to obtain high-quality pathology slide images to ensure the accuracy of the diagnosis result.

[0118] The disclosed embodiment further provides a microscope image correction method. The process of the correction method is the same as that of the image correction method in the above embodiment, with the only difference being that the analysis object is the microscope image to be corrected. Figure 7 A schematic diagram of the process of correcting a microscope image is shown. Figure 7 As shown:

[0119] In step S710, a microscope image to be corrected is obtained, and features are extracted from the microscope image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the microscope image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information.

[0120] In step S720, the microscope image to be corrected is corrected according to the three-channel background light field image to obtain a corrected image corresponding to the microscope image to be corrected;

[0121] The light field prediction model is trained based on a plurality of non-standard simulated microscope image samples and three-channel background light field image samples corresponding to each of the non-standard simulated microscope image samples.

[0122] When correcting a microscope image, a trained light field prediction model can be used to extract features of the microscope image to be corrected to obtain a three-channel background light field image corresponding to the microscope image to be corrected. The three-channel background light field image includes brightness information and white balance information. Finally, the microscope image to be corrected is corrected according to the three-channel background light field image to obtain a corrected image corresponding to the microscope image to be corrected, such as Figure 8 As shown in the figure, image A is a microscope image to be corrected with brightness distortion and color distortion. After feature extraction using the light field prediction model, a three-channel background light field image B can be obtained. Finally, the three-channel background light field image B is subtracted from the microscope image to be corrected A to obtain the corrected image C. It can be seen that image C has more uniform brightness and uniform color than image A.

[0123] In one embodiment of the present disclosure, the specific methods and details for correcting the microscope image to be corrected are the same as those for the correction images in the aforementioned embodiments and will not be further elaborated here. However, the training samples used in the model training phase will vary for different correction targets. When training the light field prediction model for correcting microscope images, paired non-standard simulated microscope image samples and three-channel background light field image samples can be constructed using simulation data for training. When constructing non-standard simulated microscope image samples, the glass slide is first scanned by a scanner to obtain a standard glass slide image. The scanner has the characteristics of stable image imaging performance and uniform light field. Therefore, it can be considered that the glass slide image scanned by the scanner does not have brightness distortion and color distortion, and can be considered as an ideal standard glass slide image; then, a pair of brightness uneven images and their corresponding background light fields are constructed through computer simulation data, and the white balance coefficients (a1, a2 and a3) corresponding to the three channels are randomly generated. The three-channel background light field can be determined based on the background light field and the randomly generated white balance coefficients corresponding to the three channels; then, the standard glass slide image and the three-channel background light field are superimposed to obtain a non-standard simulated microscope image sample with brightness distortion and color distortion. At the same time, a three-channel background light field image sample can be generated based on the brightness uneven image and the white balance coefficients corresponding to the three channels; finally, the light field prediction model to be trained can be trained based on the non-standard simulated microscope image samples and the three-channel background light field image samples.

[0124] Figures 9A-9C The figure shows the interface diagram of the non-standard simulated microscope image sample and the three-channel background light field image sample generated based on the standard glass slide image. Figure 9A As shown, Figure a-1 is a standard glass slide image without brightness distortion and color distortion, Figure b-1 is a simulated three-channel background light field image sample, and Figure c-1 is a non-standard simulated microscope image sample generated by processing the standard glass slide image a-1 based on the simulated three-channel background light field; Figure 9B As shown, Figure a-2 is the same standard glass slide image as Figure a-1, Figure b-2 is a simulated three-channel background light field image sample, and the difference between Figure b-2 and Figure b-1 is only the white balance coefficient. Figure c-2 is a non-standard simulated microscope image sample generated by processing the standard glass slide image a-2 based on the simulated three-channel background light field; Figure 9CAs shown, Figure a-3 is the same standard glass slide image as Figure a-1 and Figure a-2, and Figure b-3 is a simulated three-channel background light field image sample. The only difference between Figure b-3 and Figure b-1 and Figure b-2 is the white balance coefficient. Figure c-3 is a non-standard simulated microscope image sample generated by processing the standard glass slide image a-3 based on the simulated three-channel background light field. It is worth noting that when simulating the generation of the three-channel background light field image sample, different brightness variation ranges, different center positions, and different sizes can be selected, and random selection can also be made when randomly generating the three-channel white balance coefficients. Therefore, different three-channel background light field image samples can be generated based on different parameter combinations, and different non-standard simulated microscope image samples can be generated for the same standard glass slide image. Furthermore, when training the model based on a large number of non-standard simulated microscope image samples and three-channel background light field image samples, the model training does not strictly use the non-standard simulated microscope image samples and the corresponding three-channel background light field image samples. The training can be performed by shuffling the pairs, which can improve the performance of the model.

[0125] The trained light field prediction model can be used to correct any microscope image. Figures 10A-10C The interface diagram of the microscope image before and after correction is shown in FIG. Figure 10A As shown in the figure, the image on the left is the microscope image before correction, with darker shadows in the four corners and inconsistent chromaticity of the entire image. The image in the middle is the three-channel background light field image extracted from the microscope image before correction by the light field prediction model. The image on the right is the microscope image after correction, that is, the corrected image obtained by processing the microscope image before correction according to the three-channel background light field image. It can be seen from the figure that the shadows in the four corners of the microscope image after correction become lighter and less, almost negligible, and the chromaticity of the entire image tends to be consistent, and substances such as cell nuclei are clearer. Similarly, Figure 10B and Figure 10C A set of microscope images before correction, the corresponding three-channel background light field images and the microscope images after correction are also shown. Figure 10A Similarly, the microscope image corrected by the microscope image correction method in the embodiment of the present disclosure has higher image quality, and the degrees of brightness distortion and color distortion are very low and almost negligible.

[0126] The microscope image correction method disclosed in the present invention can correct microscope images to be corrected that have brightness distortion and color distortion. Compared with the prior art of directly processing the corrected microscope image through a machine learning model to output the corrected microscope image, the image correction method and microscope image correction method disclosed in the present invention have better effects. Figure 11The schematic diagram of the interface of the microscope image after correction by the correction method in the present disclosure and the correction method in the related art is shown as follows: Figure 11 As shown, the image on the left is the microscope image to be corrected, the image in the middle is the microscope image corrected by the correction method in the related art, and the image on the right is the microscope image corrected by the method in the present disclosure. By comparing the three images, it can be found that the microscope image corrected by the microscope image correction method in the embodiment of the present disclosure has more uniform brightness and more consistent color, and the image quality is better than the microscope image corrected by the correction method in the related art.

[0127] In the image correction method or microscope image correction method of the embodiment of the present disclosure, first, a light field prediction model to be trained is trained to obtain a stable light field prediction model; then, the light field prediction model is used to extract features of the image to be corrected that has uneven brightness and color distortion to obtain a corresponding three-channel background light field image. Accordingly, the three-channel background light field image includes brightness information and white balance information; finally, the image to be corrected is corrected based on the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected. From the analysis of the technical solution of the present disclosure, it can be seen that as long as an image with brightness distortion and color distortion is input, the image correction method of the present disclosure can be used to correct it to obtain a standard image with corrected brightness distortion and color distortion. In other words, the technical solution of the present disclosure can achieve synchronous background light field correction and color white balance for a single image, thereby improving image quality. In addition, in the embodiment of the present disclosure, when training the model, there is no need to collect light field data. The model training can be completed entirely through the three-channel simulated background light field image and the non-standard simulated image, saving manpower and material resources.

[0128] The following describes an embodiment of the device disclosed herein, which can be used to perform the image correction method described in the above-mentioned embodiment of the present disclosure. For details not disclosed in the embodiment of the device disclosed herein, please refer to the embodiment of the image correction method described in the above-mentioned embodiment of the present disclosure.

[0129] Figure 12 A block diagram of an image correction device according to an embodiment of the present disclosure is schematically shown.

[0130] Reference Figure 12 As shown, an image correction device 1200 according to an embodiment of the present disclosure includes: a model processing module 1201 and an image correction module 1202.

[0131] Among them, the model processing module 1201 is used to obtain an image to be corrected, and perform feature extraction on the image to be corrected through a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; the image correction module 1202 is used to correct the image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected; wherein the light field prediction model is trained based on simulated image samples and three-channel background light field image samples corresponding to the simulated image samples.

[0132] In some embodiments of the present disclosure, the model processing module 1201 is configured to extract the background light field image information of the three color channels in the image to be corrected through an end-to-end fully convolutional neural network model, so as to determine the three-channel background light field image based on the extracted background light field image information of the three color channels.

[0133] In some embodiments of the present disclosure, the image correction module 1202 includes: a correction unit, configured to correct the image information corresponding to the three color channels in the image to be corrected according to the three-channel background light field image, so as to obtain a corrected image corresponding to the image to be corrected.

[0134] In some embodiments of the present disclosure, the image to be corrected includes R channel image information, G channel image information and B channel image information; the three-channel background light field image includes R channel predicted background light field information, G channel predicted background light field information and B channel predicted background light field information; the correction unit is configured to: divide the R channel image information by the R channel predicted background light field information to obtain R channel corrected image information; divide the G channel image information by the G channel predicted background light field information to obtain G channel corrected image information; divide the B channel image information by the B channel predicted background light field information to obtain B channel corrected image information; and obtain the corrected image based on the R channel corrected image information, the G channel corrected image information and the B channel corrected image information.

[0135] In some embodiments of the present disclosure, the image correction device 1200 also includes: an information acquisition module, used to acquire a standard image set containing multiple standard images, and acquire the light field brightness variation range and the white balance coefficient value range; a parameter determination module, used to determine a simulated light field based on the light field brightness variation range, and at the same time determine the white balance sample information according to the white balance coefficient value range, wherein the simulated light field is the same size as the standard image; a three-channel background light field image sample generation module, used to determine the three-channel background light field image sample based on the simulated light field and the white balance sample information; a training module, used to process the standard image in the standard image set according to the three-channel background light field image sample to obtain the non-standard simulated image sample, and train the light field prediction model to be trained according to the non-standard simulated image sample and the three-channel background light field image sample.

[0136] In some embodiments of the present disclosure, the simulated light field is a randomly generated Gaussian-like distributed image with an unfixed center position and an unfixed variance; the white balance sample information includes white balance coefficient samples corresponding to three color channels, and each of the white balance coefficient samples is a random number that conforms to a uniform distribution and is independent of each other.

[0137] In some embodiments of the present disclosure, the white balance sample information includes an R channel white balance coefficient, a G channel white balance coefficient, and a B channel white balance coefficient; the three-channel background light field image sample generation module is configured to: multiply the brightness information corresponding to each pixel in the simulated light field with the R channel white balance coefficient, the G channel white balance coefficient, and the B channel white balance coefficient respectively to obtain R channel background light field information, G channel background light field information, and B channel background light field information; and determine the three-channel background light field image sample based on the R channel background light field information, the G channel background light field information, and the B channel background light field information.

[0138] In some embodiments of the present disclosure, the training module is configured to: input the non-standard simulated image samples into the light field prediction model to be trained, perform feature extraction on the non-standard simulated image samples through the light field prediction model to be trained to obtain a predicted three-channel background light field image; determine a first loss function based on the predicted three-channel background light field image and the three-channel background light field image samples corresponding to the non-standard simulated image samples; and optimize the parameters of the light field prediction model to be trained based on the first loss function to obtain the light field prediction model.

[0139] In some embodiments of the present disclosure, the image correction device 1200 is further configured to: construct a second loss function based on the image information corresponding to the three color channels of each pixel in the predicted three-channel background light field image; and optimize the parameters of the light field prediction model to be trained based on the first loss function and the second loss function to obtain the light field prediction model.

[0140] In some embodiments of the present disclosure, the first loss function is calculated according to formula (1):

[0141]

[0142] Wherein, i is the RGB three channels, i=1,2,3, (x, y) is the position coordinate of any pixel in the non-standard simulated image sample or the predicted three-channel background light field image, M is the maximum value of the horizontal coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, N is the maximum value of the vertical coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, F i (x, y) is the three-channel background light field image sample corresponding to the non-standard simulated image sample, F i '(x,y) is the predicted three-channel background light field image.

[0143] In some embodiments of the present disclosure, the second loss function is calculated according to formula (2):

[0144]

[0145] Wherein, i is the RGB three channels, i=1,2,3, (x, y) is the position coordinate of any pixel in the non-standard simulated image sample or the predicted three-channel background light field image, M is the maximum value of the horizontal coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, N is the maximum value of the vertical coordinate of the non-standard simulated image sample or the predicted three-channel background light field image, F i '(x,y) is the predicted three-channel background light field image, is the difference operator.

[0146] In some embodiments of the present disclosure, the image correction device 1200 is further configured to: perform feature extraction on the corrected image through the light field prediction model to obtain a three-channel background light field image corresponding to the corrected image; re-correct the corrected image according to the three-channel background light field image corresponding to the corrected image to obtain an optimized corrected image; repeat the above steps to iteratively correct the optimized corrected image until the optimal corrected image is obtained.

[0147] Figure 13The block diagram of a microscope image correction device according to an embodiment of the present disclosure is schematically shown.

[0148] Reference Figure 13 As shown, a microscope image correction device 1300 according to an embodiment of the present disclosure includes: a feature extraction module 1301 and a microscope image correction module 1302.

[0149] Among them, the feature extraction module 1301 is used to obtain a microscope image to be corrected, and perform feature extraction on the microscope image to be corrected through a light field prediction model to obtain a three-channel background light field image corresponding to the microscope image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; the microscope image correction module 1302 is used to correct the microscope image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the microscope image to be corrected; wherein the light field prediction model is trained based on multiple non-standard simulated microscope image samples and three-channel background light field image samples corresponding to each of the non-standard simulated microscope image samples.

[0150] In some embodiments of the present disclosure, based on the above scheme, the feature extraction module 1301 is configured to: extract the background light field image information of the three color channels in the microscope image to be corrected through an end-to-end fully convolutional neural network model, so as to determine the three-channel background light field image based on the extracted background light field image information of the three color channels.

[0151] In some embodiments of the present disclosure, based on the above scheme, the microscope image correction module 1302 includes: a correction unit, used to correct the image information corresponding to the three color channels in the microscope image to be corrected according to the three-channel background light field image, so as to obtain a corrected image corresponding to the microscope image to be corrected.

[0152] In some embodiments of the present disclosure, the microscope image to be corrected includes R channel image information, G channel image information and B channel image information; the three-channel background light field image includes R channel predicted background light field information, G channel predicted background light field information and B channel predicted background light field information; based on the above scheme, the correction unit is configured as: dividing the R channel image information by the R channel predicted background light field information to obtain R channel corrected image information; dividing the G channel image information by the G channel predicted background light field information to obtain G channel corrected image information; dividing the B channel image information by the B channel predicted background light field information to obtain B channel corrected image information; and obtaining the corrected image according to the R channel corrected image information, the G channel corrected image information and the B channel corrected image information.

[0153] In some embodiments of the present disclosure, based on the above scheme, the microscope image correction device 1300 also includes: an information acquisition module, used to acquire a standard microscope image set containing multiple standard microscope images, and determine the light field brightness variation range and the white balance coefficient value range; a parameter determination module, used to determine a simulated light field based on the light field brightness variation range, and at the same time determine white balance sample information according to the white balance coefficient value range, wherein the simulated light field has the same size as the standard microscope image; a three-channel background light field image sample generation module, used to determine the three-channel background light field image sample according to the simulated light field and the white balance sample information; a training module, used to process the standard microscope image in the standard microscope image set according to the three-channel background light field image sample to obtain the non-standard simulated microscope image sample, and train the light field prediction model to be trained according to the non-standard simulated microscope image sample and the three-channel background light field image sample.

[0154] In some embodiments of the present disclosure, based on the above scheme, the simulated light field is a randomly generated Gaussian-like distributed image with a non-fixed center position and a non-fixed variance; the white balance sample information includes white balance coefficient samples corresponding to three color channels, and each of the white balance coefficient samples is a random number that conforms to a uniform distribution and is independent of each other.

[0155] In some embodiments of the present disclosure, the white balance sample information includes an R channel white balance coefficient, a G channel white balance coefficient, and a B channel white balance coefficient; the three-channel background light field image sample generation module is configured to: multiply the brightness information corresponding to each pixel in the simulated light field with the R channel white balance coefficient, the G channel white balance coefficient, and the B channel white balance coefficient respectively to obtain R channel background light field information, G channel background light field information, and B channel background light field information; and determine the three-channel background light field image sample based on the R channel background light field information, the G channel background light field information, and the B channel background light field information.

[0156] In some embodiments of the present disclosure, based on the above scheme, the training module is configured to: input the non-standard simulated microscope image samples into the light field prediction model to be trained, and perform feature extraction on the non-standard simulated microscope image samples through the light field prediction model to be trained to obtain a predicted three-channel background light field image; determine a first loss function based on the predicted three-channel background light field image and the three-channel background light field image samples corresponding to the non-standard simulated microscope image samples; and optimize the parameters of the light field prediction model to be trained based on the first loss function to obtain the light field prediction model.

[0157] In some embodiments of the present disclosure, based on the above scheme, the microscope image correction device 1300 is further configured to: construct a second loss function based on the image information corresponding to the three color channels of each pixel in the predicted three-channel background light field image; and optimize the parameters of the light field prediction model to be trained based on the first loss function and the second loss function to obtain the light field prediction model.

[0158] In some embodiments of the present disclosure, based on the above solution, the first loss function is calculated according to formula (1):

[0159]

[0160] Wherein, i is the RGB three channels, i=1, 2, 3, (x, y) is the position coordinate of any pixel in the non-standard simulated microscope image sample or the predicted three-channel background light field image, M is the maximum horizontal coordinate of the non-standard simulated microscope image sample or the predicted three-channel background light field image, N is the maximum vertical coordinate of the non-standard simulated microscope image sample or the predicted three-channel background light field image, F i (x, y) is the three-channel background light field image sample corresponding to the non-standard simulated microscope image sample, F i '(x,y) is the predicted three-channel background light field image.

[0161] In some embodiments of the present disclosure, based on the above solution, the second loss function is calculated according to formula (2):

[0162]

[0163] Wherein, i is the RGB three channels, i=1, 2, 3, (x, y) is the position coordinate of any pixel in the non-standard simulated microscope image sample or the predicted three-channel background light field image, M is the maximum horizontal coordinate of the non-standard simulated microscope image sample or the predicted three-channel background light field image, N is the maximum vertical coordinate of the non-standard simulated microscope image sample or the predicted three-channel background light field image, F i '(x,y) is the predicted three-channel background light field image, is the difference operator.

[0164] In some embodiments of the present disclosure, based on the above scheme, the microscope image correction device 1300 is further configured to: perform feature extraction on the corrected image through the light field prediction model to obtain a three-channel background light field image corresponding to the corrected image; re-correct the corrected image according to the three-channel background light field image corresponding to the corrected image to obtain an optimized corrected image; repeat the above steps to iteratively correct the optimized corrected image until the optimal corrected image is obtained.

[0165] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure is shown.

[0166] It should be noted that Figure 14 The computer system 1400 of the electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0167] like Figure 14 As shown, computer system 1400 includes a central processing unit (CPU) 1401, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1402 or programs loaded from storage unit 1408 into random access memory (RAM) 1403, thereby implementing the search string processing method described in the above embodiments. RAM 1403 also stores various programs and data required for system operation. CPU 1401, ROM 1402, and RAM 1403 are connected to each other via bus 1404. Input / output (I / O) interface 1405 is also connected to bus 1404.

[0168] The following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, and the like; an output section 1407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1408 including a hard disk; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as needed. Removable media 1411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1410 as needed, so that computer programs read from the removable media can be installed in the storage section 1408 as needed.

[0169] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1409, and / or installed from a removable medium 1411. When the computer program is executed by the central processing unit (CPU) 1401, various functions defined in the system of the present disclosure are performed.

[0170] It should be noted that the computer-readable medium shown in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-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 computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0171] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0172] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, and the units described may also be provided in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0173] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device implements the methods described in the above embodiments.

[0174] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0175] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0176] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0177] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image correction method, characterized in that: include: Acquire an image to be corrected, and perform feature extraction on the image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; Correcting the image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected; In which, the light field prediction model is trained based on multiple non-standard simulated image samples and three-channel background light field image samples corresponding to each of the non-standard simulated image samples. The three-channel background light field image samples refer to images containing background light field image information of three channels of R, G, and B. The non-standard simulated image samples are obtained by processing the standard images based on the three-channel background light field image samples.

2. The method according to claim 1, characterized in that The step of extracting features of the image to be corrected by using a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected includes: The background light field image information of the three color channels in the image to be corrected is extracted through an end-to-end fully convolutional neural network model to determine the three-channel background light field image based on the extracted background light field image information of the three color channels.

3. The method according to claim 1, characterized in that The correcting the image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected includes: Image information corresponding to the three color channels in the image to be corrected is corrected respectively according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected.

4. The method according to claim 3, characterized in that The image to be corrected includes R channel image information, G channel image information and B channel image information; the three-channel background light field image includes R channel predicted background light field information, G channel predicted background light field information and B channel predicted background light field information; The step of respectively correcting image information corresponding to three color channels in the image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected includes: Dividing the R channel image information by the R channel predicted background light field information to obtain R channel corrected image information; Dividing the G channel image information by the G channel predicted background light field information to obtain G channel corrected image information; Dividing the B-channel image information by the B-channel predicted background light field information to obtain B-channel corrected image information; The corrected image is acquired according to the R channel corrected image information, the G channel corrected image information, and the B channel corrected image information.

5. The method according to claim 1, wherein The method further comprises: Obtain a standard image set containing multiple standard images, and obtain the light field brightness variation range and the white balance coefficient value range; determining a simulated light field based on the light field brightness variation range, and determining white balance sample information based on the white balance coefficient value range, wherein the simulated light field has the same size as the standard image; Determine the three-channel background light field image samples according to the simulated light field and the white balance sample information; The standard image is processed according to the three-channel background light field image samples to obtain the non-standard simulated image samples, and the light field prediction model to be trained is trained according to the non-standard simulated image samples and the three-channel background light field image samples.

6. The method according to claim 5, characterized in that The simulated light field is a randomly generated Gaussian-like distributed image with an unfixed center position and an unfixed variance; the white balance sample information includes white balance coefficient samples corresponding to three color channels, and each of the white balance coefficient samples is a random number that conforms to a uniform distribution and is independent of each other.

7. The method according to claim 5, characterized in that The white balance sample information includes an R channel white balance coefficient, a G channel white balance coefficient, and a B channel white balance coefficient; The determining the three-channel background light field image samples according to the simulated light field and the white balance sample information includes: Multiplying the brightness information corresponding to each pixel in the simulated light field by the R channel white balance coefficient, the G channel white balance coefficient, and the B channel white balance coefficient respectively to obtain R channel background light field information, G channel background light field information, and B channel background light field information; The three-channel background light field image samples are determined based on the R-channel background light field information, the G-channel background light field information, and the B-channel background light field information.

8. The method according to claim 5, characterized in that The training of the light field prediction model to be trained according to the non-standard simulated image samples and the three-channel background light field image samples comprises: Inputting the non-standard simulated image sample into the light field prediction model to be trained, and performing feature extraction on the non-standard simulated image sample by the light field prediction model to be trained to obtain a predicted three-channel background light field image; determining a first loss function based on the predicted three-channel background light field image and the three-channel background light field image samples corresponding to the non-standard simulated image samples; Optimizing the parameters of the light field prediction model to be trained based on the first loss function to obtain the light field prediction model.

9. The method according to claim 8, characterized in that The method further comprises: Constructing a second loss function based on image information corresponding to three color channels of each pixel in the predicted three-channel background light field image; Parameters of the light field prediction model to be trained are optimized based on the first loss function and the second loss function to obtain the light field prediction model.

10. The method according to claim 1, characterized in that The method further comprises: Performing feature extraction on the rectified image using the light field prediction model to obtain a three-channel background light field image corresponding to the rectified image; re-correcting the corrected image according to a three-channel background light field image corresponding to the corrected image to obtain an optimized corrected image; Repeat the above steps to iteratively correct the optimized corrected image until the optimal corrected image is obtained.

11. An image correction device, characterized in that: include: a model processing module, configured to obtain an image to be corrected, and perform feature extraction on the image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; an image correction module, configured to correct the image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the image to be corrected; In which, the light field prediction model is trained based on multiple non-standard simulated image samples and three-channel background light field image samples corresponding to each of the non-standard simulated image samples. The three-channel background light field image samples refer to images containing background light field image information of three channels of R, G, and B. The non-standard simulated image samples are obtained by processing the standard images based on the three-channel background light field image samples.

12. A microscope image correction method, characterized in that: include: Acquire a microscope image to be corrected, and perform feature extraction on the microscope image to be corrected using a light field prediction model to obtain a three-channel background light field image corresponding to the microscope image to be corrected, wherein the three-channel background light field image includes brightness information and white balance information; Correcting the microscope image to be corrected according to the three-channel background light field image to obtain a corrected image corresponding to the microscope image to be corrected; In which, the light field prediction model is trained based on multiple non-standard simulated microscope image samples and three-channel background light field image samples corresponding to each of the non-standard simulated microscope image samples. The three-channel background light field image samples refer to images containing background light field image information of three channels of R, G, and B. The non-standard simulated microscope image samples are obtained by processing the standard images based on the three-channel background light field image samples.

13. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the image correction method according to any one of claims 1 to 10 or the microscope image correction method according to claim 12.

14. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image correction method according to any one of claims 1 to 10 or the microscope image correction method according to claim 12 is implemented.

15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the image correction method according to any one of claims 1 to 10 or the microscope image correction method according to claim 12.