VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. I'm trying unsuccessfully to solve edge haloing/ghosting (whatever it could be named) problem with different videos.
    Below the sample from DV tape video, captured using FireWire and processed using: FFmpegSource2("clip.mov").QTGMC(Preset="placebo")

    https://drive.google.com/file/d/1zNPRN7-WKd7kTA_Fs3GggkzZ2to5ThhA/view?usp=sharing



    Another samples - from the Betacam tape video, captured using AJA and processed using:FFmpegSource2("clip.mov").Crop(0,4,-0,-2).QTGMC(preset="fast").SRestore(frate=23.976)

    https://drive.google.com/file/d/1InYCBFdGlukwatttu34Svc5QAc3BaeFY/view?usp=sharing



    https://drive.google.com/file/d/10yrYsdASeMj6rEMuSyCCn1L2brcTory0/view?usp=sharing




    As you can see the - the video from Betacam introduces two different (kind of) halo/ghosting.
    I tried many de-halo/Ghost filters (too long to list) that I could found.
    The last one I tried is the approach posted at: https://forum.doom9.org/showthread.php?p=1177500#post1177500.
    Unfortunately the author did not disclose the whole script, and the part of the disclosed script doesn't match the result, posted in that thread.
    Any suggestion greatly appreciated.
    Last edited by semel1; 14th Feb 2021 at 21:31.
    Quote Quote  
  2. First of all, turn off any sharpening filters in any of your hardware. Those are the cause of the halos -- avoiding them is better than reducing them in post.

    There are dehalo filters for AviSynth but they can be pretty damaging to the video.

    Code:
    dehalo_alpha(rx=3.5, ry=1.0, DarkStr=1.3, BrightStr=1.3)
    dehalo_alpha(rx=1.0, ry=3.0, DarkStr=1.6, BrightStr=1.6)
    Image
    [Attachment 57376 - Click to enlarge]
    Quote Quote  
  3. "...sharpening filters in any of your hardware." I'm using NVIDIA's "Base profile" with "Image sharpening -off"
    I've tried dehalo_alpha already, but result is way too blurry.
    That's the reason I'm trying to find the solution similar to posted above (https://forum.doom9.org/showthread.p...32#post1177432.)
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by semel1 View Post
    "...sharpening filters in any of your hardware." I'm using NVIDIA's "Base profile" with "Image sharpening -off"
    I've tried dehalo_alpha already, but result is way too blurry.
    That's the reason I'm trying to find the solution similar to posted above (https://forum.doom9.org/showthread.p...32#post1177432.)
    Did you test this doom9 link ? Neither of them work
    Quote Quote  
  5. Originally Posted by semel1 View Post
    "...sharpening filters in any of your hardware." I'm using NVIDIA's "Base profile" with "Image sharpening -off"
    It's usually the analog player (and any other analog devices between the player and capture device) that's responsible for the sharpening halos.

    Originally Posted by semel1 View Post
    I've tried dehalo_alpha already
    How convenient that you didn't mention that in your first post.

    Originally Posted by semel1 View Post
    but result is way too blurry.
    You can try protecting other parts of the picture with a mask.

    Originally Posted by semel1 View Post
    That's the reason I'm trying to find the solution similar to posted above (https://forum.doom9.org/showthread.p...32#post1177432.)
    Your links to doom9 don't work.
    Quote Quote  
  6. "It's usually the analog player (and any other analog devices between the player and capture device) that's responsible for the sharpening halos."
    Capturing has been done in the Video Production facility using Betacam SP and AJA.
    (Another thing that this Betacam tape 35 years old)

    "How convenient that you didn't mention that in your first post." - please read above "I tried many de-halo/Ghost filters (too long to list) that I could found."

    "You can try protecting other parts of the picture with a mask." - I'm not very fluent with Avisynth scripting.
    Would be great I you can provide me with the the basic script that I can use as reference.
    BTW - the Doom9 link leads to the "masking" approach.

    Doom9 link updated.
    https://forum.doom9.org/showthread.php?p=1177500#post1177500
    Sorry for inconvenience.
    Last edited by semel1; 14th Feb 2021 at 22:57.
    Quote Quote  
  7. P.S.
    "You can try protecting other parts of the picture with a mask."

    Well, I can mask edges and then invert it, that gives me masked content that I don't want to be involved in processing:

    Clip.mt_edge("min/max",4,48,0,255,U=-128,V=-128).mt_invert(U=2,V=2)

    Then what?
    How I can apply (let's say "dehalo_alpha) to un-masked parts (edges) and then merge them with the un-touched content?

    Clip.mt_edge("min/max",4,48,0,255,U=-128,V=-128).mt_invert(U=2,V=2).dehalo_alpha(rx=3.5, ry=1.0, DarkStr=1.3, BrightStr=1.3).dehalo_alpha(rx=1.0, ry=3.0, DarkStr=1.6, BrightStr=1.6) ?????

    Even If will manage to do listed above, the edges will be blurred, so I need to somehow mask the small "halloed" areas outside the edges.
    As, I've mentioned my level of expertise in Avisynth scripting is not great, so any help will be greatly appreciated.
    Last edited by semel1; 14th Feb 2021 at 23:58.
    Quote Quote  
  8. Managed to make it work (somehow) using mask:

    Code:
    clip= last 
    dehalo = clip.dehalo_alpha(rx=3.5, ry=1.0, DarkStr=1.3, BrightStr=1.3).dehalo_alpha(rx=1.0, ry=3.0, DarkStr=1.6, BrightStr=1.6)
    emask = clip.mt_edge("min/max",4,48,0,255,U=-128,V=-128).mt_invert(U=2,V=2) 
    result = mt_merge(clip,dehalo,emask, U=2,V=2)
    return(result)
    Any suggestions to improve it?
    Quote Quote  
  9. I used this as an edge mask to apply the dehaloing to only the most pronounced halos, preserving other small details:

    Code:
    emask = Spline16Resize(width/2, height/2).mt_edge(mode="roberts", thy1=20, thy2=20).PointResize(width,height).mt_expand().Blur(1.4)#.Blur(1.4).Blur(1.4)
    You may have to adjust the thy1 and thy2 values to keep some edges from flickering with motion.
    Quote Quote  
  10. Your "emask" sometime produces color distorted masks.
    In the frames without color distorted mask, output result is very similar to my "emask" version.
    However both versions suffer from some kind of mask shift to the left.
    So, the right edges get masked and "de-halloed" properly (well - sort of), wile left edges stay untouched with halo.



    P.S. A've add "mt_invert(U=2,V=2)" to your version
    Last edited by semel1; 15th Feb 2021 at 15:02.
    Quote Quote  
  11. Originally Posted by semel1 View Post
    Your "emask" sometime produces color distorted masks.
    The masktools functions return junk in the chroma channels by default. I was using Overlay() rather than mt_merge(). Overlay() uses only the Y channel. So the discolored mask didn't matter. If you need pure greyscale just set the mask to greyscale() of add chroma="-128" to the mt_ functions. I was using your edge3.jpg image for all my tests.

    Originally Posted by semel1 View Post
    However both versions suffer from some kind of mask shift to the left.
    Then shift them to the right.

    But you're using my mask wrong. It shouldn't be inverted. The point of the mask is to dehalo dehalo_alpha() only to the strongest halos, the rest of the image is left as-is.
    Last edited by jagabo; 15th Feb 2021 at 17:29.
    Quote Quote  
  12. Ended up with:
    emask = clip.mt_edge("min/max",4,48,0,255,U=-128,V=-128).mt_invert(U=2,V=2).Move(0,0,HDir=2,VDir=4,Bor dCol=$FF0000)
    result=mt_merge(clip,dehalo,emask, U=2,V=2)

    Where "Move" from StainlessS post https://forum.doom9.org/showthread.php?p=1718440#post1718440
    Thank you for your kind assistance
    Quote Quote  



Similar Threads

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