wiki:denoise

Version 4 (modified by Hunter Hogan, 2 years ago) ( diff )

Formating, see trac.ffmpeg.org/wiki/WikiFormatting

Denoise

Denoise is removing the signal insignificant or unsensible [1] in intended view. Which shall improve compressibility due to reduced entropy (effective amount of information); and subjectively improve quality.

[ [1] "insignificant" is that cannot be seen. "unsensible" is that does not make sense. ]

Typical denoise is value clamp based: Transform the data into frequency domain (via Fourier Transform alike), or Wavelet: [ ​https://scikit-image.org/docs/stable/auto_examples/filters/plot_denoise_wavelet.html ] And allow passing only certain range.

FFT (Fast Fourier Transform) is fast implementation of DFT (Discrete Fourier Transform): which asserts 2^n input length (to speed-up). [ ^ ​https://www.ni.com/docs/en-US/bundle/diadem/page/genmaths/genmaths/calc_fouriertransform.htm#d20e91 ]

DCT (Discrete Cosine Transform) is cut-down variant of DFT that uses only cosine transform; thus of reduced complexity but also minimum resolution: DFT: 2 * π / N DCT: 2 * π / (2 * N) ; somewhat comparable to "full_chroma_int": (not complexity-wise) ​https://github.com/MasterInQuestion/attach/commit/e18e5cd26b9d27bacefa685ba70d0d41bc7d7cbc#diff-75a0130f1814ba26c23e3a6fc6ce5046620163061d392086bc55e2c13c145bf9L264

Discrete Cosine Transform, Fourier Transform:

Fourier vs. Wavelet Transform:

This article currently mainly covers video denoise. Info on audio denoise shall be added later.

Video

FFmpeg supports 8 dedicated [1] video denoise filters:

[1] Not counting ͏"pp" (much defunct "libpostproc"), general manipulation ͏"fftfilt" alike.

. More info:

"bm3d" and "nlmeans" would be of most interest: for best quality.

More details:

"bm3d"

BM3D pre-filters via Block-Matching for similar blocks: Then applies tuned traditional denoise for each. . Thereby workaround the overdone of applying typical denoise vastly.

Using denoised input for Block-Matching may somewhat aid similarity branching. But using complex algorithm (BM3D, NLM alike) for this phase mostly helps not, besides pointless computation. ]

"nlmeans"

[ Quote <Non-local means denoising for preserving textures>:

​https://scikit-image.org/docs/stable/auto_examples/filters/plot_nonlocal_means.html

Non-Local Means replaces pixels' value by an average of selected pixels': Small patches centered around pixels are compared to the one of interest: with the average performed only when the patches share enough similarity. As result, the algorithm may restore well textures that would be otherwise blurred. ]

[ Quote <Comparison of CNN based and self-similarity based denoising methods> # Introduction:

​https://stanford.edu/class/ee367/Winter2020/report/zhou_m_report.pdf

NLM averages pixels with a similar neighborhood. Like other traditional methods, NLM can produce a high denoising quality. But has the drawback of low computational efficiency; and requires manual choice of some parameters: Such as the patch size, search window size, and cut-off distance. ]

<^> This is primarily for major NLM implementations seem to be false NLM:

Not really "Non-Local" thus involve the patch size, search window etc. non-essential. [ Quote <Non-Local Means Denoising> # Introduction:

​https://www.ipol.im/pub/art/2011/bcm_nlm/article.pdf

Since the search for similar pixels will be made in a larger neighborhood, but still locally, the name "non-local" is somewhat misleading. ] ]

"favg"

Hypothetical new filter derived from NLM: The NLM related papers didn't well explain why the patch similarity procedure was even necessary. Wouldn't just mere averaging all pixels within specific value threshold: repeat for each unprocessed pixel group; adequately work? (Full-Image Averaging) [ #11019 ] ]

Caveat the factual validity of some linked.

Audio

FFmpeg supports ? dedicated audio denoise filters: ...

See also

​https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/[av]f_${Name}.[ch] E.g. ​https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_nlmeans.c

Note: See TracWiki for help on using the wiki.