CN113628120B - Simple denoising coding method - Google Patents

Simple denoising coding method Download PDF

Info

Publication number
CN113628120B
CN113628120B CN202010372111.0A CN202010372111A CN113628120B CN 113628120 B CN113628120 B CN 113628120B CN 202010372111 A CN202010372111 A CN 202010372111A CN 113628120 B CN113628120 B CN 113628120B
Authority
CN
China
Prior art keywords
gray
probability
filtered
block
filtering
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.)
Active
Application number
CN202010372111.0A
Other languages
Chinese (zh)
Other versions
CN113628120A (en
Inventor
张立兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ingenic Semiconductor Co Ltd
Original Assignee
Beijing Ingenic Semiconductor Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Ingenic Semiconductor Co Ltd filed Critical Beijing Ingenic Semiconductor Co Ltd
Priority to CN202010372111.0A priority Critical patent/CN113628120B/en
Publication of CN113628120A publication Critical patent/CN113628120A/en
Application granted granted Critical
Publication of CN113628120B publication Critical patent/CN113628120B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a simple denoising coding method, which comprises the following steps: s1, gray scale scaling: scaling the image under noise interference from 256 levels of gray scale to 64 levels; s2, selecting a block to be filtered: judging the blocks meeting the set conditions as blocks to be filtered; s3, denoising and filtering: s3.1, setting the pixel point spacing as 1, calculating a gray level co-occurrence matrix of the block to be filtered, analyzing the distribution condition of the small probability gray level, and dividing the block to be filtered into a small probability coarse texture block and a discrete block; s3.2, traversing each small-probability gray scale point to be filtered by taking 3x3 as a filtering window, wherein when the number of the large-probability gray scale points around the filtering point is larger, the filtering weight is larger, and the filtered value is closer to the large-probability gray scale; s3.3, denoising, wherein the denoising method comprises the following steps: 1) When the filter block contains coarser texture, the filter strength decreases; 2) When the filter block is a noise discrete block, the filter strength increases.

Description

