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. |
![]() |
#1 | Link |
Registered User
Join Date: Sep 2013
Posts: 6
|
Chroma Noise Filter
First post - please be kind
![]() I have the colour bands problem which is illustrated in section 12.4 (top picture) of the capture guide in doom9.net see http://www.doom9.org/capture/chroma_artefacts.html . At the end of this section it states that “at the time of writing this page there are no filters who can correct this”. Since the page was last edited in 2004, can anyone tell me if there is now a filter which can clear this problem? |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,395
|
Are you sure you don't have simple interlacing? That image looks a lot like normal interlacing but it isn't.
There still isn't anything that can fix that error, as far as I know. However, interlacing is a very well researched problem and there are lots of ways to fix it. I like QTGMC for deinterlacing. Last edited by Asmodian; 9th October 2013 at 00:35. |
![]() |
![]() |
![]() |
#6 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
I dunno, looks like skew (tape tension) error maybe. Here's an experimental script that might help.
![]() Code:
## requires MaskTools2 LoadPlugin(pathBase + "MaskTools2\mt_masktools-26.dll") ## <<YV12 source>> ChromaDestripe() #return Last ## optional color correction ConvertToRGB() return MergeRGB( \ ShowRed.Levels(0, 1.10, 255, 0, 255), \ ShowGreen.Levels(0, 1.0, 255, 0, 255), \ ShowBlue.Levels(0, 0.75, 200, 0, 255) \ ).Levels(15, 1.2, 235, 0, 255) ####################################### ## remove horizontal chroma stripes ## ## @ top - number of pixels (from top) to process (default 160) ## @ blur - vertical chroma blur radius (default 12) ## @ thresh - ignore smaller chroma changes (default 6) ## function ChromaDestripe(clip C, int "top", int "blur", int "thresh") { top = Max(0, Default(top, 160)) blur = Min(Max(2, Default(blur, 12)), 16) thresh = Min(Max(0, Default(thresh, 6)), 32) U = C.UToY8 V = C.VToY8 Y = C.ConvertToY8 #return Y tw = V.Width th = V.Height ## X = (highpass blurred anti-signal) xh = Max(1, Round(th / 4)) XU=U.BilinearResize(tw, xh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) XV=V.BilinearResize(tw, xh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) #return XU ## H = highpass - find bold horizontal U & V edges HU=U.Subtract(XU).Invert.ColorYUV(cont_y=98) HV=V.Subtract(XV).Invert.ColorYUV(cont_y=98) #return HU.Histogram ## M = mask - pass only areas with bold hor. U & V edges MU=HU.mt_lut("x 128 - abs " + String(thresh) + " - 512 * ") MV=HV.mt_lut("x 128 - abs " + String(thresh) + " - 512 * ") #return MU MU=MU.mt_expand \ .BilinearResize(tw/4, th/4) \ .mt_expand.mt_expand \ .BilinearResize(tw, th) MV=MV.mt_expand \ .BilinearResize(tw/4, th/4) \ .mt_expand.mt_expand \ .BilinearResize(tw, th) #return MU ## restrict mask to "top" pixels top = top / 2 MU = (top<=0 || top>=th) \ ? MU \ : MU.Crop(0, 0, -0, top).AddBorders(0, 0, 0, (th-top)) MV = (top<=0 || top>=th) \ ? MV \ : MV.Crop(0, 0, -0, top).AddBorders(0, 0, 0, (th-top)) #return MU ## B = chroma blur nh = Max(1, Round(th / blur)) BU=U.BilinearResize(tw, nh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) BV=V.BilinearResize(tw, nh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) #return BU ## use blurred chroma in areas of high variation U=U.Overlay(BU, mode="blend", opacity=1.0, mask=MU) #return U V=V.Overlay(BV, mode="blend", opacity=1.0, mask=MV) return YToUV(U, V, Y) } Here's the progress of the U channel (most of the error in this example is in the U channel, but both channels are processed in the script) ![]() Last edited by raffriff42; 18th March 2017 at 01:21. Reason: (fixed image links) |
![]() |
![]() |
![]() |
#10 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
Code:
## <<YV12 source>> Code:
<<source>> Info Code:
<<source>> ConvertToYV12 The next issue is downloading & installing the required plugin, MaskTools2. If mt_masktools-26.dll is copied to the Avisynth plugins folder you can delete the "LoadPlugin" line, otherwise edit the "LoadPlugin" line to load mt_masktools-26.dll from wherever you have it. If all this is done correctly the script should run... |
|
![]() |
![]() |
![]() |
Tags |
chroma, color bands, filters, virtualdub |
Thread Tools | Search this Thread |
Display Modes | |
|
|