Image processing method and device

By extracting residual data from the image to be processed at the decoding end, a high-quality target image is generated, which solves the problem of insufficient image clarity under limited bandwidth and achieves higher-quality image transmission and lower transmission bandwidth pressure.

CN111882490BActive Publication Date: 2025-01-21XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010513305.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-08
Publication Date
2025-01-21
Estimated Expiration
2040-06-08

AI Technical Summary

Technical Problem

In the transmission scenario where bandwidth is limited, in order to reduce the encoded code stream, the image type restored by the decoding end has poor clarity and the user experience is reduced.

Method used

The decoding end obtains the residual data from the image to be processed, and obtains a high-quality target image based on the image to be processed and the residual data, which reduces the dependence on the encoding end and reduces the pressure on the transmission bandwidth.

Benefits of technology

It improves the image quality restored by the decoder, improves the user experience, and reduces the amount of transmitted data, making it suitable for scenarios with poor bandwidth conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111882490B_ABST
    Figure CN111882490B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image processing method and device, which relates to the field of image processing and can reduce the amount of transmitted data and improve image quality. The method comprises: obtaining an image to be processed; obtaining corresponding residual data from the image to be processed, and obtaining a target image based on the image to be processed and the residual data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an image processing method and device. Background Art

[0002] In order to reduce the encoding bit rate and adapt to transmission scenarios with limited bandwidth, the encoding end usually compresses the original image to a large extent, resulting in poor quality of the image restored by the decoding end based on the encoding bit rate. Especially for pictures, the restored image has poor clarity, which significantly reduces the user experience.

[0003] Therefore, in the prior art, in order to improve the quality of the image restored by the decoding end, for the image of the picture type, the encoding end needs to first decode according to the encoded bitstream, and use the image restored by decoding and the original image to calculate the residual data of the two; then, the residual data and the encoded bitstream are sent to the decoding end together; the decoding end obtains a new restored image based on the residual data and the encoded bitstream to increase the clarity of the new restored image.

[0004] However, the above method increases the amount of data sent by the encoding end, increases the pressure on the transmission bandwidth, and is not suitable for scenarios with poor transmission bandwidth conditions. Summary of the invention

[0005] The embodiment of the present disclosure provides an image processing method and device, which can reduce the amount of transmitted data and improve image quality. The technical solution is as follows:

[0006] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, the method comprising:

[0007] Get the image to be processed;

[0008] Corresponding residual data is obtained from the image to be processed, and a target image is obtained according to the image to be processed and the residual data.

[0009] The disclosed embodiment provides an image processing method, after decoding the image to be processed by the decoding end, the corresponding residual data is obtained from the image to be processed, so that a high-quality target image can be obtained according to the image to be processed and the residual data. As a result, the decoding end does not need to obtain the loss data caused by image transmission from the encoding end, which can reduce the pressure on the transmission belt. At the same time, the decoding end can obtain a higher quality image and improve the user experience.

[0010] In one embodiment, the acquiring corresponding residual data from the image to be processed, and obtaining a target image according to the image to be processed and the residual data, comprises:

[0011] Repeat the following steps at least once:

[0012] According to the mth image, an m+1th image is obtained; wherein the resolution of the m+1th image is lower than that of the mth image; m is an integer greater than or equal to 1; when m=1, the first image is the image to be processed;

[0013] Compare the m-th image with the m+1-th image to obtain m-th residual data;

[0014] Superimposing the image to be processed and the first residual data to the mth residual data to obtain an mth intermediate image;

[0015] If the mth intermediate image does not meet the first detection condition, the loop continues and m increases by 1 each time the loop occurs; if the mth intermediate image meets the first detection condition, the mth intermediate image is used as the target image; wherein the first detection condition is used to detect the quality of the mth intermediate image.

[0016] In one embodiment, after acquiring the image to be processed, the method further includes:

[0017] Determine whether the image to be processed satisfies a second detection condition; wherein the second detection condition is used to detect the size of pixel differences in the image to be processed.

[0018] In one embodiment, the determining whether the image to be processed satisfies the second detection condition includes:

[0019] For each pixel at a non-boundary position in the image to be processed, obtain the absolute value of the difference between each of the four neighboring pixels of the pixel and the pixel, and obtain the maximum value of the absolute values ​​of the difference as the evaluation value corresponding to the pixel;

[0020] If the evaluation value is greater than a preset first threshold, the pixel is regarded as a high gradient value pixel;

