Image Processing Method, Image Processing Device, and Storage Medium

By calculating gradient intensity and direction of multiple microscope images, processing pixel points and binarization, the microscope with the highest definition is automatically determined, which solves the problem of blurring of single-layer microscopes and difficulty in determining sharpness by multi-layer microscopes, and improves image acquisition efficiency and reliability.

CN116071246BActive Publication Date: 2025-08-01SHENZHEN REETOO BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111275161.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-08-01
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the prior art, a single-layer microscope may capture a blurred image, while a multi-layer microscope may be difficult to efficiently and reliably determine the microscope with the highest definition, which relies on manual operation to consume time and effort and is not reliable.

Method used

By acquiring multiple microscopic images with different definitions, the gradient intensity and gradient direction of the target channel image of each image are calculated, pixel point suppression or retention processing is performed, and image binarization is performed, and the microscopic image with the highest definition is determined based on the pixel point information of the binary image.

Benefits of technology

It improves the accuracy acquisition efficiency and reliability of microscopic images, solves the problem of taking blurred images by a single layer microscope, and efficiently and reliably determines the image with the highest definition from the multilayer microscope images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116071246B_ABST
    Figure CN116071246B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method, an image processing device, and a storage medium. The method includes: obtaining multiple microscopic images with different resolutions; obtaining a target channel image corresponding to the target color space of each of the microscopic images; calculating the gradient intensity and gradient direction for each target channel image to obtain the gradient intensity and gradient direction corresponding to each pixel point of each target channel image; performing pixel suppression or retention processing on each target channel image according to the gradient intensity and the gradient direction; performing image binarization processing on each processed target channel image to obtain a corresponding binary image; and determining the microscopic image with the highest resolution among the multiple microscopic images according to the pixel point information of each binary image, thereby improving the efficiency and reliability of obtaining a clear microscopic image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical devices, and in particular, to an image processing method, an image processing device, and a storage medium. Background Art

[0002] In the medical field, currently, microscopic images corresponding to samples are generally obtained by shooting with a single-layer microscope or a multi-layer microscope. For the single-layer microscope shooting method, blurred microscopic images may be taken. For example, when the thickness of the sample to be shot is greater than the depth of field, out-of-focus shooting may occur, resulting in unclear microscopic images. For the multi-layer microscope shooting method, multiple microscopic images with different clarity levels can be obtained, but determining the microscopic image with the highest clarity level from these multiple microscopic images is a difficult problem and usually relies on manual operation, which is not only time-consuming and laborious but also has low reliability.

[0003] Therefore, how to improve the efficiency and reliability of obtaining clear microscopic images has become an urgent problem to be solved. Summary of the Invention

[0004] Embodiments of the present application provide an image processing method, an image processing device, and a storage medium, which can improve the efficiency and reliability of obtaining clear microscopic images.

[0005] In a first aspect, embodiments of the present application provide an image processing method, including:

[0006] Obtaining multiple microscopic images with different clarity levels;

[0007] Obtaining a target channel image corresponding to the target color space of each of the microscopic images;

[0008] Calculating the gradient intensity and gradient direction for each target channel image to obtain the gradient intensity and gradient direction corresponding to each pixel point of each target channel image;

[0009] Performing pixel point suppression or retention processing on each target channel image according to the gradient intensity and the gradient direction;

[0010] Performing image binarization processing on each processed target channel image to obtain a corresponding binary image;

[0011] Determining the microscopic image with the highest clarity level among the multiple microscopic images according to the pixel point information of each binary image.

[0012] In a second aspect, embodiments of the present application further provide an image processing device, including a processor and a memory, where a computer program is stored in the memory, and when the processor calls the computer program in the memory, it executes the above image processing method.

[0013] In a third aspect, an embodiment of the present application further provides a storage medium for storing a computer program, which when executed by a processor causes the processor to implement the above-mentioned image processing method.

