VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Hi everyone,

    I'm having trouble removing rainbows on a music video, some help would be gladly accepted! I've tried about every single de-rainbow script out there... Here's my script and file down below:

    Code:
    MPEG2Source("F:\D2Vs\One In a Million.d2v")
    bob(-0.2,0.6)
    srestore(frate=23.976, omode=6)
    crop(10,6,-10,-4)
    Lanczos4resize(720,540)
    Checkmate(24)
    DeRainbow()
    SmartSSIQ(strength=200, interlaced=false)

    Thanks!
    Image Attached Files
    Quote Quote  
  2. Try this:

    ##Load filters:
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\KNLMeansCL-v1.1.1\KNLMeansCL.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\TTempSmoothv094\TTempSmooth.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\variableblur0.7_x86_x64\x86\variablebl ur.dll")
    #####
    MPEG2Source("C:\OIAM.d2v", cpu=0)
    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()
    ########
    # The light version (which i prefer, color fidelity remain high)

    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=8)
    ve_chroma = VToY(ev).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=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=8)
    vo_chroma = VToY(od).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=8)
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    Image Attached Thumbnails Click image for larger version

Name:	AALIYAH-ORIGINAL.jpg
Views:	23
Size:	249.4 KB
ID:	69731  

    Click image for larger version

Name:	AAALIYAH-THEMASTER1.jpg
Views:	23
Size:	217.0 KB
ID:	69732  

    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  3. Originally Posted by themaster1 View Post
    Try this:

    ##Load filters:
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\KNLMeansCL-v1.1.1\KNLMeansCL.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\TTempSmoothv094\TTempSmooth.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\variableblur0.7_x86_x64\x86\variablebl ur.dll")
    #####
    MPEG2Source("C:\OIAM.d2v", cpu=0)
    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()
    ########
    # The light version (which i prefer, color fidelity remain high)

    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=8)
    ve_chroma = VToY(ev).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=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=8)
    vo_chroma = VToY(od).blur(0,1.5).ttempsmooth(maxr=6,lthresh=15 0, strength=8)
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    It seems like you found a way to remove most of it, merci !
    Quote Quote  
  4. Almost as effective but much simpler:
    Code:
    MergeChroma(TTempSmooth(maxr=6, lthresh=150, cthresh=150, strength=8, interlaced=true))
    Quote Quote  
  5. You can check out the rainbow removal I did for someone by clicking here:

    https://forum.videohelp.com/threads/398864-Need-help-on-Avisynth#post2595644

    I posted a visual before/after. I have used this same technique on other rainbow problems.
    Quote Quote  
  6. Yes, SpotLess is a quite nifty tool (script). I don't know why it has been removed from the Avisynth wiki (or I just didn't find it there anymore).
    Quote Quote  
  7. users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. Thanks to all of you guys! I've tried using SpotLess which is quite slow and I find it very agressive. I probably need to take the time to tweak all the settings LOL
    Quote Quote  
  9. @ johnmeyer: Question regarding SpotLess and rainbow removal. Since you need to use a radT of 3+ how do you stop SpotLess to 'swallow' the wrong stuff?
    when using
    Code:
    SpotLess(clip=clip, radT=4, ablksize=8, aoverlap=4, thsad=1000, thsad2=1000)
    SpotLess often gets too destructive:



    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. Hmm,.. will do. Thanks.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    You're welcome! johnmeyer was part of that wonderful discussion, so he can help in understanding if needed.
    Quote Quote  
  12. The problem with any temporal filter is tuning them so they fix rather than ruin the video. The tuning parameters are almost always different, not only for different videos, but often from one scene to the next. This is why good restoration takes a long time.

    The masking work was a noble effort, and I had high hopes it might work, but I never got a better result with the masks than without them.
    Quote Quote  
  13. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Merge Chroma (via Jagabo, of course) did a great job on a rainbow issue I had.
    Quote Quote  
  14. The tuning parameters are almost always different, not only for different videos, but often from one scene to the next. This is why good restoration takes a long time.
    Sadly I agree, for proper restoration you usually require (at least) a per scene filter approach which can take ages.
    I never got a better result with the masks than without
    sad to read that, but that saves me time trying to port it to Vapoursynth

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  15. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    sad to read that, but that saves me time trying to port it to Vapoursynth
    in that thread I read good results from user zorr and others...
    Quote Quote  
  16. Originally Posted by lollo View Post
    sad to read that, but that saves me time trying to port it to Vapoursynth
    in that thread I read good results from user zorr and others...
    Lollo makes a good point. Please don't take my comment as the last word on whether the masking approach worked, or not. Instead, do as he suggests and read through the thread to see what success other people had.

    The reason I still have to do a lot of manual work when trying to use motion estimation to create intermediate frames (for either frame rate conversion or slow motion) is that the software which generates the mask on each frame has to sense when the motion estimation has broken down (like when panning across a line of closely-spaced fence posts). While the obnoxious visual artifacts are easy to see with your eye, it is really difficult to automatically construct a mask when those artifacts happen, and then have it cover the entire artifact.
    Quote Quote  



Similar Threads

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