Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
1st November 2015, 16:07 | #1 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
denoising casual chat
so I was thinking like, is it possible to get even better quality than BM3D (Block Matching) or NLMeans (Pixel Matching) maybe just do a combo of both like, NLMeans filters in time domain, and sure it treats high frequencies well cuz they are kinda sparse in time domain, and it's super destructive to low frequencies and BM3D, does good stuff to low frequencies and kills high frequencies on the contrary, as it block matches in time domain BUT, filters in frequency domain, low frequencies are sparse in frequency domain so they are filtered right and well, and high frequencies are not that lucky... so maybe, maybe combine the high frequencies from NLMeans and low frequencies from BM3D and it would be, even better demo: source image NLMeans Code:
import vapoursynth as vs core = vs.get_core() clp = whatever.. clp = core.knlm.KNLMeansCL(clp, 0, 32, 4, h=2.4) clp.set_output () low frequencies are screwed, see places boxed out with red rectangles BM3D Code:
import vapoursynth as vs core = vs.get_core() clp = whatever ref = core.bm3d.Basic(clp, sigma=8, block_size=8, block_step=1, group_size=32, bm_range=24, bm_step=1) clp = core.bm3d.Final(clp, ref, sigma=8, block_size=8, block_step=1, group_size=32, bm_range=24, bm_step=1) clp.set_output () high frequencies are fucked, also boxed out with red rectangles NLMeans BM3D Combo Code:
import vapoursynth as vs core = vs.get_core() clp = whatever def gauss (src, p=30): core = vs.get_core () upsmp = core.fmtc.resample (src, src.width * 2, src.height * 2, kernel="gauss", a1=100, fulls=True, fulld=True) clip = core.fmtc.resample (upsmp, src.width, src.height, kernel="gauss", a1=p, fulls=True, fulld=True) return clip nlm = core.knlm.KNLMeansCL(clp, 0, 32, 4, h=2.4) ref = core.bm3d.Basic(clp, sigma=8, block_size=8, block_step=1, group_size=32, bm_range=24, bm_step=1) bm3 = core.bm3d.Final(clp, ref, sigma=8, block_size=8, block_step=1, group_size=32, bm_range=24, bm_step=1) clp = core.std.MergeDiff (gauss (bm3, 16), core.std.MakeDiff(nlm,gauss (nlm,16))) clp.set_output () now you are practically enjoying advantages from both sides, (and suffering from computing complexity from both sides too..) |
1st November 2015, 23:19 | #3 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
I was just using that to show the difference |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|