VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member
    Join Date
    Nov 2018
    Location
    Russia
    Search PM
    Hi everybody! I'm from Russia, and this cassette was recorded in MESECAM. There is a problem - it has a lot of chroma noise, such as these pink spots:
    Image
    [Attachment 47239 - Click to enlarge]


    Is it possible to clean these spots? This video has another problem like chroma shifting, color bleeding - I corrected them as I could:
    Code:
    AVISource("D:\Pif_Sample.avi")
    XviD4PSPPluginsPath = "C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\plugins\"
    LoadPlugin(XviD4PSPPluginsPath + "Warpsharp.dll")
    Import(XviD4PSPPluginsPath + "RemoveColorBleeding.avs")
    LoadPlugin(XviD4PSPPluginsPath + "fft3dfilter.dll")
    converttoyv12()
    ChromaShift(c=12)
    MergeChroma(aWarpSharp(depth=20))
    RemoveColorBleeding()
    fft3dfilter(bw=32,bh=32,ow=16,oh=16,bt=2,sigma=3.0,sigma2=2.5,sigma3=16.0,sigma4=10.0,plane=3,ncpu=1)
    Crop(12, 2, -16, -8)
    maa2()
    RemoveColorBleeding.avs:
    Code:
    # RemoveColorBleeding (by Didйe)
    function RemoveColorBleeding(clip input) {
    o=input
    warp1=o.mergechroma(o.blur(1.0).unsharpmask(255,1,1).aWarpSharp2(depth=30, thresh=192, blur=3, chroma=4))
    warp2=o.mergechroma(warp1.blur(1.0).unsharpmask(255,1,1).aWarpSharp2(depth=12, thresh=192, blur=2, chroma=4))
    # interleave(o,warp1,warp2) # visualization
    return warp2
    }
    I uploaded two samples - source and encode. I would be very grateful for any help.
    Image Attached Files
    Quote Quote  
  2. Try this, it works great with cartoons generally; require the filters: TTempSmooth, variable blur, KNLMeansCL, camcorder color denoise (vdub):
    AVISource("Pif_Sample.avi")
    assumetff()
    ###1) Clean Chroma artefacts (heavy cleaning):
    ConvertToYV16(interlaced=true)
    orig=last
    ev=orig.assumetff().separatefields().selecteven()
    od=orig.assumetff().separatefields().selectodd()
    ev
    ue_chroma = UToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    ve_chroma = VToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    YToUV(ue_chroma, ve_chroma)
    MergeLuma(ev)
    ev_filtered=last
    od
    uo_chroma = UToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    vo_chroma = VToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    ###2) Clean Chroma artefacts (soft cleaning in rgb with CCD filter):
    ConverttoRGB32(matrix="rec601",interlaced=true)
    separatefields()
    LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Den oise_sse2.vdf", "CCD", 0)
    CCD(10,1) # 0-100, default 30
    weave()
    converttoyv12(matrix="Rec601",interlaced=true)
    ## 3) remove some chroma bleeding:
    mergechroma(awarpsharp2(depth=10, type=1, blur=1, chroma=4)) # chroma=4 ->luma guide
    Last edited by themaster1; 20th Nov 2018 at 13:22.
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  3. filtered / original:

    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  4. Member
    Join Date
    Nov 2018
    Location
    Russia
    Search PM
    themaster1
    Thank you so much! That is much better. But on the first frames pink spots still there. How can I set more stronger filtration? I tried to set more higher values for binomialblur - is it right?

    binomialblur(5)
    Image
    [Attachment 47260 - Click to enlarge]

    binomialblur(50)
    Image
    [Attachment 47261 - Click to enlarge]


    And is it possible to clean purple stripe on right side?
    Quote Quote  
  5. These are strong settings already. You can try to increase the value for ccd such as
    CCD(30,1)
    or
    ttempsmooth (strength=8)
    (that's the maximum), and
    KNLMeansCL(h=8)
    or higher
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  6. Member
    Join Date
    Nov 2018
    Location
    Russia
    Search PM
    Yes, thank you. Increase value for KNLMeansCL gives effect. And what about the purple stripe on right side?

    p.s.: I'm trying to encode with this script - fps is very low (about 0,5fps) and CPU Usage only about 10% - is it normal? CPU is Xeon E5-2670
    Last edited by gleim; 22nd Nov 2018 at 10:47.
    Quote Quote  
  7. *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  8. Member
    Join Date
    Nov 2018
    Location
    Russia
    Search PM
    themaster1, thank you. When discolored stripe is on the right side - that is work. But when stripe is on the left side - what should I do? I tried this:
    Code:
    # the width of the discolored right edge -- in Y pixels
    EDGE_SIZE = 20
    cropped = Crop(EDGE_SIZE,0,-0,-0)
    extra = cropped.FlipHorizontal().Crop(EDGE_SIZE,0,-0,-0)
    chroma = StackHorizontal(cropped, extra)
    MergeChroma(last, chroma)
    But in this case I'm getting an error: "MergeChroma: Images must have same width and height!"
    Quote Quote  
  9. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Standard chroma noise.
    The Camcorder Color Denoise in VirtualDub should also be used for best results. Not just pure Avisynth.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  10. Member
    Join Date
    Nov 2018
    Location
    Russia
    Search PM
    lordsmurf
    I use it already in my script:
    Code:
    LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Den oise_sse2.vdf", "CCD", 0)
    CCD(10,1) # 0-100, default 30
    But even maximal value (100) for CCD doesn't clean that discolor stripe.

    That's why I'm asking how I should modify this script for the other side (left for example):
    Code:
    # the width of the discolored right edge -- in Y pixels
    EDGE_SIZE = 20
    cropped = Crop(0,0,-EDGE_SIZE,-0)
    extra = cropped.FlipHorizontal().Crop(0,0,EDGE_SIZE,-0)
    chroma = StackHorizontal(cropped, extra)
    MergeChroma(last, chroma)
    Quote Quote  
  11. Try this, it's the best i can do (rgbeq filter is included in this post)
    AVISource("Pif_Sample.avi").assumetff()
    ## ADJUST Chroma to luma:
    separatefields()
    A=Last
    B=A.Greyscale()
    Overlay(B,A,X=3,Y=0,Mode="Chroma")
    weave()

    ###1) Clean Chroma artefacts (heavy cleaning, spatio-temporal):
    ConvertToYV16(interlaced=true)
    orig=last
    ev=orig.assumetff().separatefields().selecteven()
    od=orig.assumetff().separatefields().selectodd()
    ev
    ue_chroma = UToY(ev).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=6).KNLMeansCL(d=3,a=8,s=2,h=8)
    ve_chroma = VToY(ev).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=6).KNLMeansCL(d=3,a=8,s=2,h=8)
    YToUV(ue_chroma, ve_chroma)
    MergeLuma(ev)
    ev_filtered=last
    od
    uo_chroma = UToY(od).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=6).KNLMeansCL(d=3,a=8,s=2,h=8)
    vo_chroma = VToY(od).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=6).KNLMeansCL(d=3,a=8,s=2,h=8)
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    ###2) Clean Chroma artefacts (soft cleaning in rgb with CCD filter):
    ConverttoRGB32(matrix="rec601",interlaced=true)
    separatefields()
    LoadVirtualDubPlugin("C:\Program Files (x86)\VirtualDub\plugins\Camcorder_Color_Denoise_sse2.vdf", "CCD", 0)
    CCD(10,1) # 0-100, default 30
    weave()
    ##############################################
    ###3) REMOVE COLOR STRIPE AT THE RIGHT (DESATURATE) :
    X1 = 690
    Y1 = 0
    X2 = 720
    Y2 = 576
    #
    X1 = X1 - (X1 % 4)
    Y1 = Y1 - (y1 % 4)
    X2 = (X2 + 3) / 4 * 4
    Y2 = (Y2 + 3) / 4 * 4

    Active = crop(X1,Y1,X2-X1,Y2-Y1)
    Above = Y1 > 0 ? crop(0,0,width(),Y1) : NOP
    Below = Y2 < height() ? crop(0,Y2,width(),height()-Y2) : NOP
    Left = X1 > 0 ? crop(0,Y1,X1,Y2-Y1) : NOP
    Right = X2 < width() ? crop(X2,Y1,width()-X2,Y2-Y1) : NOP
    Last = Active
    ## PUT FILTERS HERE:
    #
    ## Desaturate the PINK BAR on the right:
    LoadVirtualDubPlugin("C:\Program Files (x86)\VirtualDub\plugins\rgbeq.vdf", "rgbeq", 0)
    rgbeq("20G2020G2020G2020G2020G2020G2020G2020G0020G 2020G2020G2020G2020G2020G2020G2020G2020G2020G2020G 2020G2020G2020G2020G2020G1520G2020G2020G2020G2020G 2020G2020G2020G2020G2020G2020G2020G2020G2020G2020G 2020G2J20G2020G2020G2020G2020G2020G2020G2020G2020G 2020G2020G2020G2020G2020G2020G2020G1M20G2020G2020G 2020G2020G2020G2020G2020G2020G2020G2020G2020G2020G 2020G2020G2020G2020G2020G2020G2020G2020G2020G2020G 2020G2000G4100G4100G4100G4100G4100G4100G4100G4100G 4100H4H00H4H00G0J000a0")

    IsClip(Left) ? StackHorizontal(Left, Last) : NOP
    IsClip(Right) ? StackHorizontal(Last, Right) : NOP
    IsClip(Above) ? StackVertical(Above, Last) : NOP
    IsClip(Below) ? StackVertical(Last, Below) : NOP
    return Last

    converttoyv12(matrix="Rec601",interlaced=true)
    ## 4) remove some chroma bleeding:
    mergechroma(awarpsharp2(depth=10, type=1, blur=1, chroma=4)) # chroma=4 ->luma guide
    Image Attached Files
    Last edited by themaster1; 28th Nov 2018 at 18:12. Reason: adding filter
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  12. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by themaster1 View Post
    Try this, it works great with cartoons generally; require the filters: TTempSmooth, variable blur, KNLMeansCL, camcorder color denoise (vdub):
    AVISource("Pif_Sample.avi")
    assumetff()
    ###1) Clean Chroma artefacts (heavy cleaning):
    ConvertToYV16(interlaced=true)
    orig=last
    ev=orig.assumetff().separatefields().selecteven()
    od=orig.assumetff().separatefields().selectodd()
    ev
    ue_chroma = UToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    ve_chroma = VToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    YToUV(ue_chroma, ve_chroma)
    MergeLuma(ev)
    ev_filtered=last
    od
    uo_chroma = UToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    vo_chroma = VToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(m axr=6,lthresh=150, strength=6).KNLMeansCL(d=3,a=8,s=2,h=6)
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    ###2) Clean Chroma artefacts (soft cleaning in rgb with CCD filter):
    ConverttoRGB32(matrix="rec601",interlaced=true)
    separatefields()
    LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Den oise_sse2.vdf", "CCD", 0)
    CCD(10,1) # 0-100, default 30
    weave()
    converttoyv12(matrix="Rec601",interlaced=true)
    ## 3) remove some chroma bleeding:
    mergechroma(awarpsharp2(depth=10, type=1, blur=1, chroma=4)) # chroma=4 ->luma guide
    For more accuracy in colorspace conversion, you might want to know that the video sample is not interlaced. It's progressive film rate speeded up for PAL 25fps.
    - My sister Ann's brother
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!