Simple denoising coding method
Technical Field
The invention relates to the technical field of images, in particular to a simple denoising encoding method.
Background
And image filtering, namely suppressing noise of the target image under the condition of retaining the detail characteristics of the image as much as possible. Most filtering algorithms are smooth filtering, i.e. low frequency enhanced spatial filtering techniques. The smoothing filtering algorithm generally adopts a window containing weighting coefficients as a filter, and the window is moved to each pixel point of the image, and the filtered pixel value is obtained through a weighting calculation method.
However, the defects in the prior art are that: the smooth filtering algorithm has the problems of large calculated amount, more change of image pixel values, blurred image detail edges and the like, and is not suitable for real-time encoding and subjective viewing of images.
Furthermore, the common terminology in the prior art is as follows:
gray level co-occurrence matrix: a common method for describing textures by researching gray space correlation characteristics is that the textures are formed by repeatedly appearing gray distribution at space positions, so that a certain gray relation exists between two pixels which are separated by a certain distance in an image space. If the image is made up of blocks of pixels with similar gray values, the diagonal elements of the gray co-occurrence matrix will have relatively large values; if the gray values of the pixels of the image vary locally, then the elements that deviate from the diagonal will have a relatively large value.
Disclosure of Invention
In order to solve the above problems, an object of the present invention is to: the invention has small calculated amount, and is more beneficial to image compression on the premise of not blurring image details and retaining brightness layering sense of a flat area. Only the stronger noise of the flat area can be better identified through analysis, so the method is mainly used for filtering the stronger noise of the flat area, reduces the information quantity of prediction residual errors, is more beneficial to the concentration of residual error energy and the reduction of high-frequency components in the transformation process, and further reduces the consumption of code streams on noise.
Specifically, the invention provides a simple denoising coding method, which analyzes and denoising filters an original image before coding by taking 16x16 blocks as a unit, and comprises the following steps:
s1, gray scale scaling: scaling the image gray level under noise interference from 256 gray levels to 64 gray levels; s2, selecting a block to be filtered: the blocks satisfying the following two conditions are blocks to be filtered:
1) The number of the scaled gray values is 2, and the difference between the two gray values is 1;
2) The number of gray values is larger than a set threshold value, and the gray values are called as large probability gray b; meanwhile, the number of the other gray values is smaller than a set threshold value, which is called as a small probability gray scale s;
s3, denoising and filtering:
s3.1, when the pixel point distance is set to be 1, calculating a gray level co-occurrence matrix of the block to be filtered, judging the distribution condition of small probability gray level, dividing the block to be filtered into a small probability coarse texture block and a discrete block, and reducing the filtering strength of the small probability gray level block of the coarse texture; increasing the filtering intensity for the discrete small probability gray scale blocks;
s3.2, traversing each small-probability gray scale point to be filtered by taking 3x3 as a filtering window, wherein when the number of the large-probability gray scale points around the filtering point is larger, the filtering weight is larger, and the filtered value is closer to the large-probability gray scale;
s3.3, denoising, wherein the denoising method comprises the following steps:
1) When the filter block contains coarser texture, the filter strength is reduced
Figure BDA0002478531180000021
Figure BDA0002478531180000022
Figure BDA0002478531180000031
2) When the filter block is a noise discrete block, the filter strength increases
Figure BDA0002478531180000032
Figure BDA0002478531180000033
Wherein the pixel old And pixel ne w is the pixel value before and after filtering, cnt max Pixels are the number of the large probability gray points in the window min And pixel avg Is the minimum pixel value and average value in the large probability gray scale in the window.
The image gray scale in S1 is scaled to 64 levels, before scaling:
161 160 162 161
162 161 163 122
160 161 164 128
158 159 133 130
scaling is as follows:
40 40 40 40
40 40 40 30
40 40 40 32
39 39 33 32
represented as a matrix.
The threshold in S2 is set to 220.
The small probability points in the block to be filtered in the S2 are uneven factors, which are unfavorable for the concentration of the energy after the prediction transformation, and the large probability gray scale is required to be close by a filtering algorithm.
The distribution of the small probability gray scales is judged in the step S3.1, wherein the smaller the number of adjacent small probability gray scales is, the larger the sum of diagonal lines is, and the more discrete the small probability points are; whereas the coarser the texture of the low probability points.
The gray level co-occurrence matrix in the S3.1 is
Figure BDA0002478531180000041
The step S3 further includes reducing blurring or eliminating the coarser texture, and setting a threshold gray_thr=220.
Thus, the present application has the advantages that: after the image denoised by the method is subjected to predictive transformation, residual energy is more easily concentrated to low-frequency components, and the coefficient value of high-frequency residues is reduced or quantized to 0 in the quantization process, so that the consumption of noise in a code stream is reduced. The smaller the quantization parameter, the more the code stream is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate and together with the description serve to explain the invention.
FIG. 1 is a schematic flow chart of the method of the present invention.
Detailed Description
In order that the technical content and advantages of the present invention may be more clearly understood, a further detailed description of the present invention will now be made with reference to the accompanying drawings.
As shown in fig. 1, the present invention relates to a simple denoising encoding method, which is suitable for dividing an original image by 16x16 blocks based on a block prediction encoding standard, identifying flat blocks affected by noise, and filtering different types of flat blocks by using corresponding filtering operators. The method has small calculated amount, can pertinently reduce noise, improves the coding compression rate, and has little influence on ornamental quality. The method comprises the following steps:
s1, gray scale scaling: scaling the image gray level under noise interference from 256 gray levels to 64 gray levels; s2, selecting a block to be filtered: the blocks satisfying the following two conditions are blocks to be filtered:
1) The number of the scaled gray values is 2, and the difference between the two gray values is 1;
2) The number of gray values is larger than a set threshold value, and the gray values are called as large probability gray b; meanwhile, the number of the other gray values is smaller than a set threshold value, which is called as a small probability gray scale s;
s3, denoising and filtering:
s3.1, when the pixel point distance is set to be 1, calculating a gray level co-occurrence matrix of the block to be filtered, judging the distribution condition of the small probability gray level, and reducing the filtering strength of the small probability gray level block of the coarse texture; increasing the filtering intensity for the discrete small probability gray scale blocks;
s3.2, traversing each small-probability gray scale point to be filtered by taking 3x3 as a filtering window, wherein when the number of the large-probability gray scale points around the filtering point is larger, the filtering weight is larger, and the filtered value is closer to the large-probability gray scale;
s3.3, denoising, wherein the denoising method comprises the following steps:
1) When the filter block contains coarser texture, the filter strength is reduced
Figure BDA0002478531180000051
2) When the filter block is a noise discrete block, the filter strength increases
Figure BDA0002478531180000052
Wherein the pixel old And pixel new Respectively the pixel values before and after filtering, cnt max Pixels are the number of the large probability gray points in the window min And pixel avg Is the minimum pixel value and average value in the large probability gray scale in the window.
Specifically, both the H264 and H265 encoding protocols are predictive transform-based encoding, so the more concentrated the encoded residual energy, the fewer high frequency coefficients, and the higher the compression rate of the image. The noise in the image edge area is not easy to identify, the detail can be blurred by forced denoising, and the weak noise in the flat area is mixed in the real layering sense of brightness, so that the stronger noise in the flat area is easier to identify and remove.
The original image before encoding is analyzed and noise-removed and filtered in units of 16x16 blocks.
1. Gray scale scaling
The subjective flat areas in 256-level images under noise interference are not absolutely flat, and we can scale the image gray level to 64 levels for better recognition of flat areas. The scaling effect is shown in the matrix below.
Figure BDA0002478531180000061
2. Selecting a block to be filtered
The blocks satisfying the following two conditions are blocks to be filtered:
1) The number of the scaled gray values is 2, and the difference between the two gray values is 1
2) One number of gray values is greater than the set threshold while the other number of gray values is less than the set threshold. Respectively referred to as a large probability gray scale b and a small probability gray scale s. The proposal threshold is set to 220.
The general small probability gray scale is in the following distribution:
40 40 40 40 40 39 39 39 40 40 40 40 40 40 40 40
40 40 40 40 40 39 39 39 40 40 40 40 40 40 40 40
40 40 40 40 40 39 39 39 39 40 40 40 40 40 40 40
40 40 40 40 40 40 40 39 39 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 39 39 39 40 40 40 40 40
40 40 40 40 40 40 40 40 40 39 39 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 39 39 40 40 40 40
40 40 40 40 40 40 40 40 40 40 39 39 39 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 39 40 40 40
40 40 40 40 40 40 40 9 40 40 40 40 40 39 40 40
40 40 40 40 40 40 40 9 40 40 40 40 40 40 39 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 39
40 40 39 39 40 40 40 40 40 40 40 40 40 40 40 40
40 40 39 39 40 40 40 40 40 40 40 9 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
the small probability points in the block to be filtered are uneven factors, which are not beneficial to predicting the concentration of energy after transformation, and the compression rate is improved on the premise of not influencing the image content by approaching the large probability gray scale through a filtering algorithm. Meanwhile, the true brightness layering sense of the original pixel value corresponding to the large-probability gray level is protected.
3. Denoising filter
When the pixel point distance is set to be 1, calculating a gray level co-occurrence matrix of the block to be filtered, judging the distribution condition of the small probability gray level, wherein the smaller the number of adjacent small probability gray levels is, the larger the sum of diagonal lines is, and the more discrete the small probability points are; whereas the coarser the texture of the low probability points. Reducing the filtering strength for the small probability gray scale blocks of coarser textures; the filter strength is increased for discrete small probability gray blocks. Reducing blurring or elimination of coarser textures. Let the threshold gray_thr=220.
Figure BDA0002478531180000081
Gray scale co-occurrence matrix
And traversing each small-probability gray scale point to be filtered by taking 3x3 as a filtering window, wherein when the number of the large-probability gray scale points around the filtering point is larger, the filtering weight is larger, and the filtered value is closer to the large-probability gray scale. The specific denoising processing method comprises the following steps:
1) When the filter block contains coarser texture, the filter strength is reduced
Figure BDA0002478531180000082
Figure BDA0002478531180000083
2) When the filter block is a noise discrete block, the filter strength increases
Figure BDA0002478531180000084
/>
Figure BDA0002478531180000085
Figure BDA0002478531180000091
Wherein the pixel old And pixel new Respectively the pixel values before and after filtering, cnt max Pixels are the number of the large probability gray points in the window min And pixel avg Is the minimum pixel value and average value in the large probability gray scale in the window.
After the image denoised by the method is subjected to predictive transformation, residual energy is more easily concentrated to low-frequency components, and the coefficient value of high-frequency residues is reduced or quantized to 0 in the quantization process, so that the consumption of noise in a code stream is reduced. The smaller the quantization parameter, the more the code stream is reduced.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A simple denoising encoding method, characterized in that an original image before encoding is analyzed and denoised and filtered in units of 16x16 blocks, comprising the steps of:
s1, gray scale scaling: the gray level of the image under noise interference is changed from 256 gray levels to 64 gray levels;
s2, selecting a block to be filtered: the blocks satisfying the following two conditions are blocks to be filtered:
1) The number of the scaled gray values is 2, and the difference between the two gray values is 1;
2) The number of gray values is larger than a set threshold value, and the gray values are called as large probability gray b; meanwhile, the number of the other gray values is smaller than a set threshold value, which is called as a small probability gray scale s;
s3, denoising and filtering:
s3.1, when the pixel point distance is set to be 1, calculating a gray level co-occurrence matrix of the block to be filtered, judging the distribution condition of the small probability gray level, and reducing the filtering strength of the small probability gray level block of the coarse texture; increasing the filtering intensity for the discrete small probability gray scale blocks;
s3.2, traversing each small-probability gray scale point to be filtered by taking 3x3 as a filtering window, wherein when the number of the large-probability gray scale points around the filtering point is larger, the filtering weight is larger, and the filtered value is closer to the large-probability gray scale;
s3.3, denoising, wherein the denoising method comprises the following steps:
1) When the filter block contains coarser texture, the filter strength is reduced
Figure FDA0004191048490000011
Figure FDA0004191048490000012
2) When the filter block is a noise discrete block, the filter strength increases
Figure FDA0004191048490000021
Figure FDA0004191048490000022
Wherein the pixel old And pixel new Respectively the pixel values before and after filtering, cnt max Pixels are the number of the large probability gray points in the window min And pixel avg Is the minimum pixel value and average value in the large probability gray scale in the window.
2. The simple denoising encoding method as claimed in claim 1, wherein the scaling of the image gray level to 64 levels in S1 is performed before scaling:
161 160 162 161 162 161 163 122 160 161 164 128 158 159 133 130
scaling is as follows:
40 40 40 40 40 40 40 30 40 40 40 32 39 39 33 32
represented as a matrix.
3. The simple denoising encoding method according to claim 1, wherein the threshold in S2 is set to 220.
4. The simple denoising encoding method according to claim 1, wherein the small probability points in the block to be filtered in S2 are uneven factors, which are unfavorable for the concentration of the energy after the prediction transformation, and require the approach to the large probability gray scale by the filtering algorithm.
5. The simple denoising encoding method according to claim 1, wherein the determining the distribution of the small-probability gray scales in S3.1 is that the smaller the number of adjacent small-probability gray scales is, the larger the sum of diagonal lines is, and the more discrete the small-probability points are; whereas the coarser the texture of the low probability points.
6. The method for simple denoising encoding according to claim 1, wherein the gray level co-occurrence matrix in S3.1 is
Figure FDA0004191048490000031
/>
CN202010372111.0A 2020-05-06 2020-05-06 Simple denoising coding method Active CN113628120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010372111.0A CN113628120B (en) 2020-05-06 2020-05-06 Simple denoising coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010372111.0A CN113628120B (en) 2020-05-06 2020-05-06 Simple denoising coding method

