VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Jan 2022
    Location
    United Kingdom
    Search Comp PM
    Hello all,

    Usually, if I encounter this issue I can get DeFreq to make a mighty fine job of getting rid of the worst of it, but on this occasion, I'm totally stuck. This junk rolls at about mains frequency so I'm fairly sure it's coupled EMI. But it it is what it is, I know it can not be made perfect but I know it should be able to be improved upon.

    I've attached a still and a small sample, you'll notice that this is horizontal noise, which by the defreq docs should result in the fx variable being set to 0.

    Now, no matter what I try I can not find any set of variables which handle this, usually with oblique noise I can roughly dial it in my eye and then use the vector display to dial it into great effect, but I'm really not sure with almost purely horizontal noise. I'm missing something, somebody with a greater knowledge of mathematics than I surely can point me in the right direction.

    Just to clarify, this is a fault on the tape.

    I'm a bit frustrated as I've used it with great effect before on oblique noise, somehow I can't help but think I'm missing something obvious!

    The clumsy script I usually use for this issue. Ignore the output/numbers used here, this is just an example of my script.

    Code:
    clip = DirectShowSource("*FILE*")
    clip = Subtitle(clip, "Original Video")
    
    #X Variable
    fx=0
    #Y Variable
    fy=44
    
    #===DEFREQ  - 32BIT ONLY WITH INFO===#
    clip1 = DeFreq( clip, fx=fx,fy=fy, info=true, show=1)
    clip1 = Subtitle(clip1, "Adjustment")
    
    #===DEFREQ OUTPUT  - 32BIT ONLY===#
    clip2 = DeFreq( clip, fx=fx,fy=fy)
    clip2 = Subtitle(clip2, "Defreq final output")
    
    
    #StackHorizontal(clip, clip2)
    return clip


    Any input is most welcome and wholly appreciated!

    Spuff.
    Image Attached Thumbnails Click image for larger version

Name:	Banding Example Deint.jpeg
Views:	68
Size:	363.1 KB
ID:	65671  

    Image Attached Files
    Last edited by Spuff; 1st Jul 2022 at 04:05. Reason: Changed RFI to EMI, not had coffee yet!
    Quote Quote  
  2. In my experience defreq doesn't work well with horizontal lines. Rotate the image 90 degrees, defreq, then rotate the image back:

    Code:
    AviSource("Banding Example AVI.avi") 
    Merge(SelectEven(), SelectOdd())  # restore 25p
    
    TurnRight()
    DeFreq(fx=14.2, fy=0, sharp=1, show=0, Info=false)
    DeFreq(fx=15.5, fy=0, sharp=1, show=0, Info=false)
    TurnLeft()
    That removes a lot of the horizontal bands.
    Last edited by jagabo; 1st Jul 2022 at 10:38.
    Quote Quote  
  3. Member
    Join Date
    Jan 2022
    Location
    United Kingdom
    Search Comp PM
    That's really kind of you @jagabo, thanks for taking the time to solve that for me!

    Much improved thank you.

    Can I just ask (and I fear I should know the answer to this) did you just align by eye, as I can't see where this would align to on the 'scope'?

    Cheers,
    Spuff
    Quote Quote  
  4. I had to fix a very similar problem, except that the lines were vertical and were caused by the strange film emulsion and not from adjacent channel interference (which is the typical cause of the lines defreq is designed to minimize). Take a look at the suggestions I received in this thread:

    How to remove Polavision (instant film) vertical lines

    As you will see, the artifact is pretty similar to what you get with your video after you apply the turnright() function.

    As I remember (this was from a dozen years ago), I also played around with a convolution kernel approach. Convolution is simple on the surface but very tricky to tune. However, it can sometimes do wonders on artifacts like this. You can get some ideas from another thread I started a long time ago about how to remove a crosshatch pattern that someone later identified as dot crawl:

    Remove cross hatch pattern from Kinescope
    Quote Quote  
  5. Originally Posted by Spuff View Post
    Can I just ask (and I fear I should know the answer to this) did you just align by eye, as I can't see where this would align to on the 'scope'?
    Take a simple example, a sinusoidal wave over a static image:

    Image
    [Attachment 65681 - Click to enlarge]


    Using DeFreq(fx=7.4, fy=-11.9, dx=2.0, dy=2.0, sharp=1, show=1, Info=true) we see:

    Image
    [Attachment 65682 - Click to enlarge]


    The square block shows the selected frequencies fx=7.4 and fy=11.9, with plus or minus 2 percent around it. I chose those values because there is a bright spot at the intersection of lines in the spectrogram. You can see that the frequency and angle of the lines at the top left (defined by fx and fy) match the frequency and angle of the lines from the original image at the bottom right (luma only). I usually just guestimate the values first, then tune until I get the box around the desired spot.

    When you apply those parameters with DeFreq(fx=7.4, fy=-11.9, dx=2.0, dy=2.0, sharp=1, show=0, Info=false) you get:

    Image
    [Attachment 65683 - Click to enlarge]


    The lines are mostly gone.

    Of course, in the real world you usually don't have perfect lines like that. Using your video (with 90 degree rotation before and after) with DeFreq(fx=14.2, fy=0.0, sharp=1, show=2, Info=false) we see:

    Image
    [Attachment 65684 - Click to enlarge]


    Again you can see a small bright spot at the middle of the box and that the lines in the sample match the lines in the video. When the filter is applied many of the lines are diminished.

    Beyond that it's pretty much trial and error with other spots in spectrogram or other frequencies suggested by Defreq(info=true) and playing with the dx, dy, and sharp parameters.
    Quote Quote  
  6. jagabo,

    Thanks for the tutorial. I have to re-learn defreq every time I use it. I'm bookmarking this so I can get up to speed faster the next time.
    Quote Quote  
  7. Yes, I have to figure it out again each time too.
    Quote Quote  
  8. Member
    Join Date
    Jan 2022
    Location
    United Kingdom
    Search Comp PM
    jagabo thanks again for taking the time to explain that, I'm very appreciative of your time and I'll read and digest this shortly!

    Cheers,
    Spuff.
    Quote Quote  



Similar Threads

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