[0021] Obtaining the number of pixels with high gradient values ​​in the image to be processed, and calculating the proportion of the pixels with high gradient values ​​in the image to be processed;

[0022] If the proportion is less than a preset second threshold, the image to be processed meets the second detection condition.

[0023] In one embodiment, after obtaining the mth residual data, the method further includes:

[0024] If the image to be processed meets the second detection condition, sharpening processing is performed on the mth residual data.

[0025] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

[0026] An acquisition module, used to acquire an image to be processed; and also used to acquire corresponding residual data from the image to be processed;

[0027] A processing module is used to obtain a target image according to the image to be processed and the residual data.

[0028] The disclosed embodiment provides an image processing device, which obtains the corresponding residual data from the image to be processed after the acquisition module obtains the image to be processed, so that the processing module can obtain a high-quality target image based on the image to be processed and the residual data. Therefore, there is no need to obtain the loss data caused by image transmission, which can reduce the pressure on the transmission belt, and at the same time, can obtain a higher quality image, improving the user experience.

[0029] In one embodiment, obtaining a target image according to the image to be processed and the residual data includes:

[0030] Repeat the following steps at least once:

[0031] According to the mth image, an m+1th image is obtained; wherein the resolution of the m+1th image is lower than that of the mth image; m is an integer greater than or equal to 1; when m=1, the first image is the image to be processed;

[0032] Compare the m-th image with the m+1-th image to obtain m-th residual data;

[0033] Superimposing the image to be processed and the first residual data to the mth residual data to obtain an mth intermediate image;

[0034] If the mth intermediate image does not meet the first detection condition, the loop continues and m increases by 1 each time the loop occurs; if the mth intermediate image meets the first detection condition, the mth intermediate image is used as the target image; wherein the first detection condition is used to detect the quality of the mth intermediate image.

[0035] In one embodiment, the apparatus further comprises:

[0036] The detection module is used to determine whether the image to be processed meets a second detection condition; wherein the second detection condition is used to detect the size of pixel differences in the image to be processed.

[0037] In one embodiment, the determining whether the image to be processed satisfies the second detection condition includes:

[0038] For each pixel at a non-boundary position in the image to be processed, obtain the absolute value of the difference between each of the four neighboring pixels of the pixel and the pixel, and obtain the maximum value of the absolute values ​​of the difference as the evaluation value corresponding to the pixel;

[0039] If the evaluation value is greater than a preset first threshold, the pixel is regarded as a high gradient value pixel;

[0040] Obtaining the number of pixels with high gradient values ​​in the image to be processed, and calculating the proportion of the pixels with high gradient values ​​in the image to be processed;

[0041] If the proportion is less than a preset second threshold, the image to be processed meets the second detection condition.

[0042] In one embodiment, the processing module is further configured to perform sharpening processing on the mth residual data if the image to be processed meets the second detection condition.

[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] Figure 1 is a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0046] Figure 2 is a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0047] Figure 3 is a schematic diagram of obtaining an mth intermediate image provided by an embodiment of the present disclosure;

[0048] Figure 4 is a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0049] Figure 5 is a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0050] Figure 6 It is a structural diagram of an image processing device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0052] The present disclosure provides an image processing method. Figure 1 As shown, the image processing method comprises the following steps:

[0053] S10: The decoding end obtains the image to be processed.

[0054] The encoding end can encode the original image, and can also send the encoded code stream obtained by encoding the original image to the decoding end. Correspondingly, the decoding end can receive the encoded code stream and decode the encoded code stream to obtain the image to be processed.

[0055] For example, in a video surveillance system, the encoding end may include a camera, and the decoding end may be a computer or a server.

[0056] The original image refers to the image to be transmitted, which is usually a high-quality image. The image to be processed is decoded from the coded bitstream of the original image. The image to be processed corresponds to the original image one by one. Moreover, due to the loss in the encoding and decoding process, the decoded image to be processed cannot be completely restored to the original image. The quality of the image to be processed is lower than that of the original image. Therefore, it is necessary to process the image to be processed, improve the quality of the image to be processed, and restore it to the original image as much as possible, so as to improve the user experience.

[0057] It should be noted that the image to be processed may include an independent image, or may include an image belonging to a certain frame in a dynamic picture or video.

[0058] S20: The decoding end obtains corresponding residual data from the image to be processed, and obtains a target image according to the image to be processed and the residual data.

[0059] The residual data refers to the partially incomplete data extracted from the image to be processed.

[0060] It should be noted that since the quality of the image to be processed decoded by the decoding end is lower than the original image sent by the encoding end, and the data difference between the two cannot be directly obtained, a part of the data can be extracted from the image to be processed as residual data, which is greater than or equal to the data difference between the two. Therefore, the target image can be obtained based on the image to be processed and the residual data, so that the target image is greater than or equal to the quality of the original image.

[0061] The disclosed embodiment provides an image processing method, after decoding the image to be processed by the decoding end, the corresponding residual data is obtained from the image to be processed, so that a high-quality target image can be obtained according to the image to be processed and the residual data. As a result, the decoding end does not need to obtain the loss data caused by image transmission from the encoding end, which can reduce the pressure on the transmission belt. At the same time, the decoding end can obtain a higher quality image and improve the user experience.

[0062] Alternatively, if Figure 2 As shown, the above S20 includes:

[0063] Repeat the following steps at least once:

[0064] S201. The decoding end obtains the (m+1)th image according to the (m)th image.

[0065] The resolution of the m+1th image is lower than that of the mth image; m is an integer greater than or equal to 1; when m=1, the first image is the image to be processed.

[0066] It can be understood that when m=1, the second image is obtained according to the image to be processed; when m=2, the third image is obtained according to the second image, and so on, the resolution of each image is smaller than the adjacent previous image.

[0067] It should be noted that the low-frequency component in the mth image can be extracted by wavelet transform, and the extracted low-frequency component is used as the m+1th image. Of course, other methods can also be used for extraction, and this application does not impose any special restrictions on this.

[0068] The low-frequency component refers to an area with little change in the m-th image, for example, a large color block area.

[0069] S202: The decoding end compares the m-th image with the m+1-th image to obtain the m-th residual data.

[0070] Exemplarily, pixels at the same position in the m-th image and the m+1-th image may be compared one by one in a traversal manner and the difference may be calculated, which is the m-th residual data.

[0071] It can be understood that since the m+1th image is the low-frequency component in the mth image, the mth residual data obtained after comparing the acquired mth image with the m+1th image is the high-frequency component in the mth image, that is, the area in the mth image where the brightness or grayscale changes dramatically, for example, the edge of the image or the contour of the image.

[0072] S203 , the decoding end superimposes the image to be processed and the first residual data to the mth residual data to obtain the mth intermediate image.

[0073] When m=1, the decoding end superimposes the image to be processed and the first residual data to obtain the first intermediate image; when m=2, the decoding end superimposes the image to be processed, the first residual data, and the second residual data to obtain the second intermediate image; and so on. As m increases, multiple corresponding intermediate images can be obtained.

[0074] It should be noted that the decoding end can superimpose the pixel values ​​of the pixels corresponding to the same position in the image to be processed and the first residual data to the mth residual data in a traversal manner, so as to obtain the pixel value belonging to the intermediate image at the corresponding position. Of course, the decoding end can also use other methods for superposition, and this application does not impose any special restrictions on this.

[0075] It can be understood that, since the first residual data to the mth residual data are superimposed, the quality of the mth intermediate image is higher and clearer than the image to be processed. Moreover, each time a residual data is superimposed, the intermediate image obtained is clearer than the previous one.

[0076] For example, Figure 3 As shown in the figure, when m=1, figure A refers to the first intermediate image, figure B refers to the image to be processed, and figure C refers to the first residual data. Since the first intermediate image is obtained by superimposing the image to be processed and the first residual data, the quality of figure A is higher and clearer than that of figure B.

[0077] S204: Determine whether the mth intermediate image satisfies a first detection condition, wherein the first detection condition is used to detect the quality of the mth intermediate image.

[0078] Exemplarily, the decoding end may preset the first detection condition to determine whether the proportion of the number of pixels in the mth intermediate image whose pixel values ​​are greater than a preset value reaches a preset proportion in the total number of pixels. Of course, the decoding end may also use other methods to make the judgment, that is, the first detection condition may also be other methods, and the present application does not impose any special restrictions on this.

[0079] S205 . If the mth intermediate image does not satisfy the first detection condition, continue to loop through S201 to S204 , and m increases by 1 each time through the loop until the obtained intermediate image satisfies the first detection condition.

[0080] S206: If the m-th intermediate image meets the first detection condition, use the m-th intermediate image as the target image.