[0014] An embodiment of the present application provides an image processing method, an image processing device, and a storage medium. By obtaining multiple microscopic images with different clarity levels, and obtaining the target channel images corresponding to the target color spaces of each microscopic image, then calculating the gradient intensity and gradient direction for each target channel image to obtain the gradient intensity and gradient direction corresponding to each pixel point of each target channel image. According to the gradient intensity and gradient direction, perform pixel point suppression or retention processing on each target channel image, and perform image binarization processing on each processed target channel image to obtain the corresponding binary image. According to the pixel point information of each binary image, determine the microscopic image with the highest clarity level among the multiple microscopic images. This not only effectively solves the problem that a blurred microscopic image may be captured when using a single-layer microscope to capture microscopic images, but also effectively solves the problem that when using a multi-layer microscope to capture microscopic images, it is impossible to efficiently and reliably determine the microscopic image with the highest clarity level from multiple microscopic images, improving the efficiency and reliability of obtaining clear microscopic images. Description of the Drawings

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0016] Figure 1 is a schematic flowchart of the steps of an image processing method provided by an embodiment of the present application;

[0017] Figure 2 is a schematic flowchart of the steps of another image processing method provided by an embodiment of the present application;

[0018] Figure 3 is a schematic flowchart of the steps of calculating the gradient intensity and gradient direction for a denoised target channel image provided by an embodiment of the present application;

[0019] Figure 4 is a schematic flowchart of the steps of performing pixel point suppression or retention processing on each target channel image according to the gradient intensity and the gradient direction;

[0020] Figure 5It is a schematic flowchart of steps for determining the microscopic image with the highest clarity among multiple microscopic images according to the pixel point information of each binary image provided by an embodiment of the present application;

[0021] Figure 6 It is a schematic flowchart of a process for obtaining the microscopic image with the highest clarity provided by an embodiment of the present application;

[0022] Figure 7 It is a schematic block diagram of an image processing device provided by an embodiment of the present application. Detailed implementation manners

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the scope of protection of the present application.

[0024] It should be noted that the descriptions involving "first", "second", etc. in the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first", "second" may explicitly or implicitly include at least one of such features.

[0025] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure or characteristic described in combination with the embodiment is included in one or more embodiments of the present application. Thus, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in partial embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0026] In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions appears to be contradictory or unable to be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0027] The flowcharts shown in the accompanying drawings are merely illustrative examples and do not necessarily include all content and operations / steps, nor do they necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, combined, or partially merged, so the actual execution order may change according to the actual situation.

[0028] In the medical field, currently, microscopic images corresponding to samples are generally obtained by single-layer microscopy or multi-layer microscopy. For the single-layer microscopy shooting method, blurred microscopic images may be captured. For example, when the thickness of the sample to be photographed is greater than the depth of field, out-of-focus shooting may occur, resulting in unclear microscopic images. For the multi-layer microscopy shooting method, multiple microscopic images with different clarity levels can be obtained, but determining the microscopic image with the highest clarity from these multiple microscopic images is a difficult problem and usually relies on manual operation, which is not only time-consuming and laborious but also has low reliability.

[0029] To solve the above problems, embodiments of the present application provide an image processing method, an image processing device, and a storage medium. Among them, the method. By performing corresponding image processing operations on multiple microscopic images, the microscopic image with the highest clarity is determined, improving the efficiency and reliability of obtaining clear microscopic images.

[0030] Please refer to Figure 1 , Figure 1 is a schematic flowchart of the image processing method provided by the embodiments of the present application. This method is applied to an image processing device and can also be applied to other electronic devices other than the image processing device, such as servers, terminal devices, etc. Among them, the server can be an independent server or a server cluster, and the terminal device can be any one of a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, a personal computer (PC), a netbook, and a personal digital assistant (PDA), and no restrictions are made in the embodiments of the present application.

[0031] As Figure 1 shown, the image processing method provided by the embodiments of the present application includes steps S101 to S106.

[0032] S101. Obtain multiple microscopic images with different clarity levels.

[0033] Among them, the microscopic images can be microscopic images corresponding to various objects such as cells and chromosomes. It should be noted that multiple microscopic images with different clarity levels can be microscopic images corresponding to the same object or different objects, and no specific restrictions are made in this application.

[0034] Taking multiple microscopic images with different clarity levels as microscopic images corresponding to the same object as an example below, the method for obtaining the microscopic image with the highest clarity level among them by using the image processing method provided in the embodiments of this application will be explained.

[0035] Exemplarily, the microscopic images can be stored in corresponding storage devices such as memories or buffers, and multiple corresponding microscopic images can be obtained by querying the memory or buffer.

[0036] In some embodiments, multiple microscopic images with different clarity levels are multiple microscopic images with different focal lengths in the same field of view.

[0037] Exemplarily, images are taken at different focal lengths in the same field of view by an imaging device such as a microscope. The imaging device includes but is not limited to a microscope with a CCD (Charge Coupled Device) camera. For example, the sample slide to be photographed can be placed under a microscope with a CCD camera, and multi-layer focusing shooting can be performed by moving up and down along the Z-axis. Exemplarily, the focal length is changed by moving up and down along the Z-axis in the same field of view to take images, and multiple microscopic images of different focal length layers are continuously taken.

[0038] In some embodiments, the number of microscopic images to be taken is preset, and according to the preset number of images to be taken, the microscope is controlled to move up and down along the Z-axis in the same field of view, and the preset number of microscopic images are continuously taken.

[0039] For example, the number of images to be taken can be preset to 5, and then the microscope is controlled to move up and down along the Z-axis in the same field of view, and 5 microscopic images of different focal length layers are continuously taken.

[0040] It should be noted that the number of images to be taken can be flexibly set according to the actual situation, and no specific restrictions are made in this application.

[0041] S102. Obtain the target channel image corresponding to the target color space of each of the microscopic images.

[0042] Exemplarily, the target color space includes, but is not limited to, the RGB color space, the HSV color space, the YUV color space, the LAB color space, etc. The target channel image corresponding to the target color space includes, but is not limited to, one of the R channel image, the G channel image, and the B channel image corresponding to the RGB color space, the H channel image, the S channel image, and the V channel image corresponding to the HSV color space, the Y channel image, the U channel image, and the V channel image corresponding to the YUV color space, and the L channel image, the A channel image, and the B channel image corresponding to the LAB color space.

[0043] For example, taking the target color space as the RGB color space and the target channel image as the G channel image as an example, the RGB channels of each microscopic image are separated respectively to obtain the G channel image corresponding to each microscopic image.

[0044] It should be noted that, in addition to the above-listed G channel images, other channel images can also be obtained, and the present application does not make specific limitations.

[0045] Exemplarily, the target color space and the target channel image can be preset, for example, the target color space is preset as the RGB color space and the target channel image is the G channel image.

[0046] Exemplarily, the target color space and the target channel image can also be set by the user through a human-computer interaction operation. For example, an interface for setting the target color space and the target channel image is output and displayed. The user inputs corresponding setting information such as the color space and the channel image through the setting interface. According to the user's setting information, the color space input by the user is determined as the target color space, and the channel image input by the user is determined as the target channel image.

[0047] S103. Calculate the gradient intensity and gradient direction for each of the target channel images to obtain the gradient intensity and gradient direction corresponding to each pixel point of each of the target channel images.

[0048] Exemplarily, by performing convolution calculations on each of the target channel images respectively, the gradients of each of the target channel images in the x direction and the y direction are obtained. Based on the gradients in the x direction and the y direction, the gradient intensity and gradient direction corresponding to each pixel point are calculated. For example, by performing convolution calculations on each G channel image, the gradient intensity and gradient direction corresponding to each pixel point of each G channel image are obtained.

[0049] In some embodiments, as Figure 2 shown, after step S102, step S107 may be included, and step S103 may include step S1031.

[0050] S107. Denoise each of the target channel images to obtain a denoised target channel image;

[0051] S1031. Calculate the gradient intensity and gradient direction of the denoised target channel image.

[0052] Exemplarily, to further ensure the reliability of image processing, after obtaining the target channel image corresponding to the microscopic image, first denoise each target channel image. For example, after obtaining the G-channel image, denoise the G-channel image.

[0053] In some embodiments, the denoising of each of the target channel images may include:

[0054] Perform image denoising on each of the target channel images using the median filtering method.

[0055] Exemplarily, perform image denoising on each target channel image through the following calculation formula:

[0056] G(x, y) = mid{f(x ± k, y ± k), k ≤ (n - 1) / 2}