Publications (2)

Publication Number Publication Date
CN113628120A CN113628120A (en) 2021-11-09
CN113628120B true CN113628120B (en) 2023-05-26

Family

ID=78376562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010372111.0A Active CN113628120B (en) 2020-05-06 2020-05-06 Simple denoising coding method

Country Status (1)

Country Link
CN (1) CN113628120B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103493487A (en) * 2011-04-28 2014-01-01 皇家飞利浦有限公司 Apparatuses and methods for HDR image encoding and decoding
CN105243649A (en) * 2015-11-09 2016-01-13 天津大学 Image denoising method based on secondary noise point detection
CN110503614A (en) * 2019-08-20 2019-11-26 东北大学 A kind of Magnetic Resonance Image Denoising based on sparse dictionary study
CN110533047A (en) * 2019-08-30 2019-12-03 西南大学 A kind of denoising and binarization method for ancient books picture

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4847890B2 (en) * 2007-02-16 2011-12-28 パナソニック株式会社 Encoding method converter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103493487A (en) * 2011-04-28 2014-01-01 皇家飞利浦有限公司 Apparatuses and methods for HDR image encoding and decoding
CN105243649A (en) * 2015-11-09 2016-01-13 天津大学 Image denoising method based on secondary noise point detection
CN110503614A (en) * 2019-08-20 2019-11-26 东北大学 A kind of Magnetic Resonance Image Denoising based on sparse dictionary study
CN110533047A (en) * 2019-08-30 2019-12-03 西南大学 A kind of denoising and binarization method for ancient books picture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种改进的JPEG图像压缩编码算法;杨雨薇;张亚萍;李幸刚;;云南师范大学学报(自然科学版)(第06期);全文 *

