All-phase multi-resolution image processing method, device, equipment and medium
Through the full-phase multi-resolution image processing method, the diagnostic inaccuracy problem caused by image phase differences in the image pyramid method is solved, and the precise positioning and accurate synthesis of image structure information is achieved.
Patent Information
- Application Number
- CN202211006497.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-08-22
AI Technical Summary
When processing medical images, the existing image pyramid methods lead to large differences in image phases, affecting diagnostic accuracy, and the synthetic images may have similar relief effects, making it difficult to accurately locate image structure information.
The full-phase multi-resolution image processing method is adopted to perform full-phase downsampling and decomposition of the preset number of layers on the image to be processed, and stitched into a full-phase tiling map, calculate the residual images of adjacent layers, and perform upsampling and synthesis to ensure that the image phase remains unchanged.
Improve the accuracy of image processing, avoid image phase differences, and ensure accurate positioning of image structure information.
Smart Images

Figure CN115526831B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a full-phase multi-resolution image processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] Medical images are typically two-dimensional radiographic images, such as DR (Digital Radiography) images and dental panoramic images. Due to individual patient differences and variations in image acquisition conditions, the presentation of these images can vary significantly. Useful details and information within the images can be obscured by noise or unimportant tissue structures, potentially interfering with diagnosis and even leading to misdiagnosis or missed diagnosis. Therefore, image processing is essential to highlight useful details and information.
[0003] Currently, it is more common to use the image pyramid method to process two-dimensional images, that is, to recursively decompose the two-dimensional image by downsampling with gradually decreasing resolution to obtain multiple layers of images with reduced resolution and residual images of images between two adjacent layers. Then, the residual images corresponding to each layer are synthesized by upsampling to obtain a composite image.
[0004] The above method can decompose a two-dimensional image into multiple images of different resolutions, while simultaneously synthesizing the image with little information loss and requiring low computational effort for both decomposition and synthesis. Therefore, it is widely used in the field of digital image processing. However, the low-resolution images decomposed using the standard image pyramid method exhibit a distinct single-phase characteristic. Adjusting a low-resolution image at a particular level of decomposition only adjusts one phase at that resolution. When the adjusted image is restored to its original size, it may exhibit a significant phase difference. This situation, on the one hand, makes it difficult to adjust certain phases at certain resolutions. On the other hand, it may cause the final synthesized image to exhibit an embossed effect, altering the original phase information of the original image. For operations requiring precise positioning of image structural information, the loss of image phase information may affect positioning accuracy. Summary of the Invention
[0005] The present invention provides a full-phase multi-resolution image processing method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the accuracy of image processing.
[0006] To achieve the above objectives, the present invention provides a full-phase multi-resolution image processing method, comprising:
[0007] Acquire an image to be processed, and perform a downsampling decomposition operation on the image to be processed with a preset number of layers, each layer including a preset full phase, to obtain a decomposed image of different phases at the same resolution for each layer;
[0008] Splicing the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed;
[0009] According to the full phase tiling images of every two adjacent layers, the residuals between the decomposed images of the corresponding adjacent layers are calculated to obtain a set of residual images;
[0010] An upsampling synthesis operation is performed on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0011] Optionally, the image to be processed is decomposed by a preset number of layers, each layer including a preset full-phase downsampling operation, and each layer corresponding to a decomposed image of a different phase with the same resolution, including:
[0012] Performing blur processing on the image to be processed;
[0013] Obtaining a resolution reduction factor corresponding to each layer in the preset number of layers;
[0014] The blurred image is decomposed according to the resolution reduction factor corresponding to each layer and the preset full phase, and decomposed images of different phases with the same resolution are obtained for each layer.
[0015] Optionally, the blurring the image to be processed includes:
[0016] Using a preset filter kernel, convolution calculation is performed on each pixel of the image to be processed in turn to obtain a filter value corresponding to each pixel;
[0017] The blurred image is obtained by combining the filter values.
[0018] Optionally, the step of calculating the residuals between the decomposed images of corresponding adjacent layers based on the full phase tiling images of each two adjacent layers to obtain a residual image set includes:
[0019] Obtaining a full phase tile image of the i+1th layer, where i=0, 1, 2…, n-1, and n represents the preset number of layers;
[0020] Performing an upsampling operation on the full-phase tiled image of the i+1th layer with a preset resolution increase multiple to obtain an upsampled image corresponding to the i+1th layer;
[0021] Obtain a full phase tiled image of the i-th layer, calculate a residual value between the upsampled image of the i+1-th layer and the full phase tiled image of the i-th layer, and obtain a residual image corresponding to the i-th layer;
[0022] When i=n-1, the full phase tile image corresponding to the i-th layer is used as the residual image of the i-th layer;
[0023] The residual images corresponding to each layer are collected to obtain the residual image set.
[0024] Optionally, performing an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed includes:
[0025] Obtain the residual image of the i-th layer in order from low to high resolution, where i = n-1, ..., 2, 1, 0, and n represents the preset number of layers;
[0026] Perform an upsampling operation on the residual image of the i-th layer to obtain an upsampled residual image of the i-th layer;
[0027] Obtaining a residual image of the i-1th layer, and superimposing the upsampled residual image of the i-th layer with the residual image of the i-1th layer to obtain a composite image of the i-th layer;
[0028] Using i=i-1, return to the above-mentioned order from low to high resolution, and sequentially obtain the residual image steps of the i-th layer until i=0, and use the final synthesized image as the processed image of the image to be processed.
[0029] Optionally, the step of stitching the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image having the same size as the original size of the image to be processed includes:
[0030] Obtaining the original size of the image to be processed;
[0031] generating an image frame having the same size as the original size;
[0032] Perform edge detection on the decomposed images of different phases corresponding to each layer in turn;
[0033] According to a preset tiling order, the edges of the decomposed images of different phases corresponding to each layer are aligned and tiled into the image frame to obtain the full-phase tiled image.
[0034] Optionally, before performing the upsampling synthesis operation on the residual images in the residual image set, the method further includes:
[0035] Performing a fuzzy filtering operation on each residual image in the residual image set to obtain a fuzzy filtered residual image;
[0036] The preset image enhancement method is used to perform image enhancement processing on the residual image after fuzzy filtering.
[0037] In order to solve the above problems, the present invention further provides a full-phase multi-resolution image processing device, the device comprising:
[0038] A full-phase downsampling module is used to obtain an image to be processed, and perform a decomposition operation on the image to be processed by downsampling a preset number of layers, each layer including a preset full-phase, so as to obtain a decomposed image of different phases at the same resolution at each layer;
[0039] A full-phase tiled image generation module is used to stitch the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed;
[0040] A residual image generation module is used to calculate the residual between the decomposed images of each two adjacent layers based on the full phase tiling images of each two adjacent layers to obtain a residual image set;
[0041] The upsampling synthesis module is used to perform an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0042] In order to solve the above problem, the present invention further provides an electronic device, comprising:
[0043] a memory storing at least one computer program; and
[0044] The processor executes the program stored in the memory to implement the above-mentioned full-phase multi-resolution image processing method.
[0045] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned full-phase multi-resolution image processing method.
[0046] Compared with traditional image pyramid image processing methods, in the embodiment of the present invention, during the downsampling process of the image to be processed, each layer performs full phase decomposition on the image to be processed to obtain decomposed images of different phases. The decomposed images of different phases are then spliced to obtain a full phase tiled image of the same size as the image to be processed. The full phase tiled image of each layer is used to calculate the relevant residual image and perform upsampling and synthesis operations on the residual image, thereby ensuring that the synthesized image does not change in phase compared to the image to be processed, thereby improving the accuracy of image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic flow chart of a full-phase multi-resolution image processing method provided by one embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a detailed implementation flow of one step in the all-phase multi-resolution image processing method provided by one embodiment of the present invention;
[0049] Figure 3 A schematic diagram of a detailed implementation flow of another step in the all-phase multi-resolution image processing method provided by an embodiment of the present invention;
[0050] Figure 4 A schematic diagram of a detailed implementation flow of another step in the all-phase multi-resolution image processing method provided by an embodiment of the present invention;
[0051] Figure 5 A functional module diagram of a full-phase multi-resolution image processing device provided by an embodiment of the present invention;
[0052] Figure 6 A schematic structural diagram of an electronic device for implementing the all-phase multi-resolution image processing method provided by one embodiment of the present invention.
[0053] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0055] The embodiment of the present application provides a full-phase multi-resolution image processing method. The execution subject of the full-phase multi-resolution image processing method includes but is not limited to at least one of the electronic devices such as the server and the terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the full-phase multi-resolution image processing method can be executed by software or hardware installed on the terminal device or the server device, and the software can be a blockchain platform. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0056] Reference Figure 1 FIG. 1 is a flow chart of a full-phase multi-resolution image processing method according to an embodiment of the present invention. In this embodiment, the full-phase multi-resolution image processing method includes:
[0057] S1. Acquire an image to be processed, and perform a downsampling decomposition operation on the image to be processed with a preset number of layers, each layer including a preset full phase, to obtain a decomposed image of different phases at the same resolution at each layer;
[0058] In the embodiment of the present invention, the image to be processed refers to a two-dimensional image, for example, a medical image such as a DR image, a dental panoramic image, or a CT image.
[0059] In an embodiment of the present invention, a computer statement (Java statement, Python statement, etc.) with a data capture function can be used to obtain the user-authorized image to be processed from a pre-built storage area, and the storage area includes but is not limited to a database, a blockchain, and a network cache.
[0060] In an embodiment of the present invention, according to the image pyramid method, the downsampling decomposition operation refers to an operation of compressing the image to be processed layer by layer. The higher the level, the smaller the image size corresponding to the layer and the lower the image resolution. The preset number of layers can be set according to actual conditions, for example, 3 layers or 5 layers.
[0061] In the embodiment of the present invention, compared with a single phase, the preset full phase is composed of multiple different phases that completely cover the image to be processed. Preferably, four phases can be set. In practical applications, the preset full phase is adjustable.
[0062] For details, see Figure 2As shown, the decomposition operation of the image to be processed is performed with a preset number of layers, each layer including a preset full-phase downsampling, and each layer corresponding to a decomposed image of a different phase with the same resolution, including:
[0063] S11, performing blur processing on the image to be processed;
[0064] S12, obtaining a resolution reduction factor corresponding to each layer in the preset number of layers;
[0065] S13 , decomposing the blurred image according to the resolution reduction factor corresponding to each layer and the preset full phase, so as to obtain decomposed images of different phases with the same resolution for each layer.
[0066] In the embodiment of the present invention, the purpose of performing blurring processing on the image to be processed is to adjust the frequency band of the image to be processed and avoid aliasing of the image during downsampling.
[0067] In detail, the blurring of the image to be processed includes: using a preset filter kernel to perform convolution calculation on each pixel point of the image to be processed in turn to obtain a filter value corresponding to each pixel point; and collecting each of the filter values to obtain the blurred image.
[0068] In the embodiment of the present invention, the preset filter kernel may adopt the following 5*5 filter kernel:
[0069] W(m,n)=w(m)*w(n)'
[0070] Where m,n=-2,-1,0,1,1,
[0071] w(0)=a
[0072]
[0073]
[0074] a represents an adjustable coefficient. The larger the coefficient is, the narrower the frequency band of each layer of image will be. Preferably, the coefficient can be 0.375.
[0075] In an embodiment of the present invention, the resolution reduction factor for each layer can preferably be 0.5, i.e., the resolution of the decomposed image of the current layer is 0.5 times the resolution of the decomposed image of the previous layer, and the resolution of the decomposed images between two adjacent layers is reduced at a rate of 0.5. In actual applications, the resolution reduction factor for each layer can be adjusted.
[0076] For example, the image to be processed is I(i, j), where i = 0, 1, 2, ..., h-1; j = 0, 1, 2, ..., w-1, and h and w are the height and width of the image to be processed, respectively. The resolution reduction gradient corresponding to each layer is 0.5. The preset full phase is 4 phases. The image to be processed is used as the initial layer, i.e., layer 0. The image to be processed is then downsampled with a resolution gradient of 0.5 at 4 phases, resulting in the following 4 decomposed images of different phases:
[0077] I d00 (k, m) = I(2k, 2m)
[0078] I d01 (k, m) = I(2k, 2m+1)
[0079] I d02 (k, m) = I(2k+1, 2m)
[0080] I d03 (k, m) = I(2k+1, 2m+1)
[0081] in, Will I d00 (k,m),I d01 (k,m),I d02 (k,m) and I d03 The four decomposed images of (k, m) with different phases are used as the first layer. Correspondingly, the second layer will generate 16 decomposed images with different phases relative to the first layer, and so on, to obtain the decomposed images of different phases corresponding to each layer.
[0082] In an embodiment of the present invention, compared with a traditional image pyramid method, for example, a Laplacian pyramid method is used to perform a downsampling operation on the image to be processed. The image after each downsampling decomposition layer is usually an image of a single phase. The denoised image is decomposed according to the resolution reduction gradient corresponding to each layer and the preset full phase. The decomposed image generated corresponding to each layer includes an image that can cover each phase of the image to be decomposed.
[0083] S2. stitching the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed;
[0084] In an embodiment of the present invention, in order to facilitate the subsequent calculation of the residual value between each layer of decomposed images, it is necessary to first splice the decomposed images of different phases corresponding to each layer into an image with the same original size as the image to be processed, that is, to generate the full-phase tiled image.
[0085] In an embodiment of the present invention, the stitching operation mainly refers to aligning and arranging each of the decomposed images in two-dimensional space, so that there is no overlap of the decomposed images in the arranged image, and the size of the arranged image is the same as the original size of the image to be processed. Therefore, there is no need to perform a feature extraction operation on each of the decomposed images.
[0086] In detail, the step of stitching the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed includes:
[0087] Obtaining the original size of the image to be processed;
[0088] generating an image frame having the same size as the original size;
[0089] Perform edge detection on the decomposed images of different phases corresponding to each layer in turn;
[0090] According to a preset tiling order, the edges of the decomposed images of different phases corresponding to each layer are aligned and tiled into the image frame to obtain the full-phase tiled image.
[0091] For example, taking the example of stitching four decomposed images of different phases into a full-phase tiled image, the preset tiling order can be upper left, lower right, lower left, and upper right. The four decomposed images can be tiled in the order of upper left, lower right, lower left, and upper right to obtain a full-phase tiled image with the same size as the original size of the image to be processed.
[0092] In another embodiment of the present invention, during the process of aligning and tiling the decomposed images of different phases, the decomposed images of different phases can be flipped horizontally or vertically. After flipping, the edges are aligned according to a preset tiling order to obtain the above-mentioned full-phase tiling image.
[0093] S3. Calculate the residuals between the decomposed images of the corresponding adjacent layers based on the full phase tiling images of each two adjacent layers to obtain a residual image set;
[0094] In an embodiment of the present invention, according to an image pyramid method, during a downsampling operation on the image to be processed, the resolution of the image to be processed is reduced layer by layer, and there is a certain data difference between the decomposed images of each layer. By calculating the data difference between the decomposed images of every two adjacent layers, the data information lost by the image to be processed during the downsampling operation can be statistically analyzed.
[0095] For details, see Figure 3 As shown, the S3 includes:
[0096] S31, obtaining a full phase tile image of the i+1th layer, wherein i=0, 1, 2...n-1, and n represents the preset number of layers;
[0097] S32, performing an upsampling operation on the full-phase tiled image of the (i+1)th layer with a preset resolution increase factor to obtain an upsampled image corresponding to the (i+1)th layer;
[0098] S33, obtaining a full phase tiled image of the i-th layer, calculating a residual value between the upsampled image of the (i+1)-th layer and the full phase tiled image of the i-th layer, and obtaining a residual image corresponding to the i-th layer;
[0099] S34, when i=n-1, taking the full phase tile image corresponding to the i-th layer as the residual image of the i-th layer;
[0100] S35 , collecting the residual images corresponding to each layer to obtain the residual image set.
[0101] In an embodiment of the present invention, according to the image pyramid method, the upsampling operation refers to an operation opposite to the downsampling operation, that is, an operation of enlarging the image layer by layer. The higher the layer, the larger the size of the image corresponding to the layer, and the higher the resolution of the image.
[0102] It is understandable that the resolution of the full phase tile images between two adjacent layers is different, and the corresponding number of decomposed images is also equal. It is impossible to directly perform residual calculation on the full phase tile image corresponding to each layer. Therefore, the full phase tile image of the i+1th layer can be upsampled to achieve equivalence between the images of the two adjacent layers, and calculate the difference between the upsampled image of the i+1th layer and the full phase tile image of the i-th layer.
[0103] In the embodiment of the present invention, the preset resolution increase multiple may be 2 or other values, and may be set according to actual business needs.
[0104] Preferably, before calculating the residual value between the upsampled image of the i+1th layer and the full phase tiling image of the i-th layer, a fuzzy filtering operation can be performed on the upsampled image corresponding to the i+1th layer to prevent image aliasing.
[0105] It should be noted that, when i=0, the image to be processed may be used as the full phase tiled image of the i-th layer.
[0106] S4. Perform an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0107] In an embodiment of the present invention, according to the image pyramid method, the upsampling synthesis operation refers to the process of reconstructing the image to be processed using the residual image of each layer. In the reconstruction process, the upsampling method is adopted, that is, the residual images of the corresponding layers are synthesized in order from low to high resolution.
[0108] Preferably, before performing the upsampling synthesis operation on the residual images in the residual image set, it also includes: performing a fuzzy filtering operation on each residual image in the residual image set to obtain a fuzzy filtered residual image; and using a preset image enhancement method to perform image enhancement processing on the fuzzy filtered residual image.
[0109] In an embodiment of the present invention, the preset image enhancement method includes but is not limited to a logarithmic image enhancement algorithm, an exponential image enhancement algorithm, and a Laplace operator image enhancement algorithm. In practical applications, each residual image can also be compressed, equalized, and processed to achieve the effect of removing noise and increasing the signal of the residual image.
[0110] For details, see Figure 4 As shown, the S4 includes:
[0111] S41. Obtain the residual image of the i-th layer in order from low to high resolution, where i = n-1, ... 2, 1, 0, and n represents the preset number of layers;
[0112] S42, performing an upsampling operation on the residual image of the i-th layer to obtain an upsampled residual image of the i-th layer;
[0113] S43, obtaining the residual image of the i-1th layer;
[0114] S44, superimposing the upsampled residual image of the i-th layer and the residual image of the (i-1)-th layer to obtain a composite image of the i-th layer;
[0115] S45 , using i=i-1, returning to the above step S42 until i=0, and taking the finally obtained composite image as the processed image of the image to be processed.
[0116] It should be noted that, when i=0, the image to be processed can be used as the residual image of the i-1th layer.
[0117] Preferably, before performing the superposition operation on the upsampled residual image of the i-th layer, a blurring filtering operation may be performed on the upsampled residual image of the i-th layer to prevent image aliasing.
[0118] Compared with traditional image pyramid image processing methods, in the embodiment of the present invention, during the downsampling process of the image to be processed, each layer performs full phase decomposition on the image to be processed to obtain decomposed images of different phases. The decomposed images of different phases are then spliced to obtain a full phase tiled image of the same size as the image to be processed. The full phase tiled image of each layer is used to calculate the relevant residual image and perform upsampling and synthesis operations on the residual image, thereby ensuring that the synthesized image does not change in phase compared to the image to be processed, thereby improving the accuracy of image processing.
[0119] like Figure 5 FIG. 1 is a functional module diagram of a full-phase multi-resolution image processing device provided by an embodiment of the present invention.
[0120] The full-phase multi-resolution image processing device 100 of the present invention can be installed in an electronic device. Depending on the functionality implemented, the full-phase multi-resolution image processing device 100 may include a full-phase downsampling module 101, a full-phase tiled image generation module 102, a residual image generation module 103, and an upsampling synthesis module 104. A module, also referred to as a unit, is a series of computer program segments that can be executed by a processor of an electronic device and perform a fixed function, and is stored in the memory of the electronic device.
[0121] In this embodiment, the functions of each module / unit are as follows:
[0122] The all-phase downsampling module 101 is used to obtain an image to be processed, and perform a decomposition operation on the image to be processed by downsampling a preset number of layers, each layer including a preset all-phase layer, so as to obtain a decomposed image of different phases at the same resolution at each layer;
[0123] The full phase tile image generation module 102 is used to stitch the decomposed images of different phases corresponding to each layer to obtain a full phase tile image with the same size as the original size of the image to be processed;
[0124] The residual image generation module 103 is configured to calculate the residual between the decomposed images of each two adjacent layers based on the full phase tiling images of the adjacent layers to obtain a residual image set;
[0125] The upsampling synthesis module 104 is configured to perform an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0126] In detail, the specific implementation of each module of the full-phase multi-resolution image processing device is as follows:
[0127] Step 1: Obtain an image to be processed, and perform a downsampling decomposition operation on the image to be processed with a preset number of layers, each layer including a preset full phase, to obtain a decomposed image of different phases at the same resolution for each layer;
[0128] In the embodiment of the present invention, the image to be processed refers to a two-dimensional image, for example, a medical image such as a DR image, a dental panoramic image, or a CT image.
[0129] In an embodiment of the present invention, a computer statement (Java statement, Python statement, etc.) with a data capture function can be used to obtain the user-authorized image to be processed from a pre-built storage area, and the storage area includes but is not limited to a database, a blockchain, and a network cache.
[0130] In an embodiment of the present invention, according to the image pyramid method, the downsampling decomposition operation refers to an operation of compressing the image to be processed layer by layer. The higher the level, the smaller the image size corresponding to the layer and the lower the image resolution. The preset number of layers can be set according to actual conditions, for example, 3 layers or 5 layers.
[0131] In the embodiment of the present invention, compared with a single phase, the preset full phase is composed of multiple different phases that completely cover the image to be processed. Preferably, four phases can be set. In practical applications, the preset full phase is adjustable.
[0132] In detail, the decomposition operation of the image to be processed with a preset number of layers, each layer including a preset full-phase downsampling, to obtain decomposed images of different phases at the same resolution at each layer, includes:
[0133] Performing blur processing on the image to be processed;
[0134] Obtaining a resolution reduction factor corresponding to each layer in the preset number of layers;
[0135] The blurred image is decomposed according to the resolution reduction factor corresponding to each layer and the preset full phase, and decomposed images of different phases with the same resolution are obtained for each layer.
[0136] In the embodiment of the present invention, the purpose of performing blurring processing on the image to be processed is to adjust the frequency band of the image to be processed and avoid aliasing of the image during downsampling.
[0137] In detail, the blurring of the image to be processed includes:
[0138] A convolution calculation is performed on each pixel of the image to be processed in sequence using a preset filter kernel to obtain a filter value corresponding to each pixel; and each filter value is collected to obtain a blurred image.
[0139] In the embodiment of the present invention, the preset filter kernel may adopt the following 5*5 filter kernel:
[0140] W(m,n)=w(m)*w(n)′
[0141] Where m, n = -2, -1, 0, 1, 1,
[0142] w(0)=a
[0143]
[0144]
[0145] a represents an adjustable coefficient. The larger the coefficient is, the narrower the frequency band of each layer of image will be. Preferably, the coefficient can be 0.375.
[0146] In an embodiment of the present invention, the resolution reduction factor for each layer can preferably be 0.5, i.e., the resolution of the decomposed image of the current layer is 0.5 times the resolution of the decomposed image of the previous layer, and the resolution of the decomposed images between two adjacent layers is reduced at a rate of 0.5. In actual applications, the resolution reduction factor for each layer can be adjusted.
[0147] Exemplarily, the image to be processed is I(i, j), where i = 0, 1, 2, ..., h-1; j = 0, 1, 2, ..., w-1, and h and w are the height and width of the image to be processed, respectively. The resolution reduction gradient corresponding to each layer is 0.5. The preset full phase is 4 phases. The image to be processed is used as the initial layer, i.e., layer 0. The image to be processed is then downsampled with a resolution gradient of 0.5 at 4 phases, resulting in the following 4 decomposed images of different phases:
[0148] I d00 (k, m) = I(2k, 2m)
[0149] I d01 (k, m) = I(2k, 2m+1)
[0150] I d02 (k, m) = I(2k+1, 2m)
[0151] I d03 (k, m) = I(2k+1, 2m+1)
[0152] in, Will I d00 (k, m), I d01 (k, m), I d02 (k, m) and I d03The four decomposed images (k, m) with different phases are used as the first layer. Correspondingly, the second layer will generate 16 decomposed images with different phases relative to the first layer, and so on, to obtain decomposed images with different phases corresponding to each layer.
[0153] In an embodiment of the present invention, compared with a traditional image pyramid method, for example, a Laplacian pyramid method is used to perform a downsampling operation on the image to be processed. The image after each downsampling decomposition layer is usually an image of a single phase. The denoised image is decomposed according to the resolution reduction gradient corresponding to each layer and the preset full phase. The decomposed image generated corresponding to each layer includes an image that can cover each phase of the image to be decomposed.
[0154] Step 2: stitching the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed;
[0155] In an embodiment of the present invention, in order to facilitate the subsequent calculation of the residual value between each layer of decomposed images, it is necessary to first splice the decomposed images of different phases corresponding to each layer into an image with the same original size as the image to be processed, that is, to generate the full-phase tiled image.
[0156] In an embodiment of the present invention, the stitching operation mainly refers to aligning and arranging each of the decomposed images in two-dimensional space, so that there is no overlap of the decomposed images in the arranged image, and the size of the arranged image is the same as the original size of the image to be processed. Therefore, there is no need to perform a feature extraction operation on each of the decomposed images.
[0157] In detail, the step of stitching the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed includes:
[0158] Obtaining the original size of the image to be processed;
[0159] generating an image frame having the same size as the original size;
[0160] Perform edge detection on the decomposed images of different phases corresponding to each layer in turn;
[0161] According to a preset tiling order, the edges of the decomposed images of different phases corresponding to each layer are aligned and tiled into the image frame to obtain the full-phase tiled image.
[0162] For example, taking the example of stitching four decomposed images of different phases into a full-phase tiled image, the preset tiling order can be upper left, lower right, lower left, and upper right. The four decomposed images can be tiled in the order of upper left, lower right, lower left, and upper right to obtain a full-phase tiled image with the same size as the original size of the image to be processed.
[0163] In another embodiment of the present invention, during the process of aligning and tiling the decomposed images of different phases, the decomposed images of different phases can be flipped horizontally or vertically. After flipping, the edges are aligned according to a preset tiling order to obtain the above-mentioned full-phase tiling image.
[0164] Step 3: Calculate the residual between the decomposed images of the corresponding adjacent layers based on the full phase tiling images of each two adjacent layers to obtain a residual image set;
[0165] In an embodiment of the present invention, according to an image pyramid method, during a downsampling operation on the image to be processed, the resolution of the image to be processed is reduced layer by layer, and there is a certain data difference between the decomposed images of each layer. By calculating the data difference between the decomposed images of every two adjacent layers, the data information lost by the image to be processed during the downsampling operation can be statistically analyzed.
[0166] In detail, the residual between the decomposed images of each two adjacent layers is calculated based on the full phase tiling images of the adjacent layers to obtain a residual image set, including:
[0167] Obtaining a full phase tile image of the i+1th layer, where i=0, 1, 2…n-1, and n represents the preset number of layers;
[0168] Performing an upsampling operation on the full-phase tiled image of the i+1th layer with a preset resolution increase multiple to obtain an upsampled image corresponding to the i+1th layer;
[0169] Obtain a full phase tiled image of the i-th layer, calculate a residual value between the upsampled image of the i+1-th layer and the full phase tiled image of the i-th layer, and obtain a residual image corresponding to the i-th layer;
[0170] When i=n-1, the full phase tile image corresponding to the i-th layer is used as the residual image of the i-th layer;
[0171] The residual images corresponding to each layer are collected to obtain the residual image set.
[0172] In an embodiment of the present invention, according to the image pyramid method, the upsampling operation refers to an operation opposite to the downsampling operation, that is, an operation of enlarging the image layer by layer. The higher the layer, the larger the size of the image corresponding to the layer, and the higher the resolution of the image.
[0173] It is understandable that the resolution of the full phase tile images between two adjacent layers is different, and the corresponding number of decomposed images is also equal. It is impossible to directly perform residual calculation on the full phase tile image corresponding to each layer. Therefore, the full phase tile image of the i+1th layer can be upsampled to achieve equivalence between the images of the two adjacent layers, and calculate the difference between the upsampled image of the i+1th layer and the full phase tile image of the i-th layer.
[0174] In the embodiment of the present invention, the preset resolution increase multiple may be 2 or other values, and may be set according to actual business needs.
[0175] Preferably, before calculating the residual value between the upsampled image of the i+1th layer and the full phase tiling image of the i-th layer, a fuzzy filtering operation can be performed on the upsampled image corresponding to the i+1th layer to prevent image aliasing.
[0176] It should be noted that, when i=0, the image to be processed may be used as the full phase tiled image of the i-th layer.
[0177] Step 4: performing an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0178] In an embodiment of the present invention, according to the image pyramid method, the upsampling synthesis operation refers to the process of reconstructing the image to be processed using the residual image of each layer. In the reconstruction process, the upsampling method is adopted, that is, the residual images of the corresponding layers are synthesized in order from low to high resolution.
[0179] Preferably, before performing the upsampling synthesis operation on the residual images in the residual image set, it also includes: performing a fuzzy filtering operation on each residual image in the residual image set to obtain a fuzzy filtered residual image; and using a preset image enhancement method to perform image enhancement processing on the fuzzy filtered residual image.
[0180] In an embodiment of the present invention, the preset image enhancement method includes but is not limited to a logarithmic image enhancement algorithm, an exponential image enhancement algorithm, and a Laplace operator image enhancement algorithm. In practical applications, each residual image can also be compressed, equalized, and processed to achieve the effect of removing noise and increasing the signal of the residual image.
[0181] In detail, performing an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed includes:
[0182] Obtain the residual image of the i-th layer in order from low to high resolution, where i = n-1, ... 2, 1, 0, and n represents the preset number of layers;
[0183] Perform an upsampling operation on the residual image of the i-th layer to obtain an upsampled residual image of the i-th layer;
[0184] Get the residual image of the i-1th layer;
[0185] Superimposing the upsampled residual image of the i-th layer with the residual image of the i-1-th layer to obtain a composite image of the i-th layer;
[0186] With i=i-1, the process returns to the above step S42 until i=0, and the finally obtained composite image is used as the processed image of the image to be processed.
[0187] It should be noted that, when i=0, the image to be processed can be used as the residual image of the i-1th layer.
[0188] Preferably, before performing the superposition operation on the upsampled residual image of the i-th layer, a blurring filtering operation may be performed on the upsampled residual image of the i-th layer to prevent image aliasing.
[0189] Compared with traditional image pyramid image processing methods, in the embodiment of the present invention, during the downsampling process of the image to be processed, each layer performs full phase decomposition on the image to be processed to obtain decomposed images of different phases. The decomposed images of different phases are then spliced to obtain a full phase tiled image of the same size as the image to be processed. The full phase tiled image of each layer is used to calculate the relevant residual image and perform upsampling and synthesis operations on the residual image, ensuring that the synthesized image does not change in phase compared to the image to be processed. Therefore, the full phase multi-resolution image processing device can improve the accuracy of image processing.
[0190] like Figure 6 FIG. 1 is a schematic structural diagram of an electronic device for implementing a full-phase multi-resolution image processing method provided by an embodiment of the present invention.
[0191] The electronic device 1 may include a processor 10 , a memory 11 , and a bus, and may further include a computer program stored in the memory 11 and executable on the processor 10 , such as a full-phase multi-resolution image processing program.
[0192] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the electronic device 1. Furthermore, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the full-phase multi-resolution image processing program, but can also be used to temporarily store data that has been output or is to be output.
[0193] In some embodiments, the processor 10 may be comprised of an integrated circuit, such as a single packaged integrated circuit or a plurality of packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting the various components of the entire electronic device using various interfaces and circuits. It executes or runs programs or modules stored in the memory 11 (e.g., a full-phase multi-resolution image processing program) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
[0194] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable connection and communication between the memory 11 and at least one processor 10, etc.
[0195] Figure 6 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 6The structure shown does not constitute a limitation on the electronic device 1 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0196] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering the various components. Preferably, the power source may be logically connected to the at least one processor 10 via a power management device, thereby implementing functions such as charging management, discharging management, and power consumption management through the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0197] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0198] Optionally, the electronic device 1 may further include a user interface, which may be a display or an input unit (such as a keyboard). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0199] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0200] The full-phase multi-resolution image processing program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following:
[0201] Acquire an image to be processed, and perform a downsampling decomposition operation on the image to be processed with a preset number of layers, each layer including a preset full phase, to obtain a decomposed image of different phases at the same resolution for each layer;
[0202] Splicing the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed;
[0203] According to the full phase tiling images of every two adjacent layers, the residuals between the decomposed images of the corresponding adjacent layers are calculated to obtain a set of residual images;
[0204] An upsampling synthesis operation is performed on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0205] Furthermore, if the modules / units integrated into the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0206] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor of an electronic device, the computer program can implement:
[0207] Acquire an image to be processed, and perform a downsampling decomposition operation on the image to be processed with a preset number of layers, each layer including a preset full phase, to obtain a decomposed image of different phases at the same resolution for each layer;
[0208] Splicing the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed;
[0209] According to the full phase tiling images of every two adjacent layers, the residuals between the decomposed images of the corresponding adjacent layers are calculated to obtain a set of residual images;
[0210] An upsampling synthesis operation is performed on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
[0211] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.
[0212] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0213] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.
[0214] Blockchain, as used in this article, refers to a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0215] The embodiments of the present application can acquire and process relevant data based on holographic projection technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to achieve the best results.
[0216] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. Second-order terms are used to indicate names and do not imply any particular order.
[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A full-phase multi-resolution image processing method, characterized in that: The method comprises: Acquire an image to be processed, and perform a downsampling decomposition operation on the image to be processed with a preset number of layers, each layer including a preset full phase, to obtain a decomposed image of different phases at the same resolution for each layer; Splicing the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed; According to the full phase tiling images of every two adjacent layers, the residuals between the decomposed images of the corresponding adjacent layers are calculated to obtain a set of residual images; An upsampling synthesis operation is performed on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
2. The all-phase multi-resolution image processing method according to claim 1, wherein: The image to be processed is subjected to a decomposition operation of downsampling with a preset number of layers, each layer including a preset full-phase, and each layer corresponding to a decomposed image of a different phase with the same resolution, including: Performing blur processing on the image to be processed; Obtaining a resolution reduction factor corresponding to each layer in the preset number of layers; The blurred image is decomposed according to the resolution reduction factor corresponding to each layer and the preset full phase, and decomposed images of different phases with the same resolution are obtained for each layer.
3. The all-phase multi-resolution image processing method according to claim 2, wherein: The blurring of the image to be processed includes: Using a preset filter kernel, convolution calculation is performed on each pixel of the image to be processed in turn to obtain a filter value corresponding to each pixel; The blurred image is obtained by combining the filter values.
4. The all-phase multi-resolution image processing method according to claim 1, wherein: The method of calculating the residual between the decomposed images of the corresponding adjacent layers according to the full phase tiling images of each two adjacent layers to obtain a residual image set includes: Obtaining a full phase tile image of the i+1th layer, where i=0, 1, 2…, n-1, and n represents the preset number of layers; Performing an upsampling operation on the full-phase tiled image of the (i+1)th layer by an increasing multiple of a preset resolution to obtain an upsampled image corresponding to the (i+1)th layer; Obtain a full phase tiled image of the i-th layer, calculate a residual value between the upsampled image of the i+1-th layer and the full phase tiled image of the i-th layer, and obtain a residual image corresponding to the i-th layer; When i=n-1, the full phase tile image corresponding to the i-th layer is used as the residual image of the i-th layer; The residual images corresponding to each layer are collected to obtain the residual image set.
5. The all-phase multi-resolution image processing method according to claim 1, wherein: The upsampling and synthesizing operation is performed on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed, comprising: Obtain the residual image of the i-th layer in order from low to high resolution, where i = n-1, ... 2, 1, 0, and n represents the preset number of layers; Perform an upsampling operation on the residual image of the i-th layer to obtain an upsampled residual image of the i-th layer; Obtaining a residual image of the i-1th layer, and superimposing the upsampled residual image of the i-th layer with the residual image of the i-1th layer to obtain a composite image of the i-th layer; Using i=i-1, return to the above-mentioned order from low to high resolution, and sequentially obtain the residual image steps of the i-th layer until i=0, and use the final synthesized image as the processed image of the image to be processed.
6. The all-phase multi-resolution image processing method according to claim 1, wherein: The step of stitching the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed includes: Obtaining the original size of the image to be processed; generating an image frame having the same size as the original size; Perform edge detection on the decomposed images of different phases corresponding to each layer in turn; According to a preset tiling order, the edges of the decomposed images of different phases corresponding to each layer are aligned and tiled into the image frame to obtain the full-phase tiled image.
7. The all-phase multi-resolution image processing method according to claim 1, wherein: Before performing the upsampling synthesis operation on the residual images in the residual image set, the method further includes: Performing a fuzzy filtering operation on each residual image in the residual image set to obtain a fuzzy filtered residual image; The preset image enhancement method is used to perform image enhancement processing on the residual image after fuzzy filtering.
8. A full-phase multi-resolution image processing device, characterized in that: The device comprises: A full-phase downsampling module is used to obtain an image to be processed, and perform a decomposition operation on the image to be processed by downsampling a preset number of layers, each layer including a preset full-phase, so as to obtain a decomposed image of different phases at the same resolution at each layer; A full-phase tiled image generation module is used to stitch the decomposed images of different phases corresponding to each layer to obtain a full-phase tiled image with the same size as the original size of the image to be processed; A residual image generation module is used to calculate the residual between the decomposed images of each two adjacent layers based on the full phase tiling images of each two adjacent layers to obtain a residual image set; The upsampling synthesis module is used to perform an upsampling synthesis operation on the residual images in the residual image set to obtain a processed image corresponding to the image to be processed.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so as to enable the at least one processor to perform the full-phase multi-resolution image processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the full-phase multi-resolution image processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Airborne super-resolution image reconstruction device and reconstruction method
CN104217412A
Down-sampling method, device and computer device of depth neural network
CN108710945A