[0057] where f(x, y) is the target channel image, G(x, y) is the denoised target channel image, n is the sliding window length corresponding to median filtering, and k is the step size.

[0058] It should be noted that in addition to the above-mentioned method of performing image denoising on the target channel image using the median filtering method, the target channel image can also be denoised by other methods, which are not specifically limited in this application.

[0059] After obtaining the denoised target channel image, calculate the gradient intensity and gradient direction of the denoised target channel image. For example, calculate the gradient intensity and gradient direction of the denoised G-channel image.

[0060] In some embodiments, as Figure 3 shown, step S1031 may include sub-step S10311 and sub-step S10312.

[0061] S10311. Calculate the first gradient in the x direction and the second gradient in the y direction of the denoised target channel image;

[0062] S10312. Perform vector addition calculation on the first gradient and the second gradient to obtain a gradient vector, the magnitude of the gradient vector being the gradient intensity and the direction of the gradient vector being the gradient direction.

[0063] Exemplarily, by performing convolution calculations on each denoised target channel image, a first gradient Gx in the x direction and a second gradient Gy in the y direction of each denoised target channel image are obtained. For example, by performing convolution calculations on the denoised G channel image, a first gradient Gx in the x direction and a second gradient Gy in the y direction of the denoised G channel image are obtained.

[0064] It can be understood that Gx is the first derivative value of the denoised target channel image in the x direction, and Gy is the first derivative value of the denoised target channel image in the y direction.

[0065] According to the obtained first gradient Gx and second gradient Gy, vector addition calculations are performed on the first gradient Gx and the second gradient Gy to obtain a gradient vector. The magnitude of the gradient vector is the gradient intensity, and the direction of the gradient vector is the gradient direction.

[0066] Exemplarily, the gradient intensity G is calculated according to the following formula:

[0067]

[0068] The gradient direction θ is calculated according to the following formula:

[0069] θ = tan -1 (Gy / Gx)

[0070] It can be understood that the gradient direction θ is the angle between the gradient vector and the positive x direction.

[0071] S104. According to the gradient intensity and the gradient direction, perform pixel point suppression or retention processing on each of the target channel images.

[0072] Exemplarily, according to the calculated gradient intensity and gradient direction, a non-maximum suppression method is used to perform pixel point suppression or retention processing on each target channel image.

[0073] In some embodiments, first perform image denoising processing on each target channel image, and then use a non-maximum suppression method to perform pixel point suppression or retention processing on each denoised target channel image. For example, use a non-maximum suppression method to perform pixel point suppression or retention processing on each denoised G channel image.

[0074] In some embodiments, as Figure 4 shown, step S104 may include sub-step S1041 and sub-step S1042.

[0075] S1041. Determine two adjacent pixel points of a pixel point in the target channel image along the positive and negative gradient directions;

[0076] S1042. If the gradient intensities corresponding to two adjacent pixel points are both less than or equal to the gradient intensity corresponding to the pixel point, then retain the pixel point; otherwise, suppress the pixel point.

[0077] Exemplarily, taking any pixel point A in the target channel image as an example, according to the gradient direction corresponding to pixel point A, determine two adjacent pixel points along the positive and negative gradient directions of pixel point A, assumed to be pixel point B and pixel point C, and compare the gradient intensity corresponding to pixel point A with the gradient intensities corresponding to pixel point B and pixel point C according to the gradient intensities corresponding to pixel point A, pixel point B, and pixel point C respectively. If the gradient intensities corresponding to pixel point B and pixel point C are both less than or equal to the gradient intensity corresponding to pixel point A, that is, the gradient intensity corresponding to pixel point A is the largest among them, then retain pixel point A. Otherwise, if the gradient intensity corresponding to pixel point B and / or pixel point C is greater than the gradient intensity corresponding to pixel point A, for example, the gradient intensity corresponding to pixel point B is greater than the gradient intensity corresponding to pixel point A, or the gradient intensity corresponding to pixel point C is greater than the gradient intensity corresponding to pixel point A, or the gradient intensities corresponding to pixel point B and pixel point C are both greater than the gradient intensity corresponding to pixel point A, at this time, suppress pixel point A.