Also Published As

Publication number Publication date
CN113628120A (en) 2021-11-09

Similar Documents

Publication Publication Date Title
US8615042B2 (en) Pre-processing method and system for data reduction of video sequences and bit rate reduction of compressed video sequences using spatial filtering
US8208565B2 (en) Pre-processing method and system for data reduction of video sequences and bit rate reduction of compressed video sequences using temporal filtering
CN111988611B (en) Quantization offset information determining method, image encoding device and electronic equipment
US20030035586A1 (en) Decoding compressed image data
US20080279279A1 (en) Content adaptive motion compensated temporal filter for video pre-processing
CN101267560A (en) Block-removal filtering method and device
CN101321276B (en) Method and apparatus for removing block effect
WO2017004889A1 (en) Jnd factor-based super-pixel gaussian filter pre-processing method
Wang et al. Adaptive reduction of blocking artifacts in DCT domain for highly compressed images
CN113850744A (en) Image enhancement algorithm based on self-adaptive Retinex and wavelet fusion
CN113628120B (en) Simple denoising coding method
KR100669905B1 (en) Blocking artifacts reduction apparatus and method using the characteristics of block boundary area
CN113628118B (en) Method for denoising and filtering in flat area
Liu et al. Objective image quality measure for block-based DCT coding
CN115797234A (en) Method for enhancing low-contrast two-dimensional code image recognition effect
JP2005318614A (en) Method for reducing artifact in input image
KR101172057B1 (en) Device and method for analysing images
Do et al. A new adaptive image post-treatment for deblocking and deringing based on total variation method
CN110647843B (en) Face image processing method
US20110097010A1 (en) Method and system for reducing noise in images in video coding
Nikitin et al. Adaptive bilateral filter for JPEG 2000 deringing
CN113628119B (en) Method for identifying block to be denoised in image denoising process
CN113630608B (en) Method for denoising and filtering in frequency domain
Khryashchev et al. A novel smart bilateral filter for ringing artifacts removal in JPEG2000 images
Do et al. A new perceptually adaptive method for deblocking and deringing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant