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.
+ Reply to Thread
Results 1 to 12 of 12
-
Last edited by semel1; 14th Feb 2021 at 21:31.
-
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)
[Attachment 57376 - Click to enlarge] -
"...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.) -
-
It's usually the analog player (and any other analog devices between the player and capture device) that's responsible for the sharpening halos.
How convenient that you didn't mention that in your first post.
You can try protecting other parts of the picture with a mask.
Your links to doom9 don't work. -
"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.
-
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.
-
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)
-
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)
-
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 versionLast edited by semel1; 15th Feb 2021 at 15:02.
-
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.
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.
-
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
Similar Threads
-
How do I remove ghosting& screendoor/canvas effect from a DVD(cartoon show)
By dinoman in forum Newbie / General discussionsReplies: 15Last Post: 1st Nov 2021, 20:11 -
Remove ghosting on an NTSC 29.97fps possibly shot on PAL
By bruno321 in forum EditingReplies: 2Last Post: 10th Apr 2018, 08:54 -
How to remove ghosting from progressive VOB ?
By marconii2002 in forum Newbie / General discussionsReplies: 5Last Post: 28th Mar 2017, 22:25 -
Remove or Minimize Ghosting?
By brispuss in forum Newbie / General discussionsReplies: 14Last Post: 6th Sep 2016, 21:00 -
How to remove ghosting ?
By marconii2002 in forum Newbie / General discussionsReplies: 3Last Post: 8th Jun 2016, 09:34