[0078] In some embodiments, first perform image denoising processing on each target channel image, and calculate the gradient intensity and gradient direction corresponding to each pixel point of the denoised target channel image. Then, according to the calculated gradient intensity and gradient direction, use the non-maximum suppression method to perform pixel point suppression or retention processing on the denoised target channel image. For example, taking a denoised G-channel image as an example, calculate the gradient intensity and gradient direction corresponding to each pixel point of the denoised G-channel image. Taking any pixel point A1 in the denoised G-channel image as an example, according to the gradient direction corresponding to pixel point A1, determine two adjacent pixel points along the positive and negative gradient directions of pixel point A1, assumed to be pixel point B1 and pixel point C1, and compare the gradient intensity corresponding to pixel point A1 with the gradient intensities corresponding to pixel point B1 and pixel point C1 according to the gradient intensities corresponding to pixel point A1, pixel point B1, and pixel point C1 respectively. If the gradient intensities corresponding to pixel point B1 and pixel point C1 are both less than or equal to the gradient intensity corresponding to pixel point A1, then retain pixel point A1. Otherwise, if the gradient intensity corresponding to pixel point B1 and / or pixel point C1 is greater than the gradient intensity corresponding to pixel point A1, then suppress pixel point A1.

[0079] S105. Perform image binarization processing on each processed target channel image to obtain a corresponding binary image.

[0080] For example, perform image binarization on each processed G-channel image after pixel suppression or retention processing, and binarize the processed G-channel image to obtain a binary image corresponding to the denoised G-channel image.

[0081] In some embodiments, the performing image binarization on each processed target channel image may include:

[0082] If the gradient intensity corresponding to a pixel point in the processed target channel image is greater than or equal to a preset threshold, mark the pixel value corresponding to the pixel point as 1; if the gradient intensity corresponding to the pixel point is less than the preset threshold, mark the pixel value corresponding to the pixel point as 0.

[0083] Exemplarily, a preset threshold corresponding to the gradient intensity of a pixel point is set in advance. It can be understood that the specific value of this preset threshold can be flexibly set according to the actual situation, and no specific limitation is made here in this application.

[0084] For example, taking the G-channel image after pixel suppression or retention processing as an example, for any pixel point D in the G-channel image after pixel suppression or retention processing, compare the gradient intensity corresponding to the pixel point D with the preset threshold according to the gradient intensity corresponding to the pixel point D. If the gradient intensity corresponding to the pixel point D is greater than or equal to the preset threshold, mark the pixel value corresponding to the pixel point D as 1. Conversely, if the gradient intensity corresponding to the pixel point D is less than the preset threshold, mark the pixel value corresponding to the pixel point D as 0.

[0085] According to this pixel value marking method, mark the pixel value corresponding to each pixel point in the G-channel image after pixel suppression or retention processing as 0 or 1, and obtain a binary image corresponding to the G-channel image after pixel suppression or retention processing.

[0086] It should be noted that in addition to the examples of obtaining binary images listed above, binary images can also be obtained by other means, and no specific limitation is made here in this application.

[0087] S106. Determine the microscopic image with the highest clarity among multiple microscopic images according to the pixel point information of each binary image.

[0088] Among them, the pixel point information of the binary image includes but is not limited to the number of pixel points with a pixel value of 0 and the number of pixel points with a pixel value of 1. For microscopic images with different clarity, the pixel point information corresponding to the binary images obtained after the above series of processing is different. Therefore, according to the pixel point information of each binary image, the microscopic image with the highest clarity among the corresponding multiple microscopic images can be determined.

[0089] In some embodiments, the pixel points of each binary image are accessed through an iterator, all the pixel points of each binary image are traversed, and the pixel points with a pixel value of 1 are counted to obtain the number of pixel points with a pixel value of 1 corresponding to each binary image.

[0090] It should be noted that, in addition to obtaining the number of pixel points with a pixel value of 1 corresponding to each binary image by accessing through an iterator as listed above, the number of pixel points with a pixel value of 1 corresponding to each binary image can also be obtained by other means, and this application does not make specific limitations in this regard.

[0091] In some embodiments, as Figure 5 shown, step S106 may include sub-step S1061 and sub-step S1062.