[0081] Exemplarily, assume that the first detection bar is: determine whether the number of pixels in the mth intermediate image whose pixel values ​​are greater than the preset value 100 accounts for 50% of the total number of pixels. If the number of pixels in the third intermediate image whose pixel values ​​are greater than the preset value 100 accounts for 30% of the total number of pixels, it means that the third intermediate image does not meet the first detection condition. Continue to cycle the above S201 to S204 once to obtain the fourth intermediate image, and then determine whether the fourth intermediate image meets the first detection condition. If the number of pixels in the fourth intermediate image whose pixel values ​​are greater than the preset value 100 accounts for 55% of the total number of pixels, it means that the fourth intermediate image meets the first detection condition, indicating that the quality of the fourth intermediate image has met expectations and is clearer than the image to be processed. Therefore, the fourth intermediate image is used as the target image.

[0082] Optionally, after S10 and before S20, as Figure 4 As shown, the method also includes:

[0083] S11. The decoding end determines whether the image to be processed meets the second detection condition.

[0084] The second detection condition is used to detect the size of pixel differences in the image to be processed.

[0085] It is understandable that the differences between pixels in the image to be processed may be larger or smaller, and there is no uniform pattern. The embodiment of the present application can distinguish the image to be processed according to the preset second detection condition, and divide it into the image to be processed that meets the second detection condition and the image to be processed that does not meet the second detection condition.

[0086] Alternatively, if Figure 5 As shown, the above S11 includes:

[0087] S111. For each pixel at a non-boundary position in the image to be processed, the decoding end obtains the absolute value of the difference between each of the four neighboring pixels of the pixel and the pixel, and obtains the maximum value of the absolute values ​​of the difference as the evaluation value corresponding to the pixel.

[0088] It should be noted that a pixel at a boundary refers to a pixel that does not satisfy the condition of eight neighboring pixels, that is, a pixel whose number of neighboring pixels is less than eight. A pixel at a non-boundary refers to a pixel that satisfies the condition of eight neighboring pixels, that is, a pixel whose number of neighboring pixels is eight.

[0089] Exemplarily, if the image to be processed is in a rectangular shape, the first row of pixels, the last row of pixels, the first column of pixels, and the last column of pixels of the image to be processed are pixels at the boundary, and the remaining pixels are pixels at non-boundary locations.

[0090] The four neighboring pixels refer to pixels located above, below, left and right of a pixel and adjacent to the pixel. The difference refers to the difference between the pixel value of each of the four neighboring pixels of the pixel and the pixel value of the pixel.

[0091] For example, pixel a (10,10) Located at row 10 and column 10, the pixel a (10,10) The four neighboring pixels are the four pixels a in the 9th row and 10th column, the 10th row and 9th column, the 10th row and 11th column, and the 11th row and 10th column. (9,10) 、a (10,9) 、a (10,11) 、a (11,10) ; Then, calculate pixel a respectively (9,10) 、a (10,9) 、a (10,11) 、a (11,10) With pixel a (10,10) The pixel values ​​of a are b1, b2, b3, and b4. Then the absolute value of each difference is |b1|, |b2|, |b3|, and |b4|, and they are compared. The maximum value of the absolute values ​​of the four differences is |b3|, and |b3| is used as the value of pixel a. (10,10) The corresponding evaluation value.

[0092] It can be understood that the larger the absolute value of the difference, the greater the color difference between the pixel and one of the four neighboring pixels around it, and the maximum value of the absolute value of the difference is used as the evaluation value, indicating that the pixel corresponding to the evaluation value is the pixel with the largest color difference with the middle pixel among the four neighboring pixels.

[0093] In addition, the decoding end may obtain the evaluation value corresponding to each pixel at the non-boundary position in the image to be processed in a traversal manner, or in other ways, and the present application has no special restrictions on this.

[0094] S112: If the evaluation value is greater than a preset first threshold, the pixel is regarded as a high gradient value pixel.

[0095] The size of the first threshold can be set and changed as needed, and the present invention has no special limitation on this.

[0096] Exemplarily, if the first threshold is 4, it means that for any pixel outside the boundary, as long as its corresponding evaluation value is greater than 4, the pixel is regarded as a high gradient value pixel, indicating that the color difference between the pixel and the surrounding pixels is large.

[0097] S113: The decoding end obtains the number of high gradient value pixels in the image to be processed, and calculates the proportion of the number of high gradient value pixels in the image to be processed.

