VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello.

    I recently found a movie from the year 2000.
    It is strangly disturbed.
    I don't know about the device it has been taken with.
    I do enclose a digital cut (original stream).

    What happened there, and can it be repaired/ improved somehow?
    I usually use VirtualDub2, but can handle AviSynth a bit too.

    Thanks in advance!
    Image Attached Files
    Quote Quote  
  2. It looks like a type of interference pattern

    Do the "lines" change angle in other parts of the movie? Right now it looks like the "stripe" artifacts go from roughly top left to bottom right. If that pattern is fairly fixed, one approach is to apply a convolution kernal - essentially a line blur

    Destripe is a function by *.mp4guy based on mt_convolution, originally meant to handle vertical stripes. If you rotate, filter, rotate back, some denoising/sharpening it might improve it a bit

    The negatives are it will soften the image (you're blurring the artifacts away, and denoising afterwards, which will soften the entire image), and processing will be fairly slow

    Here is a starting point, as usual you can adjust to your tastes

    Code:
    MPEG2Source("Distortions_track1_[und].d2v")
    AddBorders(160,160,160,160)
    Rotate(39)
    destripe(2,2,32)
    destripe(2,1,16)
    Rotate(-39)
    crop(160,160,-160,-160,true)
    mctemporaldenoise(settings="high", strength=50)
    nonlinusm(str=0.2, rad=3)
    CAS(0.5)
    
    
    
    #thr is strength, rad is "how big are the (whatevers)" offset is "how far apart are they" rad goes from 1 to 5, offset from 1 to 4, thr from 1 to bignumber
    
    function DeStripe(Clip C, int "rad", int "offset", int "thr")
    {
    
    	rad = Default(rad, 2)
    	offset = Default(offset, 0)
    	thr_ = Default(thr, 256)
    
    
    	Blurred = Rad == 1 ? C.Mt_Convolution(Horizontal=" 1 1 1 ", vertical = " 1 ", u=1, v=1) : C
    	Blurred = Rad == 2 ? offset == 0 ? C.Mt_Convolution(Horizontal=" 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 1 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
    	Blurred = Rad == 3 ? offset == 0 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) : offset == 1 ?  C.Mt_Convolution(Horizontal=" 1 1 0 1 0 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 0 1 0 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
    	Blurred = Rad == 4 ? offset == 0 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 1 ? C.Mt_Convolution(Horizontal=" 1 1 1 0 1 0 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 2 ? C.Mt_Convolution(Horizontal=" 1 1 0 0 1 0 0 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 0 0 1 0 0 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
    	Blurred = Rad == 5 ? offset == 0 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 1 1 1 1 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 1 ?  C.Mt_Convolution(Horizontal=" 1 1 1 1 0 1 0 1 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 2 ?  C.Mt_Convolution(Horizontal=" 1 1 1 0 0 1 0 0 1 1 1 ", vertical = " 1 ", u=1, v=1) :  offset == 3 ?  C.Mt_Convolution(Horizontal=" 1 1 0 0 0 1 0 0 0 1 1 ", vertical = " 1 ", u=1, v=1) : C.Mt_Convolution(Horizontal=" 1 0 0 0 0 1 0 0 0 0 1 ", vertical = " 1 ", u=1, v=1) : Blurred
    		Diff = Mt_Makediff(C, Blurred)
    
    	THR=string(thr_)
    	MedianDiff =  Rad == 1 ? MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : Diff
    	MedianDiff =  Rad == 2 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
    	MedianDiff =  Rad == 3 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 3 0 -3 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 1 ? MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 3 0 -3 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 3 0 -3 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
    	MedianDiff =  Rad == 4 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 1 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 2 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 3 0 -3 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 4 0 -4 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
    	MedianDiff =  Rad == 5 ? offset == 0 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 1 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 2 0 -2 0 3 0 -3 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 2 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 3 0 -3 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : offset == 3 ?  MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 4 0 -4 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 5 0 -5 0 " ,  expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) : MedianDiff
    		ReconstructedMedian = mt_makediff(Diff, MedianDiff)
    			Mt_AddDiff(Blurred, ReconstructedMedian)
    
    Return(Mergechroma(Last, C, 1))
    }

    There might be more targetted approaches, using frequency domain filtering -eg. fanfilter, fftquiver, fquiver,- but it's difficult to tune the proper parameters in my experience.

    http://www.avisynth.nl/users/vcmohan/FanFilter/FanFilter.html
    http://www.avisynth.nl/users/vcmohan/FFTQuiver/F1Quiver.htm
    http://www.avisynth.nl/users/vcmohan/FFTQuiver/F2Quiver.htm
    Image Attached Files
    • File Type: mp4 1.mp4 (339.9 KB, 19 views)
    Quote Quote  
  3. VirtualDub's Defreq filter was designed for these sort of interference patters (often caused by adjacent channel interference on old OTA broadcasts).

    Here's a link:

    Defreq

    Here's the doom9.org discussion from when the author first created the filter:

    DeFreq plugin - Interference frequency remover

    [edit]Defreq is a plugin for AVISynth, not a filter for VirtualDub. My bad.
    Last edited by johnmeyer; 15th Dec 2020 at 11:48. Reason: corrected error
    Quote Quote  
  4. Thank you for your hints - both of you.

    As I don't have any experiences with this kind of
    disturbance I really appreciate.

    So I will try if there will achievable an improvement
    by the method you propose.
    Although if I have a look at the one poisondeathray
    produced or the examples of Defreq there doesn't
    some much hope.
    Quote Quote  



Similar Threads