[0092] S1061: Select a target binary image from the multiple binary images, where the number of pixel points with a pixel value of 1 corresponding to the target binary image is the largest;

[0093] S1062: Determine that the microscopic image corresponding to the target binary image is the microscopic image with the highest clarity.

[0094] Exemplarily, determine the number of pixel points with a pixel value of 1 corresponding to each binary image, then compare the numbers of pixel points with a pixel value of 1, determine the binary image with the largest number of pixel points with a pixel value of 1 from them, and determine the binary image with the largest number of pixel points with a pixel value of 1 as the target binary image. Then, determine the microscopic image corresponding to the target binary image as the microscopic image with the highest clarity.

[0095] For example, assume that the microscopic image P is processed through the above series of processes to obtain the corresponding binary image Q, and the number of pixel points with a pixel value of 1 corresponding to the binary image Q is the largest, then determine that the microscopic image P is the microscopic image with the highest clarity.

[0096] Exemplarily, as Figure 6 shown, Figure 6 is a schematic flowchart for obtaining the microscopic image with the highest clarity:

[0097] 1) Obtain the sample to be photographed and left static;

[0098] 2) Place the sample under a microscope with a CCD camera, and continuously take multiple (such as at least 5) microscopic images of different focal length layers in the same field of view while moving up and down along the Z-axis;

[0099] 3) Separate the RGB channels of each microscopic image to obtain the corresponding G-channel image;

[0100] 4) Use median filtering to perform image denoising on each G-channel image;

[0101] 5), calculate the gradient intensity G and gradient direction θ of each denoised G-channel image;

[0102] 6), according to the gradient intensity G and gradient direction θ, perform non-maximum suppression processing on each denoised G-channel image;

[0103] 7), classify the pixel values of each processed G-channel image according to a preset threshold, mark the pixel values corresponding to the pixel points with gradient intensity greater than or equal to the preset threshold as 1, and mark the pixel values corresponding to the pixel points with gradient intensity less than the preset threshold as 0 to obtain the corresponding binary image;

[0104] 8), access each binary image with a pixel point iterator and count the pixel points with pixel value 1 in the binary image;

[0105] 9), determine the microscopic image corresponding to the binary image with the largest number of pixel points with pixel value 1 as the microscopic image with the highest clarity among each microscopic image.

[0106] In the above embodiments, by obtaining multiple microscopic images with different clarities, obtaining the target channel images corresponding to the target color spaces of each microscopic image, then calculating the gradient intensity and gradient direction for each target channel image, obtaining the gradient intensity and gradient direction corresponding to each pixel point of each target channel image, performing pixel point suppression or retention processing on each target channel image according to the gradient intensity and gradient direction, and performing image binarization processing on each processed target channel image to obtain the corresponding binary image, and determining the microscopic image with the highest clarity among multiple microscopic images according to the pixel point information of each binary image. It not only effectively solves the problem that a blurred microscopic image may be captured when a single-layer microscope captures a microscopic image, but also effectively eliminates the problem that when a multi-layer microscope captures a microscopic image, it is impossible to efficiently and reliably determine the microscopic image with the highest clarity from multiple microscopic images, improving the efficiency and reliability of obtaining a clear microscopic image.

[0107] Please refer to Figure 7 , Figure 7 , which is a schematic block diagram of an image processing device provided by an embodiment of the present application. The image processing device 30 includes an image scanning module 31 and an image analysis module 32. Among them, the image scanning module 31 is used to scan a sample to generate a microscopic image corresponding to the sample. Exemplarily, the image scanning module 31 includes a microscope with a CCD camera, and a microscopic image is obtained by shooting with the microscope. The image analysis module 32 is used to analyze and process the microscopic images generated by the image scanning module 31, such as analyzing multiple microscopic images generated by the image scanning module 31 to determine the microscopic image with the highest clarity among multiple microscopic images.

[0108] Exemplarily, the image analysis module 32 includes a processor 321 and a memory 322. The processor 321 and the memory 322 are connected by a bus, such as an I2C (Inter-integrated Circuit) bus.

[0109] Specifically, the processor 321 can be a micro-control unit (MCU), a central processing unit (CPU), a digital signal processor (DSP), or the like.