[0098] It can be understood that the smaller the proportion of high gradient value pixels in the entire image to be processed, the smaller the color difference of all pixels in the image to be processed; the larger the proportion of high gradient value pixels in the entire image to be processed, the greater the color difference of all pixels in the image to be processed.

[0099] S114: If the proportion is less than a preset second threshold, the image to be processed meets the second detection condition.

[0100] The size of the second threshold can be set and changed as needed, and the present invention has no special limitation on this.

[0101] Exemplarily, if the second threshold is 50%, the counted number of pixels with high gradient values ​​in the image to be processed accounts for 40% of the image to be processed, which is less than the second threshold, indicating that the color difference of all pixels in the image to be processed is not very large, and the second detection condition is met.

[0102] Optionally, after the above S202, the method further includes:

[0103] If the image to be processed meets the second detection condition, the mth residual data is sharpened.

[0104] The sharpening process refers to enhancing the contrast of the image, and the mth residual data subjected to the sharpening process can show clearer edges or contours.

[0105] Based on the image processing method described in the above embodiments, the following is an embodiment of the device disclosed herein, which can be used to execute the embodiment of the method disclosed herein.

[0106] The present disclosure provides an image processing device, such as Figure 6 As shown, including:

[0107] The acquisition module 601 is used to acquire the image to be processed; and is also used to acquire the corresponding residual data from the image to be processed;

[0108] The processing module 602 is used to obtain a target image according to the image to be processed and the residual data.

[0109] The disclosed embodiment provides an image processing device, which obtains the corresponding residual data from the image to be processed after the acquisition module obtains the image to be processed, so that the processing module can obtain a high-quality target image based on the image to be processed and the residual data. Therefore, there is no need to obtain the loss data caused by image transmission, which can reduce the pressure on the transmission belt, and at the same time, can obtain a higher quality image, improving the user experience.

[0110] Optionally, obtaining a target image according to the image to be processed and the residual data includes:

[0111] Repeat the following steps at least once:

[0112] According to the mth image, the m+1th image is obtained; wherein the resolution of the m+1th image is lower than that of the mth image; m is an integer greater than or equal to 1; when m=1, the first image is the image to be processed;

[0113] Compare the mth image with the m+1th image to obtain the mth residual data;

[0114] The image to be processed and the first residual data to the mth residual data are superimposed to obtain the mth intermediate image;

[0115] If the mth intermediate image does not meet the first detection condition, the loop continues and m increases by 1 each time the loop is repeated; if the mth intermediate image meets the first detection condition, the mth intermediate image is used as the target image; wherein the first detection condition is used to detect the quality of the mth intermediate image.

[0116] Optionally, the device further comprises:

[0117] The detection module 603 is used to determine whether the image to be processed meets the second detection condition; wherein the second detection condition is used to detect the size of the pixel difference in the image to be processed.

[0118] Optionally, determining whether the image to be processed satisfies a second detection condition includes:

[0119] For each pixel at a non-boundary position in the image to be processed, the absolute value of the difference between each of the four neighboring pixels of the pixel and the pixel is obtained, and the maximum value of the absolute values ​​of the difference is obtained as the evaluation value corresponding to the pixel;

[0120] If the evaluation value is greater than a preset first threshold, the pixel is regarded as a high gradient value pixel;

[0121] Obtain the number of pixels with high gradient values ​​in the image to be processed, and calculate the proportion of the number in the image to be processed;

[0122] If the proportion is less than a preset second threshold, the image to be processed meets the second detection condition.

[0123] Optionally, the processing module 602 is further configured to perform sharpening processing on the mth residual data if the image to be processed meets the second detection condition.

[0124] Based on the image processing method described in the above embodiment, the embodiment of the present disclosure further provides a computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 1 The image processing method described in the corresponding embodiment will not be repeated here.

