Method, apparatus, electronic device, medium for correcting microscope image
By acquiring the three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient of the digital microscope, multi-dimensional correction of microscope images is achieved, solving the problem of poor correction effect in existing technologies and realizing a highly efficient image correction effect, which is suitable for various detection scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AOTU TECHNOLOGY CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the correction effect of microscope images is not good. In particular, under the characteristics of optical systems and the interference of ambient light, the recognition accuracy of computer vision algorithms is affected, and the deep learning models that rely on a large amount of manually labeled data have low adaptability.
By acquiring the image to be corrected captured by a digital microscope in a preset scene, color correction, brightness correction and sharpness correction are performed using a three-dimensional color lookup table, brightness correction function and sharpness restoration coefficient to obtain the corrected target image.
It achieves multi-dimensional automatic correction of microscope images, improves image adaptability and correction effect, and is suitable for water quality testing, medical testing and scientific research experiments under different lighting conditions, significantly improving image quality and correction efficiency.
Smart Images

Figure CN121724878B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image correction, and more specifically to a method, apparatus, electronic device, and medium for correcting microscope images. Background Technology
[0002] In today's era of rapid technological advancement, digital microscopes, with their high precision, high resolution, and convenient digital imaging and storage capabilities, have become indispensable tools in numerous fields such as water quality testing, scientific research, and medical diagnosis. With the development of artificial intelligence image recognition technology, an increasing number of inspection tasks are being completed using microscopic imaging combined with automatic computer recognition. To ensure the accuracy of the recognition results, the accuracy and consistency of digital microscope imaging are paramount. However, the imaging process of digital microscopes is susceptible to factors such as light source fluctuations, lens distortion, differences in sensor response, ambient light interference, and the optical properties of the sample itself, leading to problems like brightness imbalance, color drift, or localized blurring in the image. While these problems have a relatively small impact on human visual perception, they can significantly interfere with computer vision algorithms—for example, convolutional neural networks are sensitive to color channels, and edge detection algorithms are affected by contrast changes, ultimately reducing the accuracy of automatic computer recognition. Therefore, reducing the distortion of images captured by digital microscopes is essential.
[0003] In existing technologies, microscopic image correction is typically achieved using deep learning models. These models are trained to learn the mapping relationship between the original image and a manually corrected reference image. While this approach can automate color correction to some extent, it requires a large amount of manually labeled data. This labeled data cannot fully cover image distortion in all scenarios, resulting in low adaptability and poor correction effectiveness. Summary of the Invention
[0004] The technical problem to be solved by the present invention is how to improve the correction effect of microscope images. The purpose is to provide a method, device, electronic device, or medium for correcting microscope images to improve the correction effect of microscope images.
[0005] This invention is achieved through the following technical solution:
[0006] In a first aspect, a method for correcting microscope images is provided, the method comprising: acquiring an image to be corrected taken by a digital microscope in a preset scene; acquiring a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient corresponding to the digital microscope; wherein the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are acquired through a reference image; the reference image is acquired by taking a picture of a preset optical calibration device with the digital microscope in a preset scene; and performing color correction, brightness correction, and sharpness correction on the image to be corrected using the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient, respectively, to obtain a corrected target image.
[0007] In some embodiments, the optical calibration component includes: a color standard area and a brightness reference area; the color standard area includes multiple color blocks corresponding to multiple colors; each color block is provided with a micrograting and a multilayer thin film structure below it; the brightness reference area includes several brightness blocks corresponding to multiple brightness levels.
[0008] In some embodiments, the reference image includes a color image captured by the digital microscope of the color standard area; the three-dimensional color lookup table is obtained by the following method: obtaining the captured color information corresponding to each color patch in the color image; obtaining the standard color information corresponding to each color patch; inputting the captured color information and the standard color information into a preset three-dimensional lookup table model for training to obtain the three-dimensional color lookup table.
[0009] In some embodiments, the reference image includes a brightness image captured by the digital microscope of the brightness reference area; the brightness correction function is obtained by the following method: obtaining the captured brightness information corresponding to each brightness color block in the brightness image; obtaining the standard brightness information corresponding to each brightness color block; and using a linear regression algorithm, performing linear fitting based on the captured brightness information and the standard brightness information to obtain the brightness correction function.
[0010] In some embodiments, the reference image includes a color image acquired by the digital microscope from the color standard area; the sharpness restoration coefficient is obtained by the following method: obtaining intensity information corresponding to the color image; performing a fast Fourier transform on the intensity information to obtain a reference spectral intensity distribution; obtaining a fuzzy reference value corresponding to the color image based on the reference spectral intensity distribution and a preset standard spectral intensity distribution; and obtaining the sharpness restoration coefficient based on the fuzzy reference value.
[0011] In some embodiments, the step of performing color correction, brightness correction, and sharpness correction on the image to be corrected using the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient to obtain a corrected target image includes: performing color correction on the image to be corrected using the three-dimensional color lookup table to obtain a first corrected image; performing brightness correction on the first corrected image using the brightness correction function to obtain a second corrected image; and performing sharpness correction on the second corrected image using the sharpness restoration coefficient to obtain the target image.
[0012] In a second aspect, an apparatus for correcting microscope images includes: a first acquisition module configured to acquire an image to be corrected taken by a digital microscope; a second acquisition module configured to acquire a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient corresponding to the digital microscope; wherein the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are acquired through a reference image; the reference image is acquired by the digital microscope taking a picture of a preset optical calibration component in a preset scene; and a correction module configured to perform color correction, brightness correction, and sharpness correction on the image to be corrected using the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient, respectively, to obtain a corrected target image.
[0013] Thirdly, an apparatus for correcting microscope images includes: a processor and a memory storing program instructions, the processor being configured to execute the above-described method for correcting microscope images when the program instructions are executed.
[0014] Fourthly, an apparatus includes: an apparatus body; and the aforementioned means for correcting microscope images, which is mounted on the apparatus body.
[0015] Fifthly, a storage medium storing program instructions that, when executed, perform the aforementioned method for correcting microscope images.
[0016] Compared with existing technologies, this invention acquires an image to be corrected captured by a digital microscope in a preset scene. Then, based on a reference image captured by the digital microscope on a preset optical calibration device in the preset scene, a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient are obtained to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image. In this way, compared with existing technologies, it does not rely on image distortion that cannot be completely covered in all scenes. It can acquire a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient using a preset optical calibration device, and then automatically perform multi-dimensional correction of the image to be corrected in color, brightness, and sharpness dimensions using these three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient. This results in high adaptability and improved correction effect of microscope images. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0018] Figure 1 This is a schematic flowchart of a method for correcting microscope images provided in an embodiment of this disclosure;
[0019] Figure 2 This is an example diagram of an optical calibration component provided in an embodiment of this disclosure;
[0020] Figure 3 This is a schematic diagram of the field of view of a digital microscope provided in an embodiment of this disclosure;
[0021] Figure 4 This is an example curve diagram corresponding to a brightness correction function provided in an embodiment of this disclosure;
[0022] Figure 5 This is an ideal image of a green patch captured by a digital microscope according to an embodiment of the present disclosure;
[0023] Figure 6 This is an actual image of a green patch captured by a digital microscope according to an embodiment of the present disclosure;
[0024] Figure 7 This is a flowchart of another method for correcting microscope images provided in this disclosure embodiment;
[0025] Figure 8This is a schematic diagram of an apparatus for correcting microscope images provided in an embodiment of this disclosure;
[0026] Figure 9 This is a schematic diagram of another apparatus for correcting microscope images provided in an embodiment of this disclosure. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0028] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0029] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0030] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0031] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0032] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for correcting microscope images, as shown in an exemplary embodiment of this application.
[0033] Combination Figure 1 As shown, this disclosure provides a method for correcting microscope images, the method comprising:
[0034] Step S101: Obtain the image to be corrected captured by the digital microscope in a preset scene.
[0035] Step S102: Obtain the three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient corresponding to the digital microscope; wherein, the three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient are obtained through a reference image; the reference image is obtained by taking a picture of a preset optical calibration component under a preset scene using a digital microscope.
[0036] Step S103: Use a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image.
[0037] The method for correcting microscope images provided in this disclosure involves acquiring an image to be corrected captured by a digital microscope in a preset scene. Then, based on a reference image captured by the digital microscope in the preset scene using a preset optical calibration device, a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient are obtained to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, resulting in a corrected target image. Compared to existing technologies, this method does not rely on image distortion that cannot be fully covered in all scenes. It can obtain a three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient using a preset optical calibration device, and then automatically perform multi-dimensional correction of the image to be corrected in color, brightness, and sharpness dimensions using these parameters. This method has high adaptability and improves the correction effect of microscope images.
[0038] It should be noted that the preset scene is the scene required to capture the image to be corrected.
[0039] It should be noted that the reference images include color images obtained by digital microscopes from the color standard area and brightness images obtained by digital microscopes from the brightness reference area. The color images are used to obtain the three-dimensional color lookup table and sharpness restoration coefficients; the brightness images are used to obtain the brightness correction function.
[0040] It should be noted that when photographing optical calibration components, the optical calibration components need to be placed on the stage of the digital microscope to simulate the actual image capture situation.
[0041] Furthermore, the optical calibration component includes a color standard area and a brightness reference area. The color standard area includes multiple color patches corresponding to various colors, with a micrograting and a multi-layer thin film structure beneath each color patch. The brightness reference area includes several brightness patches corresponding to various brightness levels. This allows the optical calibration component to obtain a three-dimensional color lookup table through the color patches and a brightness correction function through the brightness patches. Simultaneously, because each color patch has a micrograting and a multi-layer thin film structure beneath it, the color patches appear as color cards with invisible stripes. However, due to the magnification of the digital microscope, the images of the color patches captured by the digital microscope show stripes, allowing for analysis of the sharpness of the digital microscope image. This achieves three uses from a single card.
[0042] It should be noted that the shape of the optical calibration component can be rectangular. Its thickness can be 1 mm.
[0043] Optical calibration components can use glass or transparent plastic as a base, and their surface can be covered with a transparent protective film, which can achieve waterproof and scratch-resistant properties.
[0044] It should be noted that the color standard area is used to obtain the three-dimensional color lookup table and sharpness correction coefficients to facilitate color and sharpness correction. The luminance reference area is used to obtain the luminance correction function to facilitate luminance correction.
[0045] It should be noted that the arrangement of color blocks and brightness blocks is not fixed. They can be arranged in a grid pattern, from top to bottom, or from left to right. There are no restrictions here.
[0046] In some embodiments, please refer to Figure 2 , Figure 2 Example diagram of an optical calibration component.
[0047] like Figure 2 As shown, the optical calibration components include a color standard area and a brightness reference area. The color standard area comprises four color blocks: red, blue, green, and yellow. These blocks are arranged in a grid pattern. Each color block integrates a micro-grating and a multi-layer thin-film structure. The brightness reference area includes brightness blocks corresponding to black, white, and medium gray brightness levels. The black brightness block corresponds to a brightness of 0 and provides a pure black brightness reference. The white brightness block corresponds to a brightness of 100 and provides a pure white brightness reference. The medium gray brightness block corresponds to a brightness of 50 and provides an intermediate brightness reference. The brightness blocks can be arranged sequentially from top to bottom.
[0048] Preferably, the size of each color patch can be determined according to the field of view of a digital microscope. For example, the number of color patches included in the microscope's field of view can be preset, thereby determining the size of each color patch.
[0049] In some embodiments, please refer to Figure 3 , Figure 3 This is a schematic diagram of the field of view of a digital microscope. (Example) Figure 3 As shown, the color standard area includes four color patches: red, blue, green, and yellow. The size of each color patch can be set so that the digital microscope's field of view can capture all color patches at once. This allows for simultaneous imaging of multiple color patches, enabling calibration of multiple color patches.
[0050] Similarly, the size of each brightness patch can be set so that the digital microscope's field of view can capture all brightness patches at once. This allows for the simultaneous capture of multiple brightness patches, saving time.
[0051] It should be noted that the colors of the color blocks are standard RGB (Red-Green-Blue) colors.
[0052] Furthermore, the micrograting is formed by engraving several parallel grooves at equal intervals, so that the color blocks have a color card with grooves that are invisible to the naked eye.
[0053] It should be noted that microgratings can be captured by digital microscopes, thus forming very fine stripe patterns under the microscope, in order to obtain the sharpness restoration coefficient and achieve sharpness correction.
[0054] Furthermore, the reference image includes color images captured by a digital microscope of the color standard area. The three-dimensional color lookup table is obtained through the following method: obtaining the captured color information corresponding to each color patch in the color image; obtaining the standard color information corresponding to each color patch; and inputting the captured color information and the standard color information into a preset three-dimensional lookup table model for training to obtain the three-dimensional color lookup table. In this way, by obtaining the captured color information and the standard color information corresponding to each color patch in the color image, and then inputting the captured color information and the standard color information into a preset three-dimensional lookup table model for training, a three-dimensional color lookup table is obtained. This allows the three-dimensional color lookup table to learn the correspondence between colors captured by the digital microscope and standard colors, thereby facilitating color correction of the image to be corrected captured by the digital microscope using the three-dimensional color lookup table.
[0055] It should be noted that training the 3D lookup table model involves optimizing the lookup table parameters to achieve image color conversion. Its core lies in combining image feature extraction and interpolation algorithms, using paired datasets to train an adaptive color mapping model, and generating a mapping table between colors to achieve a non-linear conversion between input RGB values and output RGB values. This method is widely used in image enhancement and color correction.
[0056] It should be noted that the captured color information is the median RGB value of each pixel in each color patch of the color image. Standard color information is the RGB value of each color patch itself. Standard color information can be pre-stored in a preset database. This ensures that the colors of the images to be corrected captured by the digital microscope, after correction, closely approximate their actual colors, achieving color consistency in the imaging. This provides a reliable imaging foundation for subsequent tasks such as automatic water quality detection, medical testing, and scientific research experiments, improving the accuracy and stability of automatic recognition algorithms.
[0057] In some embodiments, the color standard area includes four color blocks: a red block, a blue block, a green block, and a yellow block. The standard color information corresponding to the red block is (255, 0, 0); the standard color information corresponding to the green block is (0, 255, 0); the standard color information corresponding to the blue block is (0, 0, 255); and the standard color information corresponding to the yellow block is (255, 255, 0). In the color image, the captured color information corresponding to the red block is (230, 10, 5); the captured color information corresponding to the green block is (5, 240, 10); the captured color information corresponding to the blue block is (10, 5, 245); and the captured color information corresponding to the yellow block is (255, 255, 5).
[0058] The standard color information corresponding to the red block is (255, 0, 0); the standard color information corresponding to the green block is (0, 255, 0); the standard color information corresponding to the blue block is (0, 0, 255); and the standard color information corresponding to the yellow block is (255, 255, 0). In the color image, the captured color information corresponding to the red block is (230, 10, 5); the captured color information corresponding to the green block is (5, 240, 10); the captured color information corresponding to the blue block is (10, 5, 245); and the captured color information corresponding to the yellow block is (255, 255, 5). These are used as training samples input into a preset 3DLUT (3D Lookup Table) model to obtain a 3D color lookup table.
[0059] Furthermore, the brightness correction function is obtained as follows: The captured brightness information corresponding to each brightness patch in the brightness image is obtained; the standard brightness information corresponding to each brightness patch is obtained; and a linear regression algorithm is used to perform linear fitting based on the captured brightness information and the standard brightness information to obtain the brightness correction function. In this way, by obtaining the captured brightness information and the standard brightness information corresponding to each brightness patch in the brightness image, and then using a linear regression algorithm to perform linear fitting based on the captured brightness information and the standard brightness information to obtain the brightness correction function, the brightness correction function can reflect the correspondence between the brightness captured by the digital microscope and the standard brightness, thus facilitating the brightness correction of the image to be corrected captured by the digital microscope.
[0060] It should be noted that the essence of obtaining the brightness correction function by performing linear fitting based on the captured brightness information and the standard brightness information is to fit the slope and intercept of the brightness correction function.
[0061] It should be noted that the captured brightness information refers to the brightness value corresponding to each brightness patch in the color image; the standard brightness information refers to the brightness value of each brightness patch itself. Both are expressed as a percentage (%). The standard brightness information can be pre-stored in a preset database.
[0062] In this way, the brightness of the images to be corrected captured by the digital microscope can be close to their actual brightness after correction, achieving brightness consistency in the imaging. This provides a reliable imaging basis for subsequent tasks such as automatic water quality detection, medical testing, and scientific research experiments, and improves the accuracy and stability of automatic recognition algorithms.
[0063] In some embodiments, the brightness standard area includes four brightness blocks: a black brightness block, a mid-gray brightness block, and a white brightness block. The standard brightness information corresponding to the black brightness block is 0; the standard brightness information corresponding to the mid-gray brightness block is 50; and the standard brightness information corresponding to the white brightness block is 100. In the brightness image, the shooting brightness information corresponding to the black brightness block is 5; the shooting brightness information corresponding to the mid-gray brightness block is 48; and the shooting brightness information corresponding to the white brightness block is 98.
[0064] By utilizing a linear regression algorithm, a linear fit is performed based on the captured brightness information and standard brightness information to obtain, as shown below. Figure 4 The brightness correction function is shown. Figure 4 This is an example graph showing the curve corresponding to the brightness correction function.
[0065] like Figure 4As shown, the x-axis of the brightness correction function represents the actual brightness, i.e., the brightness information of the image captured by the digital microscope. The y-axis represents the corrected brightness, i.e., the brightness information after correction. This brightness correction function can correct the brightness information of images captured by a digital microscope.
[0066] Furthermore, the sharpness restoration coefficient is obtained through the following method: obtaining the intensity information corresponding to the color image; performing a fast Fourier transform on the intensity information to obtain the reference spectral intensity distribution; obtaining the standard spectral intensity distribution corresponding to the color region; obtaining the blur reference value corresponding to the color image based on the reference spectral intensity distribution and the standard spectral intensity distribution; and obtaining the sharpness restoration coefficient based on the blur reference value.
[0067] This process involves acquiring the intensity information corresponding to the color image, performing a Fast Fourier Transform on the intensity information to obtain a reference spectral intensity distribution, then acquiring the standard spectral intensity distribution corresponding to the color region, and finally obtaining a blur reference value for the color image based on the reference and standard spectral intensity distributions. The sharpness restoration coefficient is then derived from this blur reference value. This allows the sharpness restoration coefficient to reflect the difference between the reference spectral intensity distribution of the image captured by the digital microscope and the standard spectral intensity distribution corresponding to the color region, thereby reflecting the difference between the sharpness of the image captured by the digital microscope and the sharpness corresponding to the standard spectral intensity distribution. This facilitates sharpness correction of the image to be corrected captured by the digital microscope using the sharpness restoration coefficient.
[0068] It should be noted that the standard spectral intensity distribution is the spectral intensity distribution corresponding to the desired level of clarity. It can be a preset spectral intensity distribution.
[0069] It should be noted that obtaining the intensity information corresponding to the color image means obtaining the intensity value of each pixel in the color image.
[0070] Furthermore, a Fast Fourier Transform is performed on the intensity information to obtain the reference spectral intensity distribution, including: calculating... The reference spectral intensity distribution is obtained. The reference spectral intensity distribution is in the form of array-shaped data; Characterizes the Fast Fourier Transform; This represents the intensity value of the pixel in the x-th row and y-th column of the color image. An array representing the intensity values of each pixel in a color image.
[0071] It should be noted that, It has multiple frequency components corresponding to different frequencies.
[0072] The standard spectral intensity distribution is the ideal spectral intensity distribution for optical calibration components. It is an array of data with multiple frequency components corresponding to different frequencies.
[0073] Furthermore, based on the reference spectral intensity distribution and the preset standard spectral intensity distribution, the blurred reference value corresponding to the color image is obtained, including: by calculating... , to obtain the sharpness adjustment parameters corresponding to the f-th frequency; where, This refers to the sharpness adjustment parameter corresponding to the f-th frequency; It represents the absolute value of the frequency component corresponding to the f-th frequency in the standard spectral intensity distribution; The absolute value of the frequency component corresponding to the f-th frequency in the reference spectral intensity distribution is used to calculate the peak or average value of the sharpness adjustment parameter corresponding to each frequency, thereby obtaining the blur reference value corresponding to the color image.
[0074] In some embodiments, taking the green block as an example, please refer to Figure 5 and Figure 6 . Figure 5 Ideal for capturing green patches using a digital microscope; Figure 6 An actual image of the green patch taken with a digital microscope.
[0075] In reality, digital microscopes often encounter many problems that affect image clarity, such as being out of focus or having a dirty lens. Without these problems, the green patch captured by a digital microscope should appear as follows: Figure 5 As shown, the stripes are clear and have well-defined boundaries. However, the clarity of the digital microscope is affected, and the actual image of the green patch after processing is as follows: Figure 6 As shown, the lines are blurred and lack clear boundaries. Intensity information corresponding to the actual image is obtained; a Fast Fourier Transform is performed on the intensity information to obtain the reference spectrum intensity distribution. The actual image at a certain frequency... The frequency component below is 70. This frequency corresponds to the peak value of the frequency component. An ideal image is achieved at this frequency. The frequency component below is 100. It can be seen that compared with the ideal image, the peak of the intensity distribution in the actual image is lower and wider, indicating slower color changes and decreased sharpness. Therefore, it is necessary to calculate the sharpness restoration coefficient and perform sharpness correction on the image taken by the digital microscope based on the sharpness restoration coefficient.
[0076] Specifically, the sharpness restoration coefficient is obtained based on the blur reference value, including: through calculation This yields a sharpness restoration factor. Among them, This is the sharpness restoration factor; These are empirical coefficients, which can be determined through multiple calculations to achieve or approach the standard spectral intensity distribution. This is a fuzzy reference value.
[0077] Furthermore, a preset three-dimensional color lookup table, a preset brightness correction function, and a preset sharpness restoration coefficient are used to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image. This includes: using the three-dimensional color lookup table to correct the color of the image to be corrected, obtaining a first corrected image; using the brightness correction function to correct the brightness of the first corrected image, obtaining a second corrected image; and using the sharpness restoration coefficient to correct the sharpness of the second corrected image, obtaining the target image. In this way, by using the three-dimensional color lookup table to correct the color of the image to be corrected to obtain the first corrected image; using the brightness correction function to correct the brightness of the first corrected image to obtain the second corrected image; and using the sharpness restoration coefficient to correct the sharpness of the second corrected image to obtain the target image, simultaneous multi-dimensional correction of color, brightness, and sharpness dimensions is achieved. This method offers high adaptability, high applicability, and high efficiency while improving the correction effect of microscope images.
[0078] Meanwhile, images captured by digital microscopes can be automatically corrected in multiple dimensions, including color, brightness, and sharpness, using the methods described above. This requires no manual intervention, is highly adaptable, and can be quickly applied to water quality sample testing, scientific research experiments, medical testing, and teaching scenarios under different microscope equipment and lighting conditions. It significantly improves image quality and correction efficiency, and solves the problem that existing technologies cannot quickly and accurately handle multi-dimensional imaging deviations.
[0079] It should be noted that brightness correction models the overall intensity response of the imaging system, while the 3D color lookup table models the relative mapping relationships between different color channels. They focus on different physical quantities and sources of error, and are therefore decoupled in design. This ensures that color correction does not affect brightness correction.
[0080] It should be noted that the order of color correction, brightness correction, and sharpness correction can be changed, and the order of obtaining the 3D color lookup table, brightness correction function, and sharpness restoration coefficient also needs to be changed accordingly, which will not be elaborated here.
[0081] Furthermore, a three-dimensional color lookup table is used to perform color correction on the image to be corrected to obtain a first corrected image, including: obtaining the color information to be corrected corresponding to each pixel in the image to be corrected; inputting each color information to be corrected into the three-dimensional color lookup table to obtain the output target color information, thereby obtaining the first corrected image.
[0082] It should be noted that the color information to be corrected refers to the RGB values of each pixel in the image to be corrected. The target color information refers to the RGB values of each pixel after correction. The first corrected image can be uniquely identified through the target color information of each pixel.
[0083] It should be noted that you should refer to [link / reference]. Figure 4 , Figure 4 This is an example diagram of a three-dimensional color lookup table. (Example:) Figure 4 As shown, the three-dimensional color lookup table treats the RGB color space as a three-dimensional cube, with its x-axis, y-axis, and z-axis representing the R value, G value, and B value, respectively.
[0084] In the RGB color space, each point represents a color, and each input RGB value corresponds to a corrected RGB value. Using a three-dimensional color lookup table, the target color information corresponding to each input color information to be corrected can be found, thus achieving color conversion and enhancement. Figure 4 In the diagram, the gray dots represent the input color information to be corrected, and the red dots represent the target color information, which is the ideal state that the color information to be corrected should reach after color correction processing.
[0085] Furthermore, the brightness correction function is used to perform brightness correction on the first corrected image to obtain the second corrected image, including: obtaining the brightness information to be corrected corresponding to each pixel in the first corrected image; using the brightness correction function to obtain the target brightness information corresponding to each brightness information to be corrected, thereby obtaining the second corrected image.
[0086] It should be noted that, as Figure 4 As shown, the brightness information to be corrected can be taken as the actual brightness, and the point corresponding to the brightness information to be corrected can be found in the brightness correction function. The y-axis value of this point is determined as the corrected brightness information, that is, the target brightness information corresponding to the brightness information to be corrected. In this way, the target brightness information of each pixel in the first corrected image can be obtained, and then the second corrected image after brightness correction can be obtained.
[0087] Furthermore, the second corrected image is sharpened using sharpness restoration coefficients to obtain the target image, including: obtaining the image intensity matrix corresponding to the second corrected image; and calculating... The target intensity matrix is obtained; the target image is then obtained based on this target intensity matrix. The target intensity matrix; The image intensity matrix; The image sharpening operator is characterized by its ability to enhance edge contrast and thus sharpen the image.
[0088] Please see Figure 7 , Figure 7 This is a flowchart illustrating a method for correcting microscope images, as shown in an exemplary embodiment of this application.
[0089] Combination Figure 7 As shown, this disclosure provides a method for correcting microscope images, the method comprising:
[0090] Step S701: Obtain the image to be corrected captured by the digital microscope in a preset scene.
[0091] Step S702: Obtain the three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient corresponding to the digital microscope.
[0092] Step S703: Use a three-dimensional color lookup table to perform color correction on the image to be corrected to obtain the first corrected image.
[0093] Step S704: Use the brightness correction function to perform brightness correction on the first corrected image to obtain the second corrected image.
[0094] Step S705: Use the sharpness restoration coefficient to perform sharpness correction on the second corrected image to obtain the target image.
[0095] It should be noted that the 3D color lookup table, brightness correction function, and sharpness restoration coefficient are obtained from the reference image; the reference image is obtained by taking pictures of the preset optical calibration component under the preset scene using a digital microscope.
[0096] In this embodiment, an image to be corrected is acquired by a digital microscope in a preset scene. A three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient are obtained from a reference image captured by a preset optical calibration device in the preset scene using the digital microscope. Color, brightness, and sharpness corrections are then performed on the image to be corrected to obtain the target image. Compared to existing technologies, this method does not rely on image distortion that cannot be fully covered in all scenes. It can acquire a three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient using a preset optical calibration device, and then simultaneously achieve multi-dimensional correction of the image to be corrected in the color, brightness, and sharpness dimensions using these parameters. This method offers high adaptability, high applicability, and high efficiency while improving the correction effect of microscope images.
[0097] Meanwhile, images captured by digital microscopes can be automatically corrected in multiple dimensions, including color, brightness, and sharpness, using the methods described above. This requires no manual intervention, is highly adaptable, and can be quickly applied to water quality sample testing, scientific research experiments, medical testing, and teaching scenarios under different microscope equipment and lighting conditions. It significantly improves image quality and correction efficiency, and solves the problem that existing technologies cannot quickly and accurately handle multi-dimensional imaging deviations.
[0098] Combination Figure 8 As shown, this embodiment of the present disclosure provides an apparatus 80 for correcting microscope images, the apparatus including: a first acquisition module 81, a second acquisition module 82 and a correction module 83.
[0099] The first acquisition module 81 is configured to acquire the image to be corrected taken by a digital microscope;
[0100] The second acquisition module 82 is configured to acquire a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient corresponding to the digital microscope; wherein, the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are acquired through a reference image; the reference image is acquired by taking a picture of a preset optical calibration component under a preset scene using the digital microscope;
[0101] The correction module 83 is configured to use a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image.
[0102] The apparatus for correcting microscope images provided in this disclosure acquires an image to be corrected captured by a digital microscope in a preset scene. Then, based on a reference image captured by the digital microscope in the preset scene using a preset optical calibration device, a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient are obtained to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, resulting in a corrected target image. Compared to existing technologies, this approach does not rely on image distortion that cannot be fully covered in all scenes. It can acquire a three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient using a preset optical calibration device, and then automatically perform multi-dimensional correction of the image to be corrected in color, brightness, and sharpness dimensions using these parameters. This approach has high adaptability and improves the correction effect of microscope images.
[0103] Furthermore, the optical calibration components include: a color standard area and a brightness reference area; the color standard area includes multiple color blocks corresponding to various colors; each color block is provided with a micro-grating and a multi-layer thin film structure below it; the brightness reference area includes several brightness blocks corresponding to various brightness levels.
[0104] Furthermore, the reference image includes a color image acquired by a digital microscope of a color standard area; the device for correcting microscope images also includes a lookup table acquisition module; the lookup table acquisition module is configured to acquire a three-dimensional color lookup table by: acquiring the captured color information corresponding to each color patch in the color image; acquiring the standard color information corresponding to each color patch; inputting the captured color information and the standard color information into a preset three-dimensional lookup table model for training to obtain a three-dimensional color lookup table.
[0105] Furthermore, the reference image includes a brightness image acquired by a digital microscope of a brightness reference area; the device for correcting the microscope image also includes a correction curve acquisition module; the correction curve acquisition module is configured to acquire the brightness correction function by: acquiring the captured brightness information corresponding to each brightness color block in the brightness image; acquiring the standard brightness information corresponding to each brightness color block; and using a linear regression algorithm to perform linear fitting based on the captured brightness information and the standard brightness information to obtain the brightness correction function.
[0106] Furthermore, the reference images include color images of the color standard area obtained by digital microscopy;
[0107] The device for correcting microscope images also includes a restoration coefficient acquisition module; the restoration coefficient acquisition module is configured to acquire the sharpness restoration coefficient by: acquiring the intensity information corresponding to the color image; performing a fast Fourier transform on the intensity information to obtain a reference spectral intensity distribution; acquiring the standard spectral intensity distribution corresponding to the color region; acquiring the fuzzy reference value corresponding to the color image based on the reference spectral intensity distribution and the standard spectral intensity distribution; and obtaining the sharpness restoration coefficient based on the fuzzy reference value.
[0108] Furthermore, the correction module is configured to perform color correction, brightness correction, and sharpness correction on the image to be corrected using a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient, respectively, to obtain the corrected target image: Color correction is performed on the image to be corrected using a three-dimensional color lookup table to obtain a first corrected image; brightness correction is performed on the first corrected image using a brightness correction function to obtain a second corrected image; and sharpness correction is performed on the second corrected image using a sharpness restoration coefficient to obtain the target image.
[0109] It should be noted that the apparatus for correcting microscope images provided in the above embodiments and the method for obtaining carbon emission inversion models provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs its operations have been described in detail in the method embodiments and will not be repeated here. In practical applications, the apparatus for correcting microscope images provided in the above embodiments can be configured to perform the above functions by different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0110] Combination Figure 9As shown, this embodiment of the present disclosure provides an apparatus 90 for correcting microscope images, including a processor 91 and a memory 92. Optionally, the apparatus may further include a communication interface 93 and a bus 94. The processor 91, communication interface 93, and memory 92 can communicate with each other via the bus 94. The communication interface 93 can be used for information transmission. The processor 91 can call logical instructions in the memory 92 to execute the method for correcting microscope images described in the above embodiment.
[0111] Furthermore, the logic instructions in the aforementioned memory 92 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0112] The memory 92, as a storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 91 executes functional applications and data processing by running the program instructions / modules stored in the memory 92, that is, it implements the method for correcting microscope images in the above embodiments.
[0113] The memory 92 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 92 may include high-speed random access memory and may also include non-volatile memory.
[0114] This disclosure provides an apparatus. The apparatus includes an apparatus body; the aforementioned means for correcting microscope images is mounted on the apparatus body.
[0115] Using the device provided in this disclosure, an image to be corrected is acquired by a digital microscope in a preset scene. Then, based on a reference image acquired by the digital microscope in the preset scene using a preset optical calibration device, a three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are obtained to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image. In this way, compared to existing technologies, it does not rely on image distortion that cannot be completely covered in all scenes. It can obtain a three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient using a preset optical calibration device, and then automatically perform multi-dimensional correction of the color, brightness, and sharpness dimensions of the image to be corrected using the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient. This results in high adaptability and improves the correction effect of microscope images.
[0116] This disclosure provides a storage medium storing computer-executable instructions configured to perform the method described above for correcting microscope images.
[0117] The aforementioned storage media can be either transient computer-readable storage media or non-transitory computer-readable storage media. Non-transitory storage media include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and can also be transient storage media.
[0118] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included or substituted for parts and features of other embodiments. Throughout this document, each embodiment may focus on describing differences from other embodiments, and similar or identical parts between embodiments may be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section of the disclosed embodiments, then the relevant parts may be referred to the description of the method section.
[0119] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. It will be clearly understood by those skilled in the art that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description; sometimes there is no specific order between different operations or steps.
Claims
1. A method for correcting microscope images, characterized in that, include: Acquire the image to be corrected captured by a digital microscope in a preset scene; The three-dimensional color lookup table, brightness correction function, and sharpness restoration coefficient corresponding to the digital microscope are obtained; wherein, the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are obtained through a reference image; the reference image is obtained by taking a picture of a preset optical calibration component under a preset scene using the digital microscope; The three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are used to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image; The optical calibration component includes: a color standard area and a brightness reference area; the color standard area includes multiple color blocks corresponding to multiple colors; each color block is provided with a micro grating and a multilayer thin film structure below it; the brightness reference area includes several brightness blocks corresponding to brightness; the micro grating is formed by engraving several equally spaced parallel grooves, so that the color blocks are color cards with stripes invisible to the naked eye; The reference image includes a color image captured by the digital microscope of the color standard area; the sharpness restoration coefficient is obtained by the following method: obtaining the intensity information corresponding to the color image; performing a fast Fourier transform on the intensity information to obtain a reference spectral intensity distribution; obtaining a fuzzy reference value corresponding to the color image based on the reference spectral intensity distribution and a preset standard spectral intensity distribution; and obtaining the sharpness restoration coefficient based on the fuzzy reference value.
2. The method for correcting microscope images according to claim 1, characterized in that, The reference image includes a color image acquired by the digital microscope of the color standard area; the color three-dimensional lookup table is obtained by the following method: Obtain the captured color information corresponding to each color block in the color image; Obtain the standard color information corresponding to each of the color blocks; The captured color information and the standard color information are input into a preset three-dimensional lookup table model for training to obtain the three-dimensional color lookup table.
3. The method for correcting microscope images according to claim 1, characterized in that, The reference image includes a brightness image acquired by the digital microscope of the brightness reference area; the brightness correction function is obtained by the following method: Obtain the shooting brightness information corresponding to each brightness color block in the brightness image; Obtain the standard brightness information corresponding to each of the brightness color blocks; The brightness correction function is obtained by linearly fitting the shooting brightness information and the standard brightness information using a linear regression algorithm.
4. The method for correcting microscope images according to claim 1, characterized in that, The process of using the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image, includes: The image to be corrected is color-corrected using the three-dimensional color lookup table to obtain a first corrected image; The brightness correction function is used to correct the brightness of the first corrected image to obtain the second corrected image; The second corrected image is then sharpened using the sharpness restoration coefficient to obtain the target image.
5. A device for correcting microscope images, characterized in that, include: The first acquisition module is configured to acquire the image to be corrected taken by a digital microscope; The second acquisition module is configured to acquire a three-dimensional color lookup table, a brightness correction function, and a sharpness restoration coefficient corresponding to the digital microscope; wherein, the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient are acquired through a reference image; the reference image is acquired by the digital microscope taking a picture of a preset optical calibration component in a preset scene; The correction module is configured to use the three-dimensional color lookup table, the brightness correction function, and the sharpness restoration coefficient to perform color correction, brightness correction, and sharpness correction on the image to be corrected, respectively, to obtain the corrected target image; The optical calibration component includes: a color standard area and a brightness reference area; the color standard area includes multiple color blocks corresponding to multiple colors; each color block is provided with a micro grating and a multilayer thin film structure below it; the brightness reference area includes several brightness blocks corresponding to brightness; the micro grating is formed by engraving several equally spaced parallel grooves, so that the color blocks are color cards with stripes invisible to the naked eye; The reference image includes a color image captured by the digital microscope of the color standard area; the sharpness restoration coefficient is obtained by the following method: obtaining the intensity information corresponding to the color image; performing a fast Fourier transform on the intensity information to obtain a reference spectral intensity distribution; obtaining a fuzzy reference value corresponding to the color image based on the reference spectral intensity distribution and a preset standard spectral intensity distribution; and obtaining the sharpness restoration coefficient based on the fuzzy reference value.
6. An apparatus for correcting microscope images, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to perform, when running the program instructions, the method for correcting microscope images as described in any one of claims 1 to 4.
7. A device for correcting microscope images, characterized in that, include: The device body; and the apparatus for correcting microscope images as described in claim 5 or claim 6, are mounted on the device body.
8. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for correcting microscope images as described in any one of claims 1 to 4.