[0110] The memory 322 can be a Flash chip, a read-only memory (ROM), a magnetic disk, an optical disc, a USB flash drive, a mobile hard disk, or the like.

[0111] Among them, the processor 321 is used to run a computer program stored in the memory 322, and when the computer program is executed, any one of the image processing methods provided in the embodiments of the present application is implemented.

[0112] Exemplarily, the processor 321 is used to run a computer program stored in the memory and implement the following steps when the computer program is executed:

[0113] Obtain multiple microscopic images with different clarity levels;

[0114] Obtain the target channel image corresponding to the target color space of each microscopic image;

[0115] Calculate the gradient intensity and gradient direction for each target channel image to obtain the gradient intensity and gradient direction corresponding to each pixel point of each target channel image;

[0116] Suppress or retain pixel points for each target channel image according to the gradient intensity and the gradient direction;

[0117] Perform image binarization processing on each processed target channel image to obtain a corresponding binary image;

[0118] Determine the microscopic image with the highest clarity among multiple microscopic images according to the pixel point information of each binary image.

[0119] In some embodiments, the pixel point information includes the number of pixel points with a pixel value of 1. When the processor 321 implements determining the microscopic image with the highest clarity among multiple microscopic images according to the pixel point information of each binary image, it is used to implement:

[0120] Select a target binary image from multiple said binary images, where the number of pixel points corresponding to a pixel value of 1 in the target binary image is the largest;

[0121] Determine that the microscopic image corresponding to the target binary image is the microscopic image with the highest clarity.

[0122] In some embodiments, when the processor 321 implements the image binarization process for each processed target channel image, it is used to implement:

[0123] If the gradient intensity corresponding to a pixel point in the processed target channel image is greater than or equal to a preset threshold, mark the pixel value corresponding to the pixel point as 1;

[0124] If the gradient intensity corresponding to the pixel point is less than the preset threshold, mark the pixel value corresponding to the pixel point as 0.

[0125] In some embodiments, when the processor 321 implements the pixel point suppression or retention process for each said target channel image according to the gradient intensity and the gradient direction, it is used to implement:

[0126] Determine two adjacent pixel points of a pixel point in the target channel image along the positive and negative gradient directions;

[0127] If the gradient intensities corresponding to the two adjacent pixel points are both less than or equal to the gradient intensity corresponding to the pixel point, retain the second pixel point; otherwise, suppress the pixel point.

[0128] In some embodiments, after the processor 321 implements the acquisition of the target channel image corresponding to the target color space of each said microscopic image, it is used to implement:

[0129] Perform image denoising processing on each said target channel image to obtain a denoised target channel image;

[0130] When the processor 321 implements the calculation of the gradient intensity and the gradient direction for each said target channel image, it is used to implement:

[0131] Perform the calculation of the gradient intensity and the gradient direction on the denoised target channel image.

[0132] In some embodiments, when the processor 321 implements the image denoising processing for each said target channel image, it is used to implement:

[0133] Use the median filtering method to perform image denoising processing on each said target channel image.

[0134] In some embodiments, when the processor 321 implements the calculation of the gradient intensity and gradient direction of the denoised target channel image, it is used to implement:

[0135] Calculate the first gradient in the x direction and the second gradient in the y direction of the denoised target channel image;

[0136] Perform vector addition calculation on the first gradient and the second gradient to obtain a gradient vector, where the modulus of the gradient vector is the gradient intensity, and the direction of the gradient vector is the gradient direction.

[0137] In some embodiments, the target color space is the RGB color space, and the target channel image is one of the R channel image, the G channel image, and the B channel image.

[0138] In some embodiments, the multiple microscopic images with different sharpness levels are multiple microscopic images with different focal lengths in the same field of view.

[0139] An embodiment of the present application further provides a storage medium. The storage medium stores a computer program, and the computer program includes program instructions. When the processor executes the program instructions, the steps of the image processing method provided in the above embodiments are implemented. For example, when the computer program is loaded by the processor, the following steps can be executed:

[0140] Obtain multiple microscopic images with different sharpness levels;

[0141] Obtain the target channel image corresponding to the target color space of each microscopic image;

