WO2021115403A1 - 一种图像的处理方法及装置 - Google Patents
一种图像的处理方法及装置 Download PDFInfo
- Publication number
- WO2021115403A1 WO2021115403A1 PCT/CN2020/135536 CN2020135536W WO2021115403A1 WO 2021115403 A1 WO2021115403 A1 WO 2021115403A1 CN 2020135536 W CN2020135536 W CN 2020135536W WO 2021115403 A1 WO2021115403 A1 WO 2021115403A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- resolution
- pixel information
- information
- format
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4053—Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Definitions
- This application relates to the field of communications, such as an image processing method and device.
- Super-resolution reconstruction refers to the process of converting low-resolution images into high-resolution images.
- the currently commonly used super-resolution reconstruction method is an interpolation method based on spatial position or edge. Because the interpolation method lacks local information, and the direction feature of the interpolation reference is usually derived from statistical results, the statistical information of the area where each pixel is located, such as gradient, etc. , To achieve a specific pixel filling process, resulting in this method will cause a decrease in sharpness or a negative effect of "jagging" when zooming in, and a clear high-resolution image cannot be obtained.
- the embodiments of the present application provide an image processing method and device, so as to at least avoid the poor super-resolution reconstruction effect in the related art.
- this application provides an image processing method, including:
- the gradation part Converting the gradation part into first pixel information with a resolution of the second resolution; and converting the texture part into the resolution of the second resolution according to the second image format description information of the texture part
- the second image format description information of the texture part is determined according to the mapping relationship between the first image format and the second image format, wherein the image format of the first image is The first image format
- the first pixel information and the second pixel information are merged to obtain a second image, wherein the resolution of the second image is the second resolution, and the second resolution is greater than the first resolution rate.
- this application provides an image processing device, including:
- a segmentation module configured to segment the first image with a resolution of the first resolution according to the sharpness of the image change to obtain a gradation part and a texture part, wherein the sharpness of the image change of the texture part is greater than the gradation part;
- the conversion module is configured to convert the first gradient part into first pixel information with a second resolution; according to the second image format description information of the texture part, convert the texture part into the resolution The second pixel information of the second resolution, wherein the second image format description information of the texture part is determined according to the mapping relationship between the first image format and the second image format, wherein the first image format The image format of the image is the first image format;
- the fusion module is configured to fuse the first pixel information and the second pixel information to obtain a second image, wherein the resolution of the second image is the second resolution, and the second resolution is greater than The first resolution.
- the present application also provides a computer-readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the computer program described in the first aspect when running Image processing method.
- the present application also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the image described in the first aspect. ⁇ Treatment methods.
- FIG. 1 is a block diagram of the hardware structure of an arithmetic device of an image processing method according to an embodiment of the present application
- Fig. 2 is a flowchart of an image processing method according to an embodiment of the present application.
- Fig. 3 is a structural block diagram of an image processing device according to an embodiment of the present application.
- Fig. 4 is a schematic diagram of a process of constructing a network training set according to an optional embodiment of the present application
- Fig. 5 is a schematic flowchart of a method for training a network according to an optional embodiment of the present application.
- Fig. 6 is a schematic diagram of an image processing flow according to an optional embodiment of the present application.
- FIG. 1 is a hardware structure block diagram of a computing device of an image processing method according to an embodiment of the present application.
- the computing device 10 may include at least one (only one is shown in FIG. 1) processor 102 (the processor 102 may include but is not limited to a microprocessor (Micro Control Unit, MCU) or a field programmable logic device) (Field Programmable Gate Array, FPGA) and other processing devices) and a memory 104 configured to store data.
- MCU Micro Control Unit
- FPGA Field Programmable Gate Array
- the foregoing computing device may also include a transmission device 106 and an input/output device 108 configured to communicate.
- a transmission device 106 and an input/output device 108 configured to communicate.
- the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the foregoing computing device.
- the computing device 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.
- the memory 104 may be configured to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the image processing method in the embodiment of the present application.
- the processor 102 runs the computer programs stored in the memory 104, thereby Execute various functional applications and data processing, that is, realize the above-mentioned methods.
- the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic storage device, flash memory, or other non-volatile solid-state memory.
- the memory 104 may include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the computing device 10 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
- the transmission device 106 is configured to receive or transmit data via a network.
- the aforementioned network may include, for example, a wireless network provided by the communication provider of the computing device 10.
- the transmission device 106 includes a network adapter (Network Interface Controller, NIC), and the NIC can be connected to other network devices through a base station so as to communicate with the Internet.
- the transmission device 106 may be a radio frequency (RF) module, and the RF module is configured to communicate with the Internet in a wireless manner.
- RF radio frequency
- FIG. 2 is a flowchart of an image processing method according to an embodiment of the present application. As shown in FIG. 2, the flow includes steps S202 to S206. .
- step S202 the first image with the resolution of the first resolution is segmented according to the severity of the image change to obtain a gradation part and a texture part, wherein the image change of the texture part is more violent than the gradation part.
- step S204 the gradient part is converted into first pixel information with a resolution of the second resolution; and, according to the second image format description information of the texture part, the texture part is converted into the resolution of the second resolution.
- the second image format description information of the texture part is determined according to the mapping relationship between the first image format and the second image format, wherein the image format of the first image is the first image format. Image format.
- step S206 the first pixel information and the second pixel information are merged to obtain a second image, wherein the resolution of the second image is the second resolution, and the second resolution is greater than the first resolution .
- the image is divided into a texture part and a gradient part, the texture part and the gradient part of the image are respectively processed, and then the processing results are merged. Therefore, the poor super-resolution reconstruction effect in related technologies can be avoided, and the Super-resolution reconstruction effect.
- the first image format can be any image format with a relatively low resolution
- the second image format can be any image format with a relatively high resolution
- the first image format can be It is a bitmap
- the second image format can be a vector illustration.
- the mapping relationship is a first model
- the first model is obtained by training the deep neural network using multiple sets of data, and each set of data in the multiple sets of data includes: a plurality of second image formats in the second image format. Two sample images, and a first sample image of the first image format corresponding to the second sample image.
- the method further includes: processing the second sample image to obtain an intermediate image, wherein the resolution of the intermediate image is the second resolution, and the image format of the intermediate image is the first image format; Perform down-sampling processing on the intermediate image to obtain the first sample image, wherein the resolution of the first sample image is the first resolution, and the image format of the first sample image is the first Image format.
- segmenting the first image whose resolution is the first resolution according to the severity of the image change includes: segmenting the first image according to spatial information of the first image, where the spatial information indicates The sharp degree of the image change; or, the first image is segmented according to the frequency domain information of the first image, where the frequency domain information indicates the sharp degree of the image change.
- segmenting the first image according to the frequency domain information of the first image includes: extracting high-frequency components and low-frequency components of the first image separately according to the frequency domain information of the first image, wherein The high frequency component is used as the texture part, and the low frequency component is used as the gradation part.
- fusing the first pixel information and the second pixel information includes: linearly superimposing the first pixel information and the second pixel information; or fusing the first pixel information and the second pixel information,
- the method includes: fusing the first pixel information and the second pixel information in a transform domain to obtain third pixel information; and performing inverse transformation on the third pixel information, where the inverse transformation is an inverse process of the segmentation.
- linearly superimposing the first pixel information and the second pixel information includes: linearly superimposing the first pixel information and the second pixel information of a designated weight, wherein the designated weight is based on The first ratio is determined by the first ratio as the ratio of the texture part to the first image.
- an image processing device is also provided, and the device is configured to implement the above-mentioned embodiments and preferred implementations, and what has been described will not be repeated.
- the term "module” may be at least one of software and hardware that implements predetermined functions.
- the devices described in the following embodiments are preferably implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
- Fig. 3 is a structural block diagram of an image processing device according to an embodiment of the present application. As shown in Fig. 3, the device includes:
- the segmentation module 31 is configured to segment the first image whose resolution is the first resolution according to the sharpness of the image change to obtain a gradation part and a texture part, where the sharpness of the image change of the texture part is greater than the gradation part;
- the conversion module 33 is configured to convert the first gradient part into first pixel information with a second resolution; according to the second image format description information of the texture part, convert the texture part into the second resolution.
- Resolution second pixel information where the second image format description information of the texture part is determined according to the mapping relationship between the first image format and the second image format, wherein the image format of the first image is the first image format An image format;
- the fusion module 35 is configured to fuse the first pixel information and the second pixel information to obtain a second image, wherein the resolution of the second image is the second resolution, and the second resolution is greater than the first resolution rate.
- the texture part and the gradation part of the image are processed respectively, and then the processing results are merged. Therefore, the poor super-resolution reconstruction effect in related technologies can be avoided, and the Super-resolution reconstruction effect.
- the mapping relationship is a first model
- the first model is obtained by training the deep neural network using multiple sets of data, and each set of data in the multiple sets of data includes: a plurality of second image formats in the second image format. Two sample images, and a first sample image of the first image format corresponding to the second sample image.
- the device further includes: a processing module configured to process the second sample image to obtain an intermediate image, wherein the resolution of the intermediate image is the second resolution, and the image format of the intermediate image is the A first image format; a down-sampling module configured to perform down-sampling processing on the intermediate image to obtain the first sample image, wherein the resolution of the first sample image is the first resolution, and the first sample image
- a processing module configured to process the second sample image to obtain an intermediate image, wherein the resolution of the intermediate image is the second resolution, and the image format of the intermediate image is the A first image format
- a down-sampling module configured to perform down-sampling processing on the intermediate image to obtain the first sample image, wherein the resolution of the first sample image is the first resolution, and the first sample image
- the image format of this picture is the first image format.
- the segmentation module 31 includes: a first segmentation sub-module configured to segment the first image according to spatial information of the first image, where the spatial information indicates the degree of severity of changes in the image; or
- the second division sub-module is configured to divide the first image according to the frequency domain information of the first image, wherein the frequency domain information indicates the severity of the image change.
- the second segmentation submodule includes: a segmentation subunit configured to extract the high-frequency component and the low-frequency component of the first image according to the frequency domain information of the first image, wherein the high-frequency component is used as the In the texture part, the low frequency component is used as the gradual part.
- the fusion module 37 includes: a first fusion sub-module configured to linearly superimpose the first pixel information and the second pixel information.
- the fusion module 37 includes: a second fusion sub-module configured to fuse the first pixel information and the second pixel information in the transform domain to obtain third pixel information; the inverse transform module is set to Perform inverse transformation on the third pixel information, where the inverse transformation is an inverse process of the segmentation.
- the first fusion sub-module includes: an overlay module configured to linearly overlay the first pixel information and the second pixel information of the designated weight, wherein the designated weight is determined according to the first ratio Yes, the first ratio is the ratio of the texture portion to the first image.
- each of the above modules can be implemented by at least one of software and hardware.
- it can be implemented in the following ways, but not limited to this: the above modules are all located in the same processor; or, the above Multiple modules are located in different processors in any combination.
- the negative effects introduced in the super-resolution enlargement method based on bitmap processing reduce the effect of image enlargement and affect the user's perception of the image.
- the traditional vector algorithm includes finding a suitable approximate contour curve and detecting corners. If the detected corners are too much, the smoothness of the image will be reduced. If the detected corners are too few, the sharpness of the image will be reduced, resulting in vector graphics. The algorithm parameters are difficult to determine.
- the neural network-based method in the related technology has a fixed magnification, and the expansion of the magnification usually requires retraining the model, which is time-consuming and increases the complexity of model deployment.
- Deep learning is a type of machine learning algorithm that simulates the cognitive processing of the human brain in the current computer vision field.
- Models based on deep learning can have huge data abstraction capabilities.
- Non-linear simulation is introduced through the activation layer to enhance the processing capabilities of the model.
- the current super-resolution method based on deep learning is generally an end-to-end solution.
- this method is aimed at a fixed magnification method on the one hand, and usually requires retraining the network to obtain the corresponding magnification.
- the model parameters are not conducive to model deployment. On the other hand, the lack of clear functional positioning between modules results in poor model interpretability, which is not conducive to debugging.
- the embodiment of the present application can simulate the process of converting an image from a bitmap to a vector diagram through a neural network, and output an image with higher definition, which has broad application prospects.
- the embodiment of the application can use the model abstraction ability of deep learning to divide the image into a gradient area and a texture area in terms of the degree of violent changes. Then use the traditional interpolation method to process the gradient area, and use the vector graphics algorithm to process the texture area. Finally, the results of the two are integrated to obtain the final output, which effectively avoids the above situation.
- bitmap is also called a bitmap or raster image, which is a description method of dividing a real image into an ordered bitmap. Each point in the bitmap represents the position (or local area). ) Visual information.
- the arrangement of these dots characterizes the color and texture of the image, and by increasing the dot matrix density, color changes and subtle transitions of colors can be achieved, resulting in a realistic display effect. But it loses the structural information of the image, which is very important in image super-resolution processing. Therefore, bitmap-based image super-resolution usually has jagged or blurred images.
- the vector diagram describes the outline of the image through analytical geometry, such as Bezier curves. These vectors can be a single point or a line segment. Since these vector units have a clear mathematical description and are decoupled from pixel density, no distortion will be introduced in the super-resolution processing, and there will be no aliasing. It has obvious advantages in areas where vector graphics are used, such as logo design and text design. However, the disadvantage of current vector graphics is that it is difficult to 100% simulate all the information of natural images, especially realistic images with rich color levels.
- the deep learning-based image vectorized super-resolution reconstruction method described in the embodiment of the present application includes the following steps:
- FIG 4 is a schematic diagram of the construction process of the network training set according to an optional embodiment of the application.
- High resolution bitmap ).
- Vector graphics have nothing to do with resolution.
- High-resolution bitmaps can retain more detailed information, and then downsample high-resolution bitmaps to low-resolution bitmaps.
- downsampling methods such as bicubic interpolation (Bicubic) down-sampling or Gaussian (Gaussian) fuzzy down-sampling, etc.
- Bicubic bicubic interpolation
- Gaussian Gaussian fuzzy down-sampling
- Fig. 5 is a schematic flow chart of a method for training a network according to an optional embodiment of the present application. As shown in Fig. 5, it includes: input bitmap data; backpropagation, when the convergence condition is reached, output the network model. When the convergence condition is reached, the back propagation is continued.
- the network structure can adopt U-Net, which is suitable for extracting data features and has been widely used in tasks such as super-resolution and object recognition.
- the separation and merging of scalar data can be carried out by a variety of separation methods, including edge extraction-based methods or frequency-domain segmentation methods, as shown in the edge segmentation and image fusion module in Figure 6, which is an optional embodiment according to the present application.
- Schematic diagram of the image processing flow as shown in Figure 6, the image processing flow includes:
- NN Neural Network
- texture description Text description
- texture amplification On the texture part to obtain the processed result of the texture part
- interpolation on the low-frequency part such as bicubic interpolation (Bicubic), Lanzos interpolation (Lanzcos) and other methods to interpolate to obtain the processing result of the low frequency part
- Bicubic bicubic interpolation
- Lanzcos Lanzos interpolation
- the two processing results are image fused, and super resolution (SR) bitmap data is output.
- SR super resolution
- a neural network-based method is used to obtain the vector description of the texture part of the input bitmap, and the result of the texture part is obtained by the method of the vector diagram.
- an amplification method based on isotropy can be used, such as Bicubic, Lanzcos, etc. for interpolation.
- the embodiments of this application can suppress the aliasing and blur effects caused by the homosexual interpolation method; reduce the defect that the vector diagram does not handle the gradient area well; realize the stepless amplification method based on the neural network, and because of the conversion of the bitmap to the vector diagram,
- the magnification process basically does not appear to be sawtooth and blur effects.
- the first module mainly includes the architecture design of the neural network and the implementation of the training end.
- the focus of this module is to construct a training set. According to the processing method shown in Figure 4, it can be used to construct a variety of vector graphics and low-resolution bitmap pairs.
- U-net can be used to implement this image format conversion, but it should be pointed out that the network structure is not unique.
- the second module is set to realize super-resolution processing of the processing object.
- the super-resolution processing of the processing object includes the separation and merging of low-resolution bitmaps and the use of different processing methods for different components.
- the jaggies caused by the homosexual method can be avoided by vector magnification, and the gradual change can be processed by the homosexual method.
- two methods can be used to achieve segmentation and merging, for example, edge extraction in the spatial domain (for example, a gradient-based method), or a filtering method based on the frequency domain (for example, using wavelet transform or micro-genetic algorithm (Micro-Genetic Algorithm)).
- MGA micro-genetic algorithm
- a corresponding synthesis method is used to combine the two.
- the first part is the construction of the deep neural network training set.
- ⁇ represents the mapping process of vector graphics to bitmaps at high resolution.
- f() downsampling is used.
- the downsampling method here can be Bicubic downsampling or Gaussian fuzzy Etc., or using combined down-sampling.
- a many-to-one network structure can be used here, that is, a set of vector graphics can correspond to multiple sets of low-resolution bitmaps.
- the function of neural network K is to realize the process of mapping from low-resolution bitmap to vector graphics, as shown in the following formula (2):
- the training process can refer to general network training methods, such as Stochastic Gradient Descent (SGD), Adaptive Momentum (ADAM), etc.
- SGD Stochastic Gradient Descent
- ADAM Adaptive Momentum
- the second part is deployment.
- the deployment process is performed according to the segmentation module 31, the conversion module 33 and the fusion module 35 in FIG. 3 during the deployment process.
- Step one first segment the input low-resolution bitmap data.
- two methods can be used for segmentation, including the spatial method and the frequency domain method.
- the spatial method can adopt a gradient-based edge extraction strategy to extract the edge part uniformly, such as The following formula (3):
- the wavelet domain or MGA method can be used to extract the high frequency and low frequency components of the image, as shown in the following formula (4):
- the Meyer-based wavelet transform is used to realize the separation of low-frequency information and high-frequency information.
- the Meyer-based wavelet transform is described as:
- WT(a, ⁇ ) represents the output result of the wavelet transform based on Meyer
- ⁇ (t) represents the wavelet basis function
- a represents the scale factor
- ⁇ represents the translation factor
- f(t) represents the input signal.
- Step two after separation, (or ) Enter the network trained in the first step to obtain the vector description corresponding to the texture part. Then use vector magnification to calculate the pixel information at the new resolution (that is, get the result of the texture part reconstruction ).
- the other part yes (or ) Use isotropic methods to perform resolution scaling processing, such as Bicubic interpolation or Lanczos interpolation, to obtain the result of partial reconstruction of the content Then merge the results of the two.
- Step three the fusion process adopts different methods according to the different division methods.
- one is a linear superposition method, as shown in the following formula (6):
- ⁇ represents the weight of the texture part.
- Two methods can be used to select the weight. One is the linear superposition of the hard threshold, and the reasonable ⁇ value is determined by performing multiple offline experiments. The other is to dynamically set according to the number of vector components in the image. When there are many vector components (that is, the vector description corresponding to the texture part in step 2), the value of ⁇ can be increased. For example, here can be According to the significance of the texture, it can be set or adaptively determined by region.
- ⁇ represents the transform domain processing method, fusion (ie merging) the components in the transform domain, and then inversely transform the merged result ⁇ -1 , for example, for the image frequency achieved by wavelet transform in step 1.
- fusion ie merging
- the H -1 wavelet inverse transform can be used here to obtain the fusion result.
- the SR bitmap data output at this time not only has the tiny expression ability of the bitmap to color changes, but also has the approximate distortion-free expression of the texture part by vector graphics magnification.
- the embodiment of the present application also provides a computer-readable storage medium.
- the computer-readable storage medium stores a computer program, wherein the computer program is configured to execute any of the foregoing method embodiments when running. step.
- the aforementioned computer-readable storage medium may be configured to store a computer program for executing steps S1 to S3.
- step S1 the first image with the resolution of the first resolution is segmented according to the sharpness of the image change to obtain a gradient part and a texture part, wherein the sharpness of the image change of the texture part is greater than the gradient part.
- Step S2 converting the gradient part into first pixel information with a second resolution; and converting the texture part into information with a resolution of the second resolution according to the second image format description information of the texture part Second pixel information, wherein the second image format description information of the texture part is determined according to the mapping relationship between the first image format and the second image format, wherein the image format of the first image is the first image format .
- Step S3 fusing the first pixel information and the second pixel information to obtain a second image, wherein the resolution of the second image is the second resolution, and the second resolution is greater than the first resolution.
- the image is divided into a texture part and a gradient part, the texture part and the gradient part of the image are respectively processed, and then the processing results are merged. Therefore, the poor super-resolution reconstruction effect in related technologies can be avoided, and the Super-resolution reconstruction effect.
- the foregoing storage medium may include, but is not limited to: U disk, ROM, RAM, mobile hard disk, magnetic disk, or optical disk, and other media that can store computer programs.
- the embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
- the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
- the above-mentioned processor may be configured to execute the steps S1 to S3 through a computer program.
- step S1 the first image with the resolution of the first resolution is segmented according to the sharpness of the image change to obtain a gradient part and a texture part, wherein the sharpness of the image change of the texture part is greater than the gradient part.
- Step S2 converting the gradient part into first pixel information with a second resolution; and converting the texture part into information with a resolution of the second resolution according to the second image format description information of the texture part Second pixel information, wherein the second image format description information of the texture part is determined according to the mapping relationship between the first image format and the second image format, wherein the image format of the first image is the first image format .
- Step S3 fusing the first pixel information and the second pixel information to obtain a second image, wherein the resolution of the second image is the second resolution, and the second resolution is greater than the first resolution.
- the image is divided into a texture part and a gradient part, the texture part and the gradient part of the image are respectively processed, and then the processing results are merged. Therefore, the poor super-resolution reconstruction effect in related technologies can be avoided, and the Super-resolution reconstruction effect.
- modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
- they can be implemented with program codes executable by the computing device, so that they can be stored in the storage device for execution by the computing device, and in some cases, can be executed in a different order than here.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
一种图像的处理方法及装置,方法包括:按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,将渐变部分转换为分辨率为第二分辨率的第一像素信息,将纹理部分转换为分辨率为第二分辨率的第二像素信息,融合第一像素信息和第二像素信息,得到第二图像。
Description
本申请要求在2019年12月13日提交中国专利局、申请号为201911289271.2的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本申请涉及通信领域,例如一种图像的处理方法及装置。
超分辨率重建是指将低分辨率图像转换为高分辨率图像的处理过程。目前常用的超分辨率重建方法是基于空间位置或边缘的插值方法,由于插值方法缺少局部信息,以及插值参考的方向特征通常源于统计结果,通过每个像素所在区域的统计信息,例如梯度等,实现特定的像素填充处理,导致该方法在放大时会导致清晰度的下降或者出现“锯齿”的消极影响,无法得到清晰的高分辨率图像。
发明内容
本申请实施例提供了一种图像的处理方法及装置,以至少避免相关技术中超分辨率重建效果较差的情况。
第一方面,本申请提供了一种图像的处理方法,包括:
按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,所述纹理部分的图像变化剧烈程度大于所述渐变部分;
将所述渐变部分转换为分辨率为第二分辨率的第一像素信息;以及,根据所述纹理部分的第二图像格式描述信息将所述纹理部分转换为分辨率为所述第二分辨率的第二像素信息,其中,所述纹理部分的所述第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,所述第一图 像的图像格式为第一图像格式;
融合所述第一像素信息和所述第二像素信息,得到第二图像,其中,所述第二图像的分辨率为所述第二分辨率,所述第二分辨率大于所述第一分辨率。
第二方面,本申请提供了一种图像的处理装置,包括:
分割模块,设置为按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,所述纹理部分的图像变化剧烈程度大于所述渐变部分;
转换模块,设置为将所述第一渐变部分转换为分辨率为第二分辨率的第一像素信息;根据所述纹理部分的第二图像格式描述信息将所述纹理部分转换为分辨率为所述第二分辨率的第二像素信息,其中,所述纹理部分的所述第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,所述第一图像的图像格式为第一图像格式;
融合模块,设置为融合所述第一像素信息和所述第二像素信息,得到第二图像,其中,所述第二图像的分辨率为所述第二分辨率,所述第二分辨率大于所述第一分辨率。
第三方面,本申请还提供了一种计算机可读的存储介质,所述计算机可读的存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行第一方面所述的图像的处理方法。
第四方面,本申请还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行第一方面所述的图像的处理方法。
图1是本申请实施例的一种图像的处理方法的运算装置的硬件结构框图;
图2是根据本申请实施例的图像的处理方法的流程图;
图3是根据本申请实施例的图像的处理装置的结构框图;
图4是根据本申请可选实施例的网络训练集的构建过程示意图;
图5是根据本申请可选实施例的训练网络的方法的流程示意图。
图6是根据本申请可选实施例的图像处理流程示意图。
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
实施例1
本申请实施例所提供的方法实施例可以在运算装置、计算机终端或者类似的装置中执行。以运行在运算装置上为例,图1是本申请实施例的一种图像的处理方法的运算装置的硬件结构框图。如图1所示,运算装置10可以包括至少一个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器(Micro Control Unit,MCU)或现场可编程逻辑器件(Field Programmable Gate Array,FPGA)等的处理装置)和设置为存储数据的存储器104,可选地,上述运算装置还可以包括设置为通信的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述运算装置的结构造成限定。例如,运算装置10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的图像的处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如至少一个磁性存储装置、闪存、或者其他非易失性固态存储器。在一 些实例中,存储器104可包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至运算装置10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106设置为经由一个网络接收或者发送数据。上述的网络例如可包括运算装置10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),NIC可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,RF模块设置为通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于上述运算装置的图像的处理方法,图2是根据本申请实施例的图像的处理方法的流程图,如图2所示,该流程包括步骤S202至S206。
在步骤S202中,按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,该纹理部分的图像变化剧烈程度大于该渐变部分。
在步骤S204中,将该渐变部分转换为分辨率为第二分辨率的第一像素信息;以及,根据该纹理部分的第二图像格式描述信息将该纹理部分转换为分辨率为该第二分辨率的第二像素信息,其中,该纹理部分的该第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,该第一图像的图像格式为第一图像格式。
在步骤S206中,融合该第一像素信息和该第二像素信息,得到第二图像,其中,该第二图像的分辨率为该第二分辨率,该第二分辨率大于该第一分辨率。
通过上述步骤,由于将图像分割为纹理部分和渐变部分,分别对图像的纹理部分和渐变部分进行处理,再将处理结果融合,因此,可以避免相关技术中超分辨率重建效果较差的情况,提高超分辨率重建效果。
需要说明的是,可选地,第一图像格式可以是分辨率较低的任何一种图像格式,第二图像格式可以是分辨率相对较高的任何一种图像格式,例如第一图像格式可以是位图,第二图像格式可以是矢量图。
可选地,该映射关系为第一模型,该第一模型为使用多组数据对深度神经网络进行训练得到的,该多组数据中的每组数据均包括:多个第二图像格式的第二样本图,以及,该第二样本图所对应的第一图像格式的第一样本图。
可选地,该方法还包括:处理该第二样本图,得到中间图,其中,该中间图的分辨率为该第二分辨率,并且,该中间图的图像格式为该第一图像格式;将该中间图进行降采样处理,得到该第一样本图,其中,该第一样本图的分辨率为该第一分辨率,并且,该第一样本图的图像格式为该第一图像格式。
可选地,按照图像变化剧烈程度对分辨率为第一分辨率的该第一图像进行分割,包括:按照该第一图像的空域信息对该第一图像进行分割,其中,该空域信息指示了该图像变化剧烈程度;或者,按照该第一图像的频域信息对该第一图像进行分割,其中,该频域信息指示了该图像变化剧烈程度。
可选地,按照该第一图像的频域信息对该第一图像进行分割,包括:按照该第一图像的频域信息分别提取该第一图像的高频成分和低频成分,其中,将该高频成分作为该纹理部分,将该低频成分作为该渐变部分。
可选地,融合该第一像素信息和该第二像素信息,包括:将该第一像素信息和该第二像素信息进行线性叠加;或者,融合该第一像素信息和该第二像素信息,包括:将该第一像素信息和该第二像素信息在变换域进行融合,得到第三像素信息;将该第三像素信息进行逆变换,其中,该逆变换为该分割的逆过程。
可选地,将该第一像素信息和该第二像素信息进行线性叠加,包括:将该第一像素信息和指定权值的该第二像素信息进行线性叠加,其中,该指定权值是根据第一比例所确定的,该第一比例为该纹理部分占该第一图像的比例。
在本实施例中还提供了一种图像的处理装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以为实现预定功能的软件和硬件中的至少之一。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本申请实施例的图像的处理装置的结构框图,如图3所示,该装置包括:
分割模块31,设置为按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,该纹理部分的图像变化剧烈程度大于该渐变部分;
转换模块33,设置为将该第一渐变部分转换为分辨率为第二分辨率的第一像素信息;根据该纹理部分的第二图像格式描述信息将该纹理部分转换为分辨率为该第二分辨率的第二像素信息,其中,该纹理部分的该第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,该第一图像的图像格式为第一图像格式;
融合模块35,设置为融合该第一像素信息和该第二像素信息,得到第二图像,其中,该第二图像的分辨率为该第二分辨率,该第二分辨率大于该第一分辨率。
通过上述模块,由于将图像分割为纹理部分和渐变部分,分别对图像的纹理部分和渐变部分进行处理,再将处理结果融合,因此,可以避免相关技术中超分辨率重建效果较差的情况,提高超分辨率重建效果。
可选地,该映射关系为第一模型,该第一模型为使用多组数据对深度神经网络进行训练得到的,该多组数据中的每组数据均包括:多个第二图像格式的第二样本图,以及,该第二样本图所对应的第一图像格式的第一样本图。
可选地,该装置还包括:处理模块,设置为处理该第二样本图,得到中间 图,其中,该中间图的分辨率为该第二分辨率,并且,该中间图的图像格式为该第一图像格式;降采样模块,设置为将该中间图进行降采样处理,得到该第一样本图,其中,该第一样本图的分辨率为该第一分辨率,并且,该第一样本图的图像格式为该第一图像格式。
可选地,分割模块31,包括:第一分割子模块,设置为按照该第一图像的空域信息对该第一图像进行分割,其中,该空域信息指示了该图像变化剧烈程度;或者,第二分割子模块,设置为按照该第一图像的频域信息对该第一图像进行分割,其中,该频域信息指示了该图像变化剧烈程度。
可选地,第二分割子模块,包括:分割子单元,设置为按照该第一图像的频域信息分别提取该第一图像的高频成分和低频成分,其中,将该高频成分作为该纹理部分,将该低频成分作为该渐变部分。
可选地,融合模块37,包括:第一融合子模块,设置为将该第一像素信息和该第二像素信息进行线性叠加。
或者,可选地,融合模块37,包括:第二融合子模块,设置为将该第一像素信息和该第二像素信息在变换域进行融合,得到第三像素信息;逆变换模块,设置为将该第三像素信息进行逆变换,其中,该逆变换为该分割的逆过程。
可选地,第一融合子模块,包括:叠加模块,设置为将该第一像素信息和指定权值的该第二像素信息进行线性叠加,其中,该指定权值是根据第一比例所确定的,该第一比例为该纹理部分占该第一图像的比例。
需要说明的是,上述每个模块是可以通过软件和硬件中的至少之一来实现的,对于硬件,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述多个模块以任意组合的形式分别位于不同的处理器中。
可选实施方式
相关技术中,基于位图处理的超分辨率放大方法中引入的负面效果,例如锯齿和模糊等,这些情况降低了图像放大的效果,影响使用者对于图像的感受。 另外,利用相关技术中的方法强行表示可能出现条带现象,或者极大的增加表示数据的复杂性,导致矢量图出现难以表现色彩层次丰富的逼真图像效果的情况。传统的矢量算法包括寻找合适的近似轮廓曲线和检测转角,在检测转角过多的情况下,会降低图像的光滑性,在检测转角过少的情况下,会降低图像的锐利程度,导致矢量图形算法参数难以确定。最后,相关技术中的的基于神经网络的方法存在放大倍率固定的情况,拓展倍率通常需要对模型进行重训练,耗时且增加了模型部署的复杂度。
深度学习是当前计算机视觉领域中通过模拟人脑认知处理问题的一类机器学习算法。基于深度学习的模型可以具有庞大的数据抽象能力,通过激活层引入非线性模拟,增强了模型的处理能力。当前基于深度学习的超分辨率方法普遍为端到端的方案,虽然降低了算法的复杂度,但是这种方法一方面都是针对固定倍率的方法,通常需要对网络进行重训练才可以获取对应倍率的模型参数,不利于模型部署。另一方面,由于缺少模块间的明确功能定位,导致模型可解释性差,不利于调试。
本申请实施例可以通过神经网络模拟图像由位图转化为矢量图的过程,输出清晰度更高的图像,具有广阔的应用前景。
本申请实施例可以借助深度学习的模型抽象能力,将图像从变化剧烈程度上分为渐变区域和纹理区域。然后利用传统插值方法处理渐变区域,利用矢量图形算法处理纹理区域。最后将二者的结果进行整合获取最后的输出,有效地避免上述情况。
需要说明的是,位图也被称为点阵图或者栅格图像,是将真实图像分割为有序点阵的一种描述方式,点阵中的每个点均表示该位置(或者局部区域)的视觉信息。通过这些点的排列表征图像的颜色和纹理,通过增加点阵密度可以实现色彩变化和颜色的细微过度,产生逼真的显示效果。但是其丧失了图像的结构信息,这一信息在图像超分辨率处理中非常重要。所以基于位图的图像超 分辨率通常存在锯齿或者模糊的情况。
还需要说明的是,矢量图是将图像的轮廓通过解析几何进行描述,比如贝塞尔曲线等。这些矢量可以是一个单独的点也可以是一条线段。由于这些矢量单元具有明确的数学描述,和像素密度解耦和,所以在超分辨率处理中不会引入失真,不存在锯齿的情况。在使用矢量图处理的领域,比如标志设计、文字设计等,具有明显的优势。但是目前矢量图的缺陷在于很难100%模拟自然图像的所有信息,尤其是色彩层次丰富的逼真图像。
示例性地,本申请实施例所述的基于深度学习的图像矢量化超分辨率重建方法包括以下步骤:
深度神经网络的设计及训练,该阶段主要利用位图与矢量图形的对应关系设计训练集。网络训练集的构建过程见图4,图4是根据本申请可选实施例的网络训练集的构建过程示意图,如图4所示,首先通过将矢量图转化为高分辨率标量图(即为高分辨率位图)。矢量图与分辨率无关,高分辨率位图可以保留更多的细节信息,然后将高分辨率位图下采样为低分辨率位图,此处可以选择多种下采样方式,比如双三次插值(Bicubic)下采样或者高斯(Gaussian)模糊下采样等。过程见图4。通过反向传播方法训练网络,流程参见图5。图5是根据本申请可选实施例的训练网络的方法的流程示意图,如图5所示,包括:输入位图数据;反向传播,在达成收敛条件的情况下,输出网络模型,在没有达成收敛条件的情况下,继续进行反向传播。网络结构可以采用U-Net,该网络适于提取数据特征,在超分辨率、物体识别等任务中得到了广泛应用。
标量数据的分离与合并,可以借助多种分离手段,包括基于边缘提取的方法或者基于频域分割的方法,见图6中的边缘分割与图像融合模块,图6是根据本申请可选实施例的图像处理流程示意图,如图6所示,图像处理流程包括:
输入位图数据以及目标放大倍率;
进行图像分割,将图像分给为纹理部分和低频部分(相当于上述实施例中 的渐变部分);
然后对纹理部分进行神经网络算法(Neural Network,NN)推理、纹理描述、纹理放大,得到纹理部分被处理后的结果;对低频部分进行插值,例如使用双三次插值(Bicubic)、兰索斯插值(Lanzcos)等方法进行插值,得到低频部分的处理结果;
将该两种处理结果进行图像融合,输出超分辨率(Super Resolution,SR)位图数据。
需要说明的是,对纹理部分和低频部分分别实现超分辨率。可选地,一方面采用基于神经网络的方法获取输入位图纹理部分的矢量描述,通过对矢量图的方法获取纹理部分的结果。另一方面针对低频部分可以采用基于各项同性的放大方法,例如Bicubic、Lanzcos等进行插值。
本申请实施例能够抑制各项同性插值方法导致的锯齿和模糊效应;降低矢量图对渐变区域处理不佳的缺陷;实现基于神经网络的无极放大方法,并且由于借助了位图向矢量图转换,放大过程基本不会出现锯齿和模糊效应。
以下结合具体场景对本申请实施例的方案进行解释说明。
示例性地,添加对处理对象的包含了手动设计的标志(Logo),文稿以及拍摄的自然图像,其中自然图像也包含具有明显边缘的设计建筑或者色彩丰富的自然风光。本实施例可以按照两个模块进行实现,第一个模块主要包含神经网络的架构设计和训练端实现。该模块重点在于构建训练集,根据图4的处理方法,可以是实现对多种矢量图和低分辨率位图对的构建。可选地,可以使用U-net实现这种图像格式的转换,但是需要指出的是,该网络结构并不唯一。第二个模块设置为实现对处理对象超分辨率处理。对处理对象超分辨率处理包括低分辨率位图的分离合并以及对不同成分采用不同的处理方法。本实施例可以通过矢量图放大规避各项同性方法的导致的锯齿,并通过各项同性方法处理渐变部分。可选地,可以通过两种方法实现分割与合并,例如,空域的边缘提取 (例如基于梯度的方法),或者基于频域的滤波方法(例如采用基于小波变换或者微遗传算法(Micro-Genetic Algorithm,MGA)的方法获取低分辨率位图在各尺度下的高频成分)。可选地,采用对应的合成方法将两者组合。
下面结合实现流程图对技术方案的实施作详细描述:
第一部分,深度神经网络训练集搭建。
其中,Γ表示矢量图向位图在高分辨率下的映射过程,获取对应尺度下的位图数据之后,采用f()降采样处理,此处的降采样方法可以采用Bicubic下采样或者Gaussian模糊等,或者采用组合下采样,需要指出的是,此处可以采用多对一的网络结构,即一组矢量图可以对应多组低分辨率位图。神经网络K具备的功能,即实现从低分辨率位图向矢量图形映射的过程,如以下公式(2):
训练过程可以参考通用网络训练方法,例如随机梯度下降(Stochastic Gradient Descent,SGD),自适应动量(Adaptive Momentum,ADAM)等。
第二部分,部署。
根据第一部分训练得到的深度神经网络结果,在部署过程中按照图3中的分割模块31,转换模块33及融合模块35进行。
步骤一,首先对输入低分辨率位图数据进行分割,这里分割可以采用两种方法,包括空域方法和频域方法,空域方法可以采用基于梯度的边缘提取策略,将边缘部分统一进行提取,如以下公式(3):
针对频域的方法,可以采用基于小波域或者MGA方法提取图像的高频和低频成分,如以下公式(4):
其中,WT(a,τ)表示基于Meyer的小波变换的输出结果,Ψ(t)表示小波基函数,此处可以选择基于频域变换的Meyer小波基,a表示尺度因子,τ表示平移因子,f(t)表示输入信号。每层小波变换之后可以得到三个高频分量(分别对应水平、垂直、对角线方向的纹理部分)和一个低频分量(对应图像的内容部分),对应公式(4)则是高频分量的获取对应
低频分量表示为
步骤二,分离之后将
(或者
)输入第一步训练得到的网络,获取纹理部分对应的矢量描述。然后采用矢量放大的方式计算新分辨率下的像素信息(即得到纹理部分重构的结果
)。另一部分,对
(或者
)采用各项同性方法进行分辨率缩放处理,例如Bicubic插值或者Lanczos插值,得到内容部分重构的结果
然后将二者的结果进行融合。
步骤三,融合过程根据分割方式不同而采用不同的方式。
可选地,一种是线性叠加的方式,如以下公式(6):
其中,
表示融合后的图像,
表示内容部分重构的结果,代表
纹理部分重构的结果。α表示对纹理部分的权重。权重取值可以采用两种方法,一种是硬阈值线性叠加,通过离线进行多次实验确定合理的α值。另一种是根据图像中矢量成分的多少进行动态设定,矢量成分(即步骤二中的纹理部分对应的矢量描述)多的情况下,可以增大α的值,示例性的,此处可以根据纹理的显著程度分区域进行设定或者自适应确定。
可选地,另一种方案是采用变换域的方式,如以下公式(7):
其中,
表示融合后的图像,Η表示变换域处理方法,针对变换域的分量进行融合(即合并),然后将合并的结果进行反变换Η
-1,例如,针对步骤一中采用小波变换实现的图像频域分量分割,则此处可以采用H
-1小波逆变换获取融合的结果。此时输出的SR位图数据,既具有位图对色彩变化的细腻表达能力也同时具备矢量图形放大对纹理部分的近似无失真表达。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read-Only Memory,ROM)/随机存取存储器(Random Access Memory,RAM)、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
本申请的实施例还提供了一种计算机可读的存储介质,该计算机可读的存 储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述计算机可读的存储介质可以被设置为存储用于执行步骤S1至S3的计算机程序。
步骤S1,按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,该纹理部分的图像变化剧烈程度大于该渐变部分。
步骤S2,将该渐变部分转换为分辨率为第二分辨率的第一像素信息;以及,根据该纹理部分的第二图像格式描述信息将该纹理部分转换为分辨率为该第二分辨率的第二像素信息,其中,该纹理部分的该第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,该第一图像的图像格式为第一图像格式。
步骤S3,融合该第一像素信息和该第二像素信息,得到第二图像,其中,该第二图像的分辨率为该第二分辨率,该第二分辨率大于该第一分辨率。
通过上述步骤,由于将图像分割为纹理部分和渐变部分,分别对图像的纹理部分和渐变部分进行处理,再将处理结果融合,因此,可以避免相关技术中超分辨率重建效果较差的情况,提高超分辨率重建效果。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、ROM、RAM、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行S1至S3的步骤。
步骤S1,按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,该纹理部分的图像变化剧烈程度大于该渐变部分。
步骤S2,将该渐变部分转换为分辨率为第二分辨率的第一像素信息;以及,根据该纹理部分的第二图像格式描述信息将该纹理部分转换为分辨率为该第二分辨率的第二像素信息,其中,该纹理部分的该第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,该第一图像的图像格式为第一图像格式。
步骤S3,融合该第一像素信息和该第二像素信息,得到第二图像,其中,该第二图像的分辨率为该第二分辨率,该第二分辨率大于该第一分辨率。
通过上述步骤,由于将图像分割为纹理部分和渐变部分,分别对图像的纹理部分和渐变部分进行处理,再将处理结果融合,因此,可以避免相关技术中超分辨率重建效果较差的情况,提高超分辨率重建效果。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电 路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
Claims (10)
- 一种图像的处理方法,包括:按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,所述纹理部分的图像变化剧烈程度大于所述渐变部分;将所述渐变部分转换为分辨率为第二分辨率的第一像素信息;以及,根据所述纹理部分的第二图像格式描述信息将所述纹理部分转换为分辨率为所述第二分辨率的第二像素信息,其中,所述纹理部分的所述第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定的,其中,所述第一图像的图像格式为第一图像格式;融合所述第一像素信息和所述第二像素信息,得到第二图像,其中,所述第二图像的分辨率为所述第二分辨率,所述第二分辨率大于所述第一分辨率。
- 根据权利要求1所述的方法,其中,所述映射关系为第一模型,所述第一模型为使用多组数据对深度神经网络进行训练得到的,所述多组数据中的每组数据均包括:多个第二图像格式的第二样本图,以及,所述第二样本图所对应的第一图像格式的第一样本图。
- 根据权利要求2所述的方法,还包括:处理所述第二样本图,得到中间图,其中,所述中间图的分辨率为所述第二分辨率,并且,所述中间图的图像格式为所述第一图像格式;将所述中间图进行降采样处理,得到所述第一样本图,其中,所述第一样本图的分辨率为所述第一分辨率,并且,所述第一样本图的图像格式为所述第一图像格式。
- 根据权利要求1所述的方法,其中,按照图像变化剧烈程度对分辨率为第一分辨率的所述第一图像进行分割,包括:按照所述第一图像的空域信息对所述第一图像进行分割,其中,所述空域信息指示了所述图像变化剧烈程度;或者,按照所述第一图像的频域信息对所述第一图像进行分割,其中,所述频域 信息指示了所述图像变化剧烈程度。
- 根据权利要求4所述的方法,其中,按照所述第一图像的频域信息对所述第一图像进行分割,包括:按照所述第一图像的频域信息分别提取所述第一图像的高频成分和低频成分,其中,将所述高频成分作为所述纹理部分,将所述低频成分作为所述渐变部分。
- 根据权利要求1所述的方法,其中,融合所述第一像素信息和所述第二像素信息,包括:将所述第一像素信息和所述第二像素信息进行线性叠加;或者,融合所述第一像素信息和所述第二像素信息,包括:将所述第一像素信息和所述第二像素信息在变换域进行融合,得到第三像素信息;将所述第三像素信息进行逆变换,其中,所述逆变换为所述分割的逆过程。
- 根据权利要求6所述的方法,其中,将所述第一像素信息和所述第二像素信息进行线性叠加,包括:将所述第一像素信息和指定权值的所述第二像素信息进行线性叠加,其中,所述指定权值是根据第一比例所确定的,所述第一比例为所述纹理部分占所述第一图像的比例。
- 一种图像的处理装置,包括:分割模块,设置为按照图像变化剧烈程度对分辨率为第一分辨率的第一图像进行分割,得到渐变部分和纹理部分,其中,所述纹理部分的图像变化剧烈程度大于所述渐变部分;转换模块,设置为将所述第一渐变部分转换为分辨率为第二分辨率的第一像素信息;设置为根据所述纹理部分的第二图像格式描述信息将所述纹理部分转换为分辨率为所述第二分辨率的第二像素信息,其中,所述纹理部分的所述第二图像格式描述信息是根据第一图像格式与第二图像格式的映射关系所确定 的,其中,所述第一图像的图像格式为第一图像格式;融合模块,设置为融合所述第一像素信息和所述第二像素信息,得到第二图像,其中,所述第二图像的分辨率为所述第二分辨率,所述第二分辨率大于所述第一分辨率。
- 一种计算机可读的存储介质,所述计算机可读的存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时,执行所述权利要求1至7任一项中所述的方法。
- 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序,以执行所述权利要求1至7任一项中所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP20899209.9A EP4075373A4 (en) | 2019-12-13 | 2020-12-11 | Image processing method and apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911289271.2 | 2019-12-13 | ||
| CN201911289271.2A CN112991165B (zh) | 2019-12-13 | 2019-12-13 | 一种图像的处理方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021115403A1 true WO2021115403A1 (zh) | 2021-06-17 |
Family
ID=76329599
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/135536 Ceased WO2021115403A1 (zh) | 2019-12-13 | 2020-12-11 | 一种图像的处理方法及装置 |
Country Status (3)
| Country | Link |
|---|---|
| EP (1) | EP4075373A4 (zh) |
| CN (1) | CN112991165B (zh) |
| WO (1) | WO2021115403A1 (zh) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114092772A (zh) * | 2021-09-30 | 2022-02-25 | 北京旷视科技有限公司 | 神经网络的优化方法、装置、电子设备及存储介质 |
| CN114581886A (zh) * | 2022-03-07 | 2022-06-03 | 深研人工智能技术(深圳)有限公司 | 结合语义分割和频域分析的能见度判别方法、装置及介质 |
| CN114710673A (zh) * | 2022-04-06 | 2022-07-05 | 北京广播电视台 | 一种针对suvc编解码的图像上采样方法 |
| CN115829842A (zh) * | 2023-01-05 | 2023-03-21 | 武汉图科智能科技有限公司 | 一种基于fpga实现图片超分辨率重建的装置 |
| CN116912132A (zh) * | 2023-09-11 | 2023-10-20 | 归芯科技(深圳)有限公司 | Bayer域3DNR图像去噪方法及其装置 |
| CN117152287A (zh) * | 2023-08-31 | 2023-12-01 | 北京百度网讯科技有限公司 | 图像编辑方法、装置、设备、介质及产品 |
| CN117274064A (zh) * | 2023-11-15 | 2023-12-22 | 中国科学技术大学 | 一种图像超分辨率方法 |
| CN117726525A (zh) * | 2023-12-28 | 2024-03-19 | 四川新视创伟超高清科技有限公司 | 一种分布式全景图像处理方法及处理系统 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118587091B (zh) * | 2024-06-07 | 2025-06-20 | 江南大学 | 一种基于多任务学习的图像联合处理方法及系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102354397A (zh) * | 2011-09-19 | 2012-02-15 | 大连理工大学 | 基于面部特征器官相似性的人脸图像超分辨率重建方法 |
| CN103489173A (zh) * | 2013-09-23 | 2014-01-01 | 百年金海科技有限公司 | 一种视频图像超分辨率重建方法 |
| CN108257108A (zh) * | 2018-02-07 | 2018-07-06 | 浙江师范大学 | 一种超分辨率图像重建方法及系统 |
| JP2018137678A (ja) * | 2017-02-23 | 2018-08-30 | 日本放送協会 | 超解像補完ポストフィルタ装置及びプログラム |
| CN110310229A (zh) * | 2019-06-28 | 2019-10-08 | Oppo广东移动通信有限公司 | 图像处理方法、图像处理装置、终端设备及可读存储介质 |
| CN110415169A (zh) * | 2018-04-28 | 2019-11-05 | 深圳先进技术研究院 | 一种深度图超分辨率重建方法、系统及电子设备 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014505491A (ja) * | 2010-06-30 | 2014-03-06 | メディック ビジョン−イメージング ソリューションズ エルティーディー. | 医療用画像の非線形分解能の低減 |
| CN108133456A (zh) * | 2016-11-30 | 2018-06-08 | 京东方科技集团股份有限公司 | 人脸超分辨率重建方法、重建设备以及计算机系统 |
| US10536164B2 (en) * | 2017-11-17 | 2020-01-14 | Adobe Inc. | Adapting image vectorization operations using machine learning |
| CN108765343B (zh) * | 2018-05-29 | 2021-07-20 | Oppo(重庆)智能科技有限公司 | 图像处理的方法、装置、终端及计算机可读存储介质 |
| CN109767386A (zh) * | 2018-12-22 | 2019-05-17 | 昆明理工大学 | 一种基于深度学习的快速图像超分辨率重建方法 |
-
2019
- 2019-12-13 CN CN201911289271.2A patent/CN112991165B/zh active Active
-
2020
- 2020-12-11 WO PCT/CN2020/135536 patent/WO2021115403A1/zh not_active Ceased
- 2020-12-11 EP EP20899209.9A patent/EP4075373A4/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102354397A (zh) * | 2011-09-19 | 2012-02-15 | 大连理工大学 | 基于面部特征器官相似性的人脸图像超分辨率重建方法 |
| CN103489173A (zh) * | 2013-09-23 | 2014-01-01 | 百年金海科技有限公司 | 一种视频图像超分辨率重建方法 |
| JP2018137678A (ja) * | 2017-02-23 | 2018-08-30 | 日本放送協会 | 超解像補完ポストフィルタ装置及びプログラム |
| CN108257108A (zh) * | 2018-02-07 | 2018-07-06 | 浙江师范大学 | 一种超分辨率图像重建方法及系统 |
| CN110415169A (zh) * | 2018-04-28 | 2019-11-05 | 深圳先进技术研究院 | 一种深度图超分辨率重建方法、系统及电子设备 |
| CN110310229A (zh) * | 2019-06-28 | 2019-10-08 | Oppo广东移动通信有限公司 | 图像处理方法、图像处理装置、终端设备及可读存储介质 |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114092772A (zh) * | 2021-09-30 | 2022-02-25 | 北京旷视科技有限公司 | 神经网络的优化方法、装置、电子设备及存储介质 |
| CN114581886A (zh) * | 2022-03-07 | 2022-06-03 | 深研人工智能技术(深圳)有限公司 | 结合语义分割和频域分析的能见度判别方法、装置及介质 |
| CN114710673A (zh) * | 2022-04-06 | 2022-07-05 | 北京广播电视台 | 一种针对suvc编解码的图像上采样方法 |
| CN115829842A (zh) * | 2023-01-05 | 2023-03-21 | 武汉图科智能科技有限公司 | 一种基于fpga实现图片超分辨率重建的装置 |
| CN115829842B (zh) * | 2023-01-05 | 2023-04-25 | 武汉图科智能科技有限公司 | 一种基于fpga实现图片超分辨率重建的装置 |
| CN117152287A (zh) * | 2023-08-31 | 2023-12-01 | 北京百度网讯科技有限公司 | 图像编辑方法、装置、设备、介质及产品 |
| CN116912132A (zh) * | 2023-09-11 | 2023-10-20 | 归芯科技(深圳)有限公司 | Bayer域3DNR图像去噪方法及其装置 |
| CN116912132B (zh) * | 2023-09-11 | 2023-12-26 | 归芯科技(深圳)有限公司 | Bayer域3DNR图像去噪方法及其装置 |
| CN117274064A (zh) * | 2023-11-15 | 2023-12-22 | 中国科学技术大学 | 一种图像超分辨率方法 |
| CN117274064B (zh) * | 2023-11-15 | 2024-04-02 | 中国科学技术大学 | 一种图像超分辨率方法 |
| CN117726525A (zh) * | 2023-12-28 | 2024-03-19 | 四川新视创伟超高清科技有限公司 | 一种分布式全景图像处理方法及处理系统 |
| CN117726525B (zh) * | 2023-12-28 | 2024-06-11 | 四川新视创伟超高清科技有限公司 | 一种分布式全景图像处理方法及处理系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112991165A (zh) | 2021-06-18 |
| EP4075373A1 (en) | 2022-10-19 |
| CN112991165B (zh) | 2023-07-14 |
| EP4075373A4 (en) | 2023-06-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112991165B (zh) | 一种图像的处理方法及装置 | |
| CN107507134B (zh) | 基于卷积神经网络的超分辨率方法 | |
| JP7542156B2 (ja) | 人物画像修復方法、装置、電子機器、記憶媒体及びプログラム製品 | |
| CN110033410B (zh) | 图像重建模型训练方法、图像超分辨率重建方法及装置 | |
| EP4107692B1 (en) | Super resolution using convolutional neural network | |
| US10825142B2 (en) | Human face resolution re-establishing method and re-establishing system, and readable medium | |
| CN112991171B (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| US8538200B2 (en) | Systems and methods for resolution-invariant image representation | |
| CN110580680B (zh) | 基于组合学习的人脸超分辨率方法及装置 | |
| CN111899176B (zh) | 一种视频图像增强方法 | |
| WO2018223994A1 (zh) | 中文打印字符图像合成方法及装置 | |
| CN106485720A (zh) | 图像处理方法和装置 | |
| CN108205804A (zh) | 图像处理方法、装置及电子设备 | |
| CN112801904A (zh) | 一种基于卷积神经网络的混合退化图像增强方法 | |
| RU2697928C1 (ru) | Способ сверхразрешения изображения, имитирующего повышение детализации на основе оптической системы, выполняемый на мобильном устройстве, обладающем ограниченными ресурсами, и мобильное устройство, его реализующее | |
| CN107464217A (zh) | 一种图像处理方法及装置 | |
| CN103390267A (zh) | 图像处理方法及装置 | |
| KR20210019835A (ko) | 방향 적응형 병렬 신경망을 이용한 초해상도 영상 생성 장치 및 방법 | |
| CN105427253A (zh) | 基于非局部回归和总差分的多视点rgb-d图像超分辨率方法 | |
| CN118230131B (zh) | 一种图像识别及目标检测方法 | |
| CN116895037A (zh) | 基于边缘信息和多尺度交叉融合网络的帧插入方法及系统 | |
| CN109993701B (zh) | 一种基于金字塔结构的深度图超分辨率重建的方法 | |
| Zhao et al. | Single depth image super-resolution with multiple residual dictionary learning and refinement | |
| CN118279184B (zh) | 一种基于ai大模型的图像清晰度提升方法、装置及介质 | |
| Jain et al. | On-device text image super resolution |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20899209 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2020899209 Country of ref document: EP Effective date: 20220713 |