[0125] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0126] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image processing method, characterized in that: Applied to a decoding end, the method comprises: Get the image to be processed; Acquire corresponding residual data from the image to be processed, and obtain a target image according to the image to be processed and the residual data; The step of acquiring corresponding residual data from the image to be processed, and obtaining a target image according to the image to be processed and the residual data, comprises: Repeat the following steps at least once: According to the mth image, an m+1th image is obtained; wherein the resolution of the m+1th image is lower than that of the mth image; m is an integer greater than or equal to 1; when m=1, the first image is the image to be processed; Compare the m-th image with the m+1-th image to obtain m-th residual data; Superimposing the image to be processed and the first residual data to the mth residual data to obtain an mth intermediate image; If the m-th intermediate image does not meet the first detection condition, the loop continues and m increases by 1 each time the loop is repeated; if the m-th intermediate image meets the first detection condition, the m-th intermediate image is used as the target image; wherein the first detection condition is to determine whether the proportion of the number of pixels in the m-th intermediate image whose pixel values ​​are greater than a preset value in the total number of pixels reaches a preset proportion, which is used to detect the quality of the m-th intermediate image; The step of obtaining the (m+1)th image according to the (m)th image comprises: The low-frequency component in the m-th image is extracted by wavelet transform, and the extracted low-frequency component is used as the m+1-th image; wherein the low-frequency component refers to the area with little change in the m-th image.

2. The method according to claim 1, characterized in that After acquiring the image to be processed, the method further includes: Determine whether the image to be processed satisfies a second detection condition; wherein the second detection condition is used to detect the size of pixel differences in the image to be processed.

3. The method according to claim 2, characterized in that The determining whether the image to be processed satisfies a second detection condition includes: For each pixel at a non-boundary position in the image to be processed, obtain the absolute value of the difference between each of the four neighboring pixels of the pixel and the pixel, and obtain the maximum value of the absolute values ​​of the difference as the evaluation value corresponding to the pixel; If the evaluation value is greater than a preset first threshold, the pixel is regarded as a high gradient value pixel; Obtaining the number of pixels with high gradient values ​​in the image to be processed, and calculating the proportion of the pixels with high gradient values ​​in the image to be processed; If the proportion is less than a preset second threshold, the image to be processed meets the second detection condition.

4. The method according to claim 2 or 3, characterized in that: After obtaining the mth residual data, the method further includes: If the image to be processed meets the second detection condition, sharpening processing is performed on the mth residual data.

5. An image processing device, characterized in that: include: An acquisition module, used for acquiring an image to be processed; Also used to obtain corresponding residual data from the image to be processed; A processing module, used for obtaining a target image according to the image to be processed and the residual data; The step of obtaining a target image according to the image to be processed and the residual data comprises: Repeat the following steps at least once: According to the mth image, an m+1th image is obtained; wherein the resolution of the m+1th image is lower than that of the mth image; m is an integer greater than or equal to 1; when m=1, the first image is the image to be processed; Compare the m-th image with the m+1-th image to obtain m-th residual data; Superimposing the image to be processed and the first residual data to the mth residual data to obtain an mth intermediate image; If the m-th intermediate image does not meet the first detection condition, the loop continues and m increases by 1 each time the loop is repeated; if the m-th intermediate image meets the first detection condition, the m-th intermediate image is used as the target image; wherein the first detection condition is to determine whether the proportion of the number of pixels in the m-th intermediate image whose pixel values ​​are greater than a preset value in the total number of pixels reaches a preset proportion, which is used to detect the quality of the m-th intermediate image; The step of obtaining the (m+1)th image according to the (m)th image comprises: The low-frequency component in the m-th image is extracted by wavelet transform, and the extracted low-frequency component is used as the m+1-th image; wherein the low-frequency component refers to the area with little change in the m-th image.

6. The device according to claim 5, characterized in that Also includes: The detection module is used to determine whether the image to be processed meets a second detection condition; wherein the second detection condition is used to detect the size of pixel differences in the image to be processed.

7. The device according to claim 6, characterized in that The determining whether the image to be processed satisfies a second detection condition includes: For each pixel at a non-boundary position in the image to be processed, obtain the absolute value of the difference between each of the four neighboring pixels of the pixel and the pixel, and obtain the maximum value of the absolute values ​​of the difference as the evaluation value corresponding to the pixel; If the evaluation value is greater than a preset first threshold, the pixel is regarded as a high gradient value pixel; Obtaining the number of pixels with high gradient values ​​in the image to be processed, and calculating the proportion of the pixels with high gradient values ​​in the image to be processed; If the proportion is less than a preset second threshold, the image to be processed meets the second detection condition.

8. The device according to claim 6 or 7, characterized in that The processing module is further configured to perform sharpening processing on the mth residual data if the image to be processed meets the second detection condition.

Citation Information

Patent Citations

  • Encoding method and device as well as decoding method and device

    CN109547784A