[0142] Perform gradient intensity and gradient direction calculations on each target channel image to obtain the gradient intensity and gradient direction corresponding to each pixel point of each target channel image;

[0143] According to the gradient intensity and the gradient direction, perform pixel suppression or retention processing on each target channel image;

[0144] Perform image binarization processing on each processed target channel image to obtain a corresponding binary image;

[0145] According to the pixel point information of each binary image, determine the microscopic image with the highest sharpness level among the multiple microscopic images.

[0146] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, and details will not be elaborated here.

[0147] Among them, the storage medium may be an internal storage unit of the image processing device in the foregoing embodiment, such as a hard disk or memory of the image processing device. The storage medium may also be an external storage device of the image processing device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the image processing device.

[0148] Since the computer program stored in the storage medium can execute any one of the image processing methods provided in the embodiments of the present application, the beneficial effects achievable by any one of the image processing methods provided in the embodiments of the present application can be realized. For details, refer to the foregoing embodiments and will not be elaborated herein.

[0149] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. An image processing method, characterized in that, Including: Obtain multiple microscopic images with different resolutions; Obtain the target channel image corresponding to the target color space of each of the microscopic images; Calculate the gradient intensity and gradient direction for each target channel image, and obtain the gradient intensity and gradient direction corresponding to each pixel point of each target channel image; According to the gradient intensity and the gradient direction, perform pixel suppression or retention processing on each target channel image; Perform image binarization processing on each processed target channel image to obtain a corresponding binary image; According to the pixel point information of each binary image, determine the microscopic image with the highest resolution among the multiple microscopic images, where the pixel point information includes the number of pixel points with a pixel value of 1; The performing pixel suppression or retention processing on each target channel image according to the gradient intensity and the gradient direction includes: Determine two adjacent pixel points of a pixel point in the target channel image along the positive and negative gradient directions; If the gradient intensities corresponding to the two adjacent pixel points are both less than or equal to the gradient intensity corresponding to the pixel point, then retain the pixel point; otherwise, suppress the pixel point; The performing image binarization processing on each processed target channel image includes: If the gradient intensity corresponding to a pixel point in the processed target channel image is greater than or equal to a preset threshold, then mark the pixel value corresponding to the pixel point as 1; If the gradient intensity corresponding to the pixel point is less than the preset threshold, then mark the pixel value corresponding to the pixel point as 0; The determining the microscopic image with the highest resolution among the multiple microscopic images according to the pixel point information of each binary image includes: Select a target binary image from the multiple binary images, where the number of pixel points with a pixel value of 1 corresponding to the target binary image is the largest; Determine the microscopic image corresponding to the target binary image as the microscopic image with the highest resolution.

2. The method according to claim 1, wherein After obtaining the target channel image corresponding to the target color space of each microscopic image, including: Perform image denoising processing on each target channel image to obtain a denoised target channel image; The calculating the gradient intensity and gradient direction for each target channel image includes: Calculate the gradient intensity and gradient direction for the denoised target channel image.

3. The method according to claim 2, wherein The performing image denoising processing on each target channel image includes: Perform image denoising processing on each target channel image by using the median filtering method.

4. The method according to claim 2, wherein The calculating the gradient intensity and gradient direction for the denoised target channel image includes: Calculate the first gradient in the x direction and the second gradient in the y direction of the denoised target channel image; Perform vector addition calculation on the first gradient and the second gradient to obtain a gradient vector, where the modulus of the gradient vector is the gradient intensity, and the direction of the gradient vector is the gradient direction.

5. The method according to claim 1, characterized in that The target color space is the RGB color space, and the target channel image is one of the R channel image, G channel image, and B channel image.

6. The method according to any one of claims 1 to 5, characterized in that, The multiple microscopic images with different resolutions are multiple microscopic images with different focal lengths under the same field of view.

7. An image processing apparatus, characterized in that, Including: A processor and a memory, where the memory stores a computer program executable by the processor. When the computer program is executed by the processor, it implements the image processing method according to any one of claims 1 to 6.

8. A storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the steps of the image processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Text image definition judgment method and system

    CN110473189A

  • Image processor, image processing method, and image processing program

    JP2014036698A