Image processing method, device, electronic device and storage medium
By processing multiple digital slices through scoring and image fusion models, the problem of low image quality in the existing technology is solved, and digital slice images with higher quality and resolution are achieved.
Patent Information
- Application Number
- CN202210591305.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-05-27
AI Technical Summary
Existing multi-layer digital slice preprocessing methods ignore key cellular information, resulting in low quality of processed digital slice images.
A scoring model is used to score multiple digital images, and images containing more key cell information are selected for fusion. The image fusion model is used to improve image quality.
The image quality and resolution of processed digital slices are improved, the retention of key cell information is enhanced, and it is suitable for multi-layer digital slice processing of different scanners.
Smart Images

Figure CN114937017B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the continuous development of image scanning technology, the application of digital slices is becoming more and more extensive. In order to obtain clearer digital slices, when digitally scanning cell slices with a digital scanner, the cell slices are usually scanned in layers to obtain multi-layer digital slices.
[0003] To facilitate subsequent observation of multi-layer digital slides, they are typically preprocessed. However, existing multi-layer digital slide preprocessing methods typically use traditional image aggregation methods, which ignore some key cellular information contained in the digital slides during the preprocessing process. As a result, the processed digital slides contain less key cellular information, resulting in lower image quality. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide an image processing method, apparatus, electronic device and storage medium, so as to improve the image quality of processed digital slices when processing multi-layer digital slices.
[0005] In a first aspect, the present invention provides an image processing method, comprising: acquiring multiple digital images, wherein each of the digital images is a layer image or a portion of a layer image in a multi-layer digital slice; for a digital image, inputting the digital image into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model; determining a preset number of digital images to be fused from the multiple digital images based on the multiple scores; and fusing the preset number of digital images to be fused into a target digital image.
[0006] In the above implementation process, a scoring model is used to score digital images, and then multiple digital images to be fused are determined based on the scoring results of each digital image, so that the determined digital images to be fused can contain more key cell information, and finally the multiple digital images to be fused are fused into a target digital image, so that the determined target digital image has higher quality.
[0007] In an optional embodiment, when each of the digital images is an image of a layer in a multi-layer digital slice, fusing the preset number of digital images to be fused into a target digital image includes: inputting the preset number of digital images to be fused into a preset image fusion model for fusing to obtain the target digital image.
[0008] In the above implementation process, a preset number of digital images to be fused are input into the image fusion model. The image fusion model can improve the image resolution, so that the determined target digital image has higher resolution and is clearer.
[0009] In an optional embodiment, when each of the digital images is a portion of an image layer in a multi-layer digital slice, obtaining the multiple digital images includes: dividing the multi-layer digital slice into blocks according to a preset resolution to obtain multiple image areas; and dividing each layer of the image layer of the multi-layer digital slice into blocks according to the multiple image areas to obtain the multiple digital images.
[0010] In the above implementation process, multiple layers of digital slices are divided into blocks according to a preset resolution to obtain multiple image areas, and then each layer of the multi-layer digital slices is divided into blocks according to the image areas, so that the digital image size is appropriate, avoiding the digital image being too large, resulting in excessive scoring calculations in the subsequent input scoring model, and thus resulting in excessive image processing time.
[0011] In an optional embodiment, before inputting a digital image into a preset scoring model, the method further includes: calculating the second-order gradient of each digital image to obtain a secondary gradient image of the digital image; and determining that the number of pixel points in the secondary gradient image of the digital image whose pixel values are greater than a preset pixel threshold is greater than a preset number.
[0012] In the above implementation process, before the acquired digital image is input into the scoring model for scoring, the second-order gradient of the acquired digital image is calculated, the secondary gradient image of the digital image is determined, the acquired digital image is screened according to the secondary gradient image, and the digital image corresponding to the multi-layer digital slice background image is removed, thereby reducing the number of images input into the scoring model, thereby improving processing efficiency.
[0013] In an optional embodiment, determining a preset number of digital images to be fused from the multiple digital images based on multiple scores includes: for each image area, determining a preset number of digital images to be fused from the digital images in the image area based on the scores of the digital images in the image area.
[0014] In an optional embodiment, fusing the preset number of digital images to be fused into a target digital image includes: for each image area, inputting the preset number of digital images to be fused in the image area into a preset image fusion model for fusion to obtain a sub-target digital image corresponding to the image area; and splicing the sub-target digital images corresponding to each image area to obtain the target digital image.
[0015] In an optional embodiment, when training the scoring model, the training samples are digital images corresponding to multiple multi-layer digital slices, and the training labels are preset scores of the digital images corresponding to the multiple multi-layer digital slices, wherein the preset scores of the digital images corresponding to the multi-layer digital slices are positively correlated with the amount of key information included in the digital images corresponding to the multi-layer digital slices.
[0016] In the above implementation process, the preset scores of the digital images corresponding to the multi-layer digital slices are positively correlated with the amount of key information included in the digital images corresponding to the multi-layer digital slices. When using the scoring model for scoring, digital images with a larger amount of key information can be determined, so that subsequent image fusion can be performed based on the digital images with a larger amount of key information, so that the determined target image can include a larger amount of key information.
[0017] In a second aspect, the present invention provides an image processing device, comprising: an acquisition module for acquiring multiple digital images, wherein each of the digital images is a layer image or a portion of a layer image in a multi-layer digital slice; a score determination module for inputting a digital image into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model; an image screening module for determining a preset number of digital images to be fused from the multiple digital images based on multiple scores; and a fusion module for fusing the preset number of digital images to be fused into a target digital image.
[0018] In an optional embodiment, when each of the digital images is an image of a layer in a multi-layer digital slice, the fusion module is specifically used to input the preset number of digital images to be fused into a preset image fusion model for fusion to obtain the target digital image.
[0019] In an optional embodiment, when each of the digital images is a portion of an image layer in a multi-layer digital slice, the acquisition module is specifically configured to divide the multi-layer digital slice into blocks according to a preset resolution to obtain a plurality of image regions; and divide each image layer of the multi-layer digital slice into blocks according to the plurality of image regions to obtain the plurality of digital images.
[0020] In an optional embodiment, the device further includes: a gradient determination module, configured to calculate, for each digital image, a second-order gradient of the digital image to obtain a secondary gradient image of the digital image; and determine that the number of pixel points in the secondary gradient image of the digital image whose pixel values are greater than a preset pixel threshold is greater than a preset number.
[0021] In an optional embodiment, the image screening module is specifically configured to determine, for each image region, a preset number of digital images to be fused from the digital images in the image region according to scores of the digital images in the image region.
[0022] In an optional embodiment, the image fusion module is specifically used to input a preset number of digital images to be fused in each image area into a preset image fusion model for fusion to obtain a sub-target digital image corresponding to the image area; and splice the sub-target digital images corresponding to each image area to obtain the target digital image.
[0023] In an optional embodiment, when training the scoring model, the training samples are digital images corresponding to multiple multi-layer digital slices, and the training labels are preset scores of the digital images corresponding to the multiple multi-layer digital slices, wherein the preset scores of the digital images corresponding to the multi-layer digital slices are positively correlated with the amount of key information included in the digital images corresponding to the multi-layer digital slices.
[0024] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory and a bus; the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a method as described in any one of the aforementioned embodiments.
[0025] In a fourth aspect, the present invention provides a storage medium having computer program instructions stored thereon. When the computer program instructions are read and executed by a computer, the method described in any one of the aforementioned embodiments is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;
[0028] Figure 2 A structural block diagram of an image processing device provided in an embodiment of the present application;
[0029] Figure 3 This is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0031] Multi-layer digital sections: Since cell sections have a certain thickness and cells overlap, after using a digital scanner to scan and digitize the cytological sections to obtain multi-layer digital sections, the image areas corresponding to the digital images of each layer of the digital sections are the same.
[0032] See also Figure 1 , Figure 1 A flowchart of an image processing method provided in an embodiment of the present application, the image processing method may include the following steps:
[0033] Step 101: Acquire multiple digital images.
[0034] Step 102: For a digital image, input the digital image into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model.
[0035] Step 103: determining a preset number of digital images to be fused from the plurality of digital images according to the multiple scores.
[0036] Step 104: Fusing a preset number of digital images to be fused into a target digital image.
[0037] The above method is introduced in detail below.
[0038] Step 101: Acquire multiple digital images.
[0039] In the embodiment of the present application, a plurality of digital images are first acquired, wherein each digital image is a layer image or a portion of a layer image in a multi-layer digital slice.
[0040] It should be understood that multi-layer digital slides are generated by scanning cell slides with a digital slide scanner. The file format of multi-layer digital slides is defined by the corresponding digital slide scanner manufacturer and cannot be directly processed. Therefore, it is necessary to use the corresponding decoding method to decode the multi-layer digital slides to obtain multiple digital images.
[0041] In addition, the multi-layer digital slices can be images determined by scanning with a digital slice scanner at different magnifications of 10 times, 20 times, and 40 times. This application does not specifically limit the scanning magnification.
[0042] It should be noted that after decoding an M-layer multi-layer digital slice, M single-layer digital slice images (M is a positive integer) can be obtained, and each single-layer digital slice image corresponds to a layer image of the M-layer multi-layer digital slice.
[0043] Since different multi-layer digital slices have different sizes, in some embodiments, the digital image may be an image of a layer in the multi-layer digital slice. That is, after decoding a multi-layer digital slice, each layer image is directly used as a digital image for subsequent processing.
[0044] In some other implementations, considering that the file size of several digital images directly obtained after decoding a multi-layer digital slice is large and inconvenient for subsequent processing, the above step 101 may include the following contents:
[0045] Divide the multi-layer digital slices into blocks according to the preset resolution to obtain multiple image areas;
[0046] Each layer of the multi-layer digital slice image is divided into blocks according to multiple image regions to obtain multiple digital images.
[0047] In the embodiment of the present application, the multi-layer digital slices are divided into blocks according to a preset resolution to obtain multiple image regions. The preset resolution can be flexibly set according to the resolution size of the multi-layer digital slices.
[0048] For example, assuming that the pixel size of a multi-layer digital slice is 20000×20000, the preset resolution can be set to 480×480.
[0049] According to the above content, after decoding a multi-layer digital slice, each layer image of the multi-layer digital slice can be obtained. The determined multiple image regions are used to divide each layer image of the multi-layer digital slice into blocks, thereby obtaining multiple digital images.
[0050] For example, for an M-layer digital slide, assuming that N image regions are determined after segmentation according to a preset resolution (N is a positive integer), after segmenting each layer of the multi-layer digital slide according to the N image regions, there will be M digital images in each image region, that is, M×N digital images are obtained.
[0051] Furthermore, in order to make the transition of pixels at the joints of the divided images smoother during subsequent splicing, overlapping pixels exist between adjacent image regions when the multi-layer digital slices are divided into blocks according to a preset resolution.
[0052] For example, assuming that the pixel size of a multi-layer digital slice is 20000×20000, the preset resolution is set to 480×480, and adjacent image areas overlap by 16 pixels in both length and width.
[0053] Step 102: For a digital image, input the digital image into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model.
[0054] In an embodiment of the present application, after determining a plurality of digital images, each digital image is input into a preset scoring model, and the scoring model outputs a score of the digital image.
[0055] The following introduces the training process of the scoring model.
[0056] As an optional implementation, the scoring model can be a deep learning algorithm model. Specifically, the scoring model can include a feature extraction layer and a regression layer. The feature extraction layer is used to extract features from the input digital image. The feature extraction layer can be various visual deep learning models, such as SeNet and ResNet51. The regression layer takes as input the image features extracted by the feature extraction layer and uses Softmax to output a floating-point number between 0 and 1.0, which is the score of the input digital image.
[0057] Furthermore, to ensure that the feature extraction layer can fully extract the entire content and detailed features of the digital image, the dimension of the feature vector in the feature extraction layer can be 1024. It is understood that the dimension of the feature vector can be flexibly set according to the size of the digital image and can also be 512, 2048, etc., and this application does not impose specific limitations on this.
[0058] Furthermore, the scoring model's training samples are digital images corresponding to multiple layers of digital slices, and the training labels are preset scores for the digital images corresponding to the multiple layers of digital slices. The preset scores for the digital images corresponding to the multiple layers of digital slices are positively correlated with the amount of key information contained in the digital images corresponding to the multiple layers of digital slices. It is understood that the more key information a digital image contains, the higher the preset score corresponding to the digital image.
[0059] In some other embodiments, when the multi-slice digital slides are cervical cytology multi-slice digital slides, doctors perform a quality score on the training samples based on the degree to which they provide effective diagnosis and treatment evidence. A higher score indicates a higher degree to which the training samples provide effective diagnosis and treatment evidence. This score is used as a training label.
[0060] Furthermore, the training samples for the scoring model can be digital images corresponding to multi-layer digital slides scanned by scanners from different manufacturers. By using digital images corresponding to multi-layer digital slides scanned by scanners from different manufacturers as training samples, the image processing method provided in the embodiments of the present application can be used to process multi-layer digital slides scanned by scanners from various manufacturers, thereby improving the applicability of the image processing method provided in the embodiments of the present application.
[0061] It should be noted that, when obtaining the digital image corresponding to the training sample, the method in the aforementioned step 101 may be used to obtain the digital image as the training sample.
[0062] It should be understood that the training and verification process of the scoring model can refer to the training and verification process of the existing deep learning algorithm model, and will not be elaborated here.
[0063] As an optional implementation, before step 102, the image processing method provided in the embodiment of the present application may further include:
[0064] For each digital image, calculating the second-order gradient of the digital image to obtain a secondary gradient image of the digital image;
[0065] It is determined that the number of pixel points in the secondary gradient image of the digital image whose pixel values are greater than a preset pixel threshold is greater than a preset number.
[0066] It should be understood that, since the content of the images corresponding to certain image areas in the multi-layer digital slices is background images, there is no valid image information in these areas and no subsequent image processing is required. Therefore, before step 102, the second-order gradient of each digital image is calculated to obtain a secondary gradient image for each digital image. The pixel values in each secondary gradient image are compared with a preset pixel threshold. When the number of pixel points in the secondary gradient image of a digital image whose pixel values are greater than the preset pixel threshold is less than the preset number, the digital image is considered to be a background image and no subsequent processing is performed on such images. When the number of pixel points in the secondary gradient image of a digital image whose pixel values are greater than the preset pixel threshold is greater than the preset number, the digital image is considered to contain valid information and such images are input into a preset scoring model to determine a score.
[0067] Among them, the preset pixel threshold and the preset number can be flexibly set according to the type of digital image to be processed. This application does not specifically limit the specific values of the preset pixel threshold and the preset number.
[0068] In the above manner, before the acquired digital image is input into the scoring model for scoring, the second-order gradient of the acquired digital image is calculated, the secondary gradient image of the digital image is determined, the acquired digital image is screened according to the secondary gradient image, and the digital image corresponding to the multi-layer digital slice background image is removed, thereby reducing the number of images input into the scoring model, thereby improving processing efficiency.
[0069] As can be seen from the above, the digital image can be a layer image or a portion of a layer image in a multi-layer digital slice. For the convenience of subsequent description, steps 103 and 104 are described below for the above two situations respectively.
[0070] When the digital image can be a layer of a multi-layer digital slide:
[0071] Step 103: determining a preset number of digital images to be fused from the plurality of digital images according to the multiple scores.
[0072] In the embodiment of the present application, after the score of each digital image is determined, a preset number of fused digital images are determined according to the score of each digital image.
[0073] As an optional implementation, step 103 may include:
[0074] A digital image corresponding to a score higher than a score threshold is determined from the multiple scores as the digital image to be fused.
[0075] In the embodiment of the present application, a scoring threshold is pre-set, and all digital images corresponding to scores higher than the scoring threshold are used as digital images to be fused. The scoring threshold can be flexibly determined according to the range of scores output by the scoring model.
[0076] For example, when the score range output by the scoring model is between 0 and 1, the scoring threshold can be set to 0.7, 0.8, etc.
[0077] As another optional implementation, step 103 may include:
[0078] The multiple scores are sorted from high to low, and a preset number of digital images corresponding to the scores are selected from high to low as the digital images to be fused.
[0079] In the embodiment of the present application, a preset number of digital images with the highest scores are selected as the digital images to be fused. The preset number can be flexibly determined based on the number of layers in the multi-layer digital slice. The larger the number of layers in the multi-layer digital slice, the larger the preset number; the smaller the number of layers in the multi-layer digital slice, the smaller the preset number. It is understood that this application does not impose any specific limitation on the size of the preset number.
[0080] For example, if the number of layers of the multi-layer digital slice is 7, the preset number can be set to 4; if the number of layers of the multi-layer digital slice is 11, the preset number can be set to 6, and so on.
[0081] Step 104: Fusing a preset number of digital images to be fused into a target digital image.
[0082] In the embodiment of the present application, since each digital image to be fused corresponds to a layer of images of the multi-layer digital slice, the target digital image can be obtained by fusing the preset number of digital images to be fused determined in step 103 .
[0083] As an optional implementation, step 104 may include:
[0084] A preset number of digital images to be fused are input into a preset image fusion model for fusion to obtain a target digital image.
[0085] In the embodiment of the present application, a preset number of digital images to be fused are input into a preset image fusion model for improved fusion, and the image fusion model outputs a target digital image.
[0086] The following introduces the training process of the image fusion model.
[0087] As an optional implementation, the image fusion model may include a feature extraction module and a generative adversarial network (GAN). The feature extraction module is used to extract features from the input digital image. The feature extraction module can be various visual depth models, such as SeNet, ResNet51 and other models. The input of the generative adversarial network is the image features extracted by the feature extraction module, and the output is the target digital image. The algorithm of the generative adversarial network can be: DCGAN, CGAN, WGAN and other algorithms, which are not specifically limited in this application.
[0088] Furthermore, the training samples of the image fusion model are multiple clear digital images corresponding to multi-layer digital slices scanned by a scanner, and the training labels are the clearest digital images in the position corresponding to the training samples determined by observation under a microscope at the scanning magnification of the scanner.
[0089] It can be understood that the working principle of image fusion based on the adversarial generative network can refer to the existing technology and will not be elaborated here.
[0090] In the above manner, a preset number of digital images to be fused are input into the adversarial generative network, and the adversarial generative network can improve the image resolution, so that the determined target digital image has higher resolution and is clearer.
[0091] When the digital image can be part of a layer of a multi-layer digital slide:
[0092] Accordingly, the above step 103 includes the following contents:
[0093] For each image region, a preset number of digital images to be fused are determined from the digital images in the image region according to the scores of the digital images in the image region.
[0094] In this embodiment of the present application, there are multiple image regions, each corresponding to a number of digital images. For each image region, a score is determined for each digital image within that image region. Based on the scores of each digital image within that image region, a predetermined number of digital images to be fused are determined from the digital images within that image region.
[0095] It can be understood that for each image region, the method for determining the preset number of digital images to be fused corresponding to the image region is the same as the method for determining the preset number of digital images to be fused in the previous embodiment, and is not described here for simplicity.
[0096] Accordingly, the above step 104 includes the following contents:
[0097] For each image region, a preset number of digital images to be fused in the image region are input into a preset image fusion model for fusion, to obtain a sub-target digital image corresponding to the image region;
[0098] The sub-target digital images corresponding to each image area are spliced together to obtain the target digital image.
[0099] In the embodiment of the present application, for each image region, a predetermined number of to-be-fused digital images within that image region are input into a predetermined image fusion model for fusion, thereby obtaining a sub-target digital image corresponding to that image region. It will be appreciated that the method for obtaining the sub-target digital image is the same as the method for determining the target digital image in the previous embodiment, and for the sake of brevity, this description will not be repeated here.
[0100] Since there are multiple image regions, the sub-target digital image corresponding to each image region is determined, which means that each image region corresponds to a sub-target digital image. Then, the sub-target digital images corresponding to each image region are spliced to obtain the target digital image.
[0101] Furthermore, when splicing the sub-target digital images corresponding to the respective image regions, the sub-target digital images corresponding to the respective image regions are spliced according to the order in which the aforementioned layer digital slices are divided into blocks according to the preset resolution.
[0102] Furthermore, since there is an overlapping area between adjacent sub-target digital images, the pixel values of the overlapping area can be determined by linear combination for the pixel points in the overlapping area.
[0103] Specifically, the pixel values of the overlapping area are determined according to I(i,j)=αI1(i,j)+(1-α)I2(i,j). Here, I(i,j) is the pixel value of the overlapping area after stitching, I1(i,j) is the pixel value of the first sub-target digital image before stitching, I2(i,j) is the pixel value of the second sub-target digital image before stitching, i and j represent the horizontal and vertical coordinates corresponding to the pixel values, and α is a preset linear parameter, 0<α<1.
[0104] In addition, after determining the target digital image, the target digital image can be encoded according to the encoding method defined by the digital slice scanner manufacturer corresponding to the multi-layer digital slice corresponding to the target digital image to obtain a single-layer digital slice.
[0105] In some other embodiments, the multi-layer digital slice can be a multi-layer digital slice of cervical cytology. After the above-mentioned image processing, the obtained single-layer digital slice of cervical cytology contains more key cell information, which can improve the efficiency of subsequent doctors' digital reading and computer-assisted diagnosis.
[0106] In summary, the embodiment of the present application provides an image processing method. First, multiple digital images corresponding to multiple digital slices are obtained. For each digital image, the digital image is input into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model. Then, a preset number of digital images to be fused are determined from the multiple digital images based on the multiple scores. Finally, the preset number of digital images to be fused are fused into a target digital image. In the above manner, the digital images are scored using a scoring model, and then multiple digital images to be fused are determined based on the scoring results of each digital image, so that the determined digital images to be fused can contain more key cellular information. Finally, the multiple digital images to be fused are fused into a target digital image, so that the determined target digital image has higher quality.
[0107] Based on the same inventive concept, an image processing device is also provided in the embodiment of the present application. Figure 2 , Figure 2 This is a structural block diagram of an image processing device provided in an embodiment of the present application. The image processing device 200 may include:
[0108] An acquisition module 201 is configured to acquire a plurality of digital images, wherein each of the digital images is an image of a layer or a portion of an image of a layer in a multi-layer digital slice;
[0109] The scoring determination module 202 is configured to input a digital image into a preset scoring model and obtain a score corresponding to the digital image output by the scoring model;
[0110] An image screening module 203 is configured to determine a preset number of digital images to be fused from the plurality of digital images according to the plurality of scores;
[0111] The fusion module 204 is configured to fuse the preset number of digital images to be fused into a target digital image.
[0112] In an optional embodiment, when each of the digital images is a layer image in a multi-layer digital slice, the fusion module 204 is specifically configured to input the preset number of digital images to be fused into a preset image fusion model for fusion to obtain the target digital image.
[0113] In an optional embodiment, when each of the digital images is a portion of a layer of an image in a multi-layer digital slice, the acquisition module 201 is specifically used to block the multi-layer digital slice according to a preset resolution to obtain multiple image areas; and block each layer of the image of the multi-layer digital slice according to the multiple image areas to obtain the multiple digital images.
[0114] In an optional embodiment, the device further includes: a gradient determination module, configured to calculate, for each digital image, a second-order gradient of the digital image to obtain a secondary gradient image of the digital image; and determine that the number of pixel points in the secondary gradient image of the digital image whose pixel values are greater than a preset pixel threshold is greater than a preset number.
[0115] In an optional embodiment, the image screening module 203 is specifically configured to determine, for each image region, a preset number of digital images to be fused from the digital images in the image region according to the scores of the digital images in the image region.
[0116] In an optional embodiment, the image fusion module 204 is specifically used to input a preset number of digital images to be fused in each image area into a preset image fusion model for fusion to obtain a sub-target digital image corresponding to the image area; and splice the sub-target digital images corresponding to each image area to obtain the target digital image.
[0117] In an optional embodiment, when training the scoring model, the training samples are digital images corresponding to multiple multi-layer digital slices, and the training labels are preset scores of the digital images corresponding to the multiple multi-layer digital slices, wherein the preset scores of the digital images corresponding to the multi-layer digital slices are positively correlated with the amount of key information included in the digital images corresponding to the multi-layer digital slices.
[0118] See also Figure 3 , Figure 3This is a schematic diagram of the structure of an electronic device 300 according to an embodiment of the present application. The electronic device 300 includes: at least one processor 301, at least one communication interface 302, at least one memory 303, and at least one bus 304. The bus 304 is used to enable direct communication between these components, the communication interface 302 is used to communicate signaling or data with other node devices, and the memory 303 stores machine-readable instructions executable by the processor 301. When the electronic device 300 is running, the processor 301 communicates with the memory 303 via the bus 304, and when the machine-readable instructions are called by the processor 301, the image processing method described above is executed.
[0119] The processor 301 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0120] The memory 303 may include but is not limited to random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0121] I understand. Figure 3 The structure shown is for illustration only. The electronic device 300 may also include Figure 3 More or fewer components than shown, or with Figure 3 Different configurations shown. Figure 3Each component shown in the figure can be implemented using hardware, software, or a combination thereof. In the embodiments of the present application, the electronic device 300 can be, but is not limited to, a physical device such as a desktop computer, a laptop computer, a smartphone, a smart wearable device, an in-vehicle device, or a virtual device such as a virtual machine. In addition, the electronic device 300 does not necessarily have to be a single device, but can also be a combination of multiple devices, such as a server cluster, etc.
[0122] In addition, an embodiment of the present application further provides a computer storage medium, on which a computer program is stored. When the computer program is run by a computer, the steps of the image processing method in the above embodiment are executed.
[0123] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0124] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0126] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0127] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.
[0128] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An image processing method, characterized in that: The method comprises: Acquiring multiple digital images, wherein each digital image is an image of a layer or a portion of an image of a layer in a multi-layer digital slice; the multi-layer digital slice is generated by layer-by-layer scanning of the cell slice by a digital section scanner; For a digital image, the digital image is input into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model; the score of the digital image is positively correlated with the amount of key information included in the digital image; determining a preset number of digital images to be fused from the plurality of digital images according to the plurality of scores; fusing the preset number of digital images to be fused into a target digital image; When each of the digital images is a portion of an image layer in a multi-layer digital slice, the acquiring of the multiple digital images includes: dividing the multi-layer digital slice into blocks according to a preset resolution to obtain a plurality of image regions; dividing each layer of the image layer of the multi-layer digital slice into blocks according to the plurality of image regions to obtain the multiple digital images; Determining a preset number of digital images to be fused from the plurality of digital images according to the plurality of scores includes: for each image region, determining a preset number of digital images to be fused from the digital images in the image region according to the scores of the digital images in the image region; The fusing of the preset number of digital images to be fused into a target digital image includes: for each image region, inputting the preset number of digital images to be fused in the image region into a preset image fusion model for fusion, thereby obtaining a sub-target digital image corresponding to the image region; and splicing the sub-target digital images corresponding to the respective image regions in a blocking order of the multi-layer digital slices according to a preset resolution, thereby obtaining the target digital image.
2. The method according to claim 1, characterized in that When each of the digital images is an image of a layer in a multi-layer digital slice, fusing the preset number of digital images to be fused into a target digital image includes: The preset number of digital images to be fused are input into a preset image fusion model for fusion to obtain the target digital image.
3. The method according to claim 1, characterized in that Before inputting a digital image into a preset scoring model, the method further includes: For each digital image, calculating the second-order gradient of the digital image to obtain a secondary gradient image of the digital image; It is determined that the number of pixel points in the secondary gradient image of the digital image whose pixel values are greater than a preset pixel threshold is greater than a preset number.
4. The method according to any one of claims 1 to 3, characterized in that When training the scoring model, the training samples are digital images corresponding to multiple multi-layer digital slices, and the training labels are preset scores of the digital images corresponding to the multiple multi-layer digital slices, wherein the preset scores of the digital images corresponding to the multi-layer digital slices are positively correlated with the amount of key information included in the digital images corresponding to the multi-layer digital slices.
5. An image processing device, characterized in that: The device comprises: An acquisition module is used to acquire multiple digital images, wherein each digital image is an image of a layer or a portion of an image of a layer in a multi-layer digital slice; the multi-layer digital slice is generated by performing layered scanning on the cell slice by a digital section scanner; A scoring determination module is configured to input a digital image into a preset scoring model to obtain a score corresponding to the digital image output by the scoring model; the score of the digital image is positively correlated with the amount of key information included in the digital image; an image screening module, configured to determine a preset number of digital images to be fused from the plurality of digital images according to a plurality of scores; A fusion module, configured to fuse the preset number of digital images to be fused into a target digital image; When each of the digital images is a part of a layer of an image in a multi-layer digital slice, the acquisition module is used to block the multi-layer digital slice according to a preset resolution to obtain multiple image areas; block each layer of the multi-layer digital slice according to the multiple image areas to obtain the multiple digital images; the image screening module is used to determine, for each image area, a preset number of digital images to be fused from each digital image in the image area according to the score of each digital image in the image area; the fusion module is used to input, for each image area, the preset number of digital images to be fused in the image area into a preset image fusion model for fusion, to obtain a sub-target digital image corresponding to the image area; and the sub-target digital images corresponding to each image area are spliced in the blocking order of the multi-layer digital slice according to the preset resolution to obtain the target digital image.
6. An electronic device, characterized in that: include: processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor can execute the method according to any one of claims 1 to 4 by calling the program instructions.
7. A storage medium, characterized in that: The storage medium stores computer program instructions, and when the computer program instructions are read and executed by a computer, the method according to any one of claims 1 to 4 is executed.
Citation Information
Patent Citations
Method and system for judging image quality
CN111462112A
Multi-resolution image fusion method, device, equipment, medium and product
CN112862732A