I have a source that looks wierd and Ive only come across this once before.
Can anyone suggest something to try in order to lessen or remove thes line across the picture?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 43
Thread
-
-
A general approach might be to try a vertical blur
But what is the temporal relationship? Do the lines move? are they static ? Do they change in size or color ? -
Are you referring to the curved vertical lines in the left of the image? You've seen that many times, not just once. It's called banding. It's caused by over filtering, careless re-encoding, insufficient bitrate, etc.
Color Banding And Noise Removal thread for gradient cleanup and dithering plugins.- My sister Ann's brother -
-
I think you tried that earlier. The banding will return during re-encode -- for the same reasons given in an earlier thread about a similar problem.
- My sister Ann's brother -
-
I think the OP meant "line[s] across the picture?".
I may be imagining things, but I can still sort of see them in the processed PNG. -
Last edited by newpball; 11th Nov 2014 at 23:31.
-
- My sister Ann's brother
-
I wasnt talking about the banding just incase anyones confused or wondering. I was talking about the ones in the hair.
-
You could probably filter Y, and U, V to get treat the other colored lines in the background. Maybe use a masktools cartoon line mask to protect the lines
You still haven't answered the question about the temporal pattern - static ? moving ? all frames ? etc.... That affects how you filter it -
They dont seem to move at all.
heres a sample
https://mega.co.nz/#!ulJgEKRI!2lcN0TruJzpFmZic4erhjndYZ-kVB197rEhbYxP6rGI -
Not the final solution, just a half arse attempt really, but this seems to get rid of them:
Code:ffvideosource("D:\Ins\Digimon Fusion Preview-002\Digimon Fusion Preview-002.mkv") deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband()
-
Far too much of the detail IS banding of one sort or another. Removing it while keeping the actual lines intact will be incredibly difficult.
-
mild high to mid frequency luminance noise suppression
FFT3DFilter on the Luma plain?
The worst of the problems do seem to be on the luma plain and somehow the problems are more horizontal in nature. How many filters are bias towards the vertical? -
Actually it's not too difficult in avisynth masktools to generate a cartoon line mask to protect the actual cartoon lines .
eg. the base mask is just this
o=last
mt_hysteresis(o.mt_edge ("cartoon",thy1=8, thy2=10),o.mt_edge ("hprewitt")).mt_expand_multi(sw=6, sh=6).mt_inpand_multi(sw=6, sh=6)
Here is the binarized version of it so you can visualize what is going on
You can combine it with other types of mask, refine it with various masktool operators etc..
I did this a few days ago when I was patiently waiting for a reply to the question . It's heavily filtered with the line protection mask, and moderately dithered in preparation for encoding (you won't retain the dither unless you use dither retention settings or very high bitrates).
BUT the actual problem is refining the mask so it works for the actual video across different scenes and scenarios . Often you'll have holes in the mask, or need other masks for coverage in different scenes. You want to do as less work and scripting as possible, but that involves some tradeoffs. The temporal characteristics of the artifacts and whether or not you are limited to spatial processing. Many things are not conveyed by a static screenshot, or a short description. I'll have a look at your video sample if I have time later, but I suspect you need to combine it with a shadow/luma mask to protect shadow detail in some of the other shots (or just set a generic threshold for the shadow mask across all scenes) -
Well thanks for taking a look at it poison, I look forward to your answer and script.
I think the picture looks great!Last edited by killerteengohan; 17th Nov 2014 at 20:44.
-
I won't have time to look at it this week in detail.
But a quick look tells me you're going to have problems with using a cartoon based edge mask alone. Because you're going to be using strong filters in Y, U and V to get rid of the horizontal lines , there are a lot of shadow areas which will get destroyed unless you protect them with a shadow/luma mask (e.g. even in the first few frames) . In the other section with smoke, that will get killed and since it's neither dark, nor lines, (it's "grey") it's difficult to isolate with masks in avisynth, maybe a saturation mask. If you want a great job, you're going to have to use different masks / different settings on different sections . If you want an OK job, you're going to have to make tradeoffs -
Code:
a = ffvideosource("D:\Ins\Digimon Fusion Preview-002\Digimon Fusion Preview-002.mkv").addborders(0,0,0,8) a LSFMOD() spline36resize(a.width * 3, a.height) deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband() fft3dfilter(bt = 1, bw = 32, bh = 64, ow = 16, oh = 32, sigma=2) spline36resize(a.width, a.height) LSFMOD() flash3kyuu_deband()
Hopefully it will give someone more sensible some ideas. -
That "base mask" was intended for that 1st screenshot. I didn't have access to the video at the time
Obviously you have adjust the mask to fit the video. As you alluded to, especially with cartoons, one of most common problem scenarios are "dark scenes." The problem is lines are "dark" , and shadows are "dark" as well - therefore you get no separation. And commonly used denoisers usually destroy shadow detail, thus the lines there as well. So the usual techniques use are some combination of:
a) either adjust the thresholds lower (detect more lines)
b) create separation by prefiltering (e.g. brighten the scene and boost and increase shadow contrast, just for the mask creation)
c) combine masks using masktools operators , use different types of masks , not just edgemasks e.g. combine a luma mask with the cartoon line mask; or use a saturation mask (lines are often low saturation, compared to flat colored areas) . You can use operators like "OR" or "AND" or "ANDN" to refine and include or exclude regions with mt_logic
Here is an example of prefiltering for the mask by using (b), brightening shadows . This will cover the dude in the middle. This works ok on the other scene with the girl too. You have to examine the other scenes to see if it's appropriate, or make adjustments . I don't have time to fiddle with this right now. Trying to do everything with 1 mask will invariably be worse, but it's less work than making a mask per scene
Code:o=last pre=o.hdragc(coef_gain=2).blur(0,1.5).deen(mode="c2d", rad=1, thry=2) m1=mt_hysteresis (pre.mt_edge("cartoon", thy1=6, thy2=10),pre.mt_edge ("hprewitt", thy1=8, thy2=10)).mt_expand_multi(sw=2, sh=4).mt_inpand_multi(sw=2, sh=2) m1
-
Code:
o = ffvideosource("D:\Ins\Digimon Fusion Preview-002\Digimon Fusion Preview-002.mkv") o pointresize(o.width * 2, o.height) deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband() deen("a2d") flash3kyuu_deband() fft3dfilter(bt = 1, bw = 32, bh = 64, ow = 16, oh = 32, sigma=2) spline36resize(o.width, o.height) flash3kyuu_deband() filtered=last pre=o.hdragc(coef_gain=2).blur(0,1.5).deen(mode="c2d", rad=1, thry=2).addborders(0,0,0,8) m1=mt_hysteresis (pre.mt_edge("cartoon", thy1=6, thy2=10),pre.mt_edge ("hprewitt", thy1=8, thy2=10)).crop(0,0,0,-8).mt_expand_multi(sw=2, sh=4).mt_inpand_multi(sw=2, sh=2) mt_merge(filtered, o, m1, luma=true) flash3kyuu_deband()
Last edited by ndjamena; 19th Nov 2014 at 11:40.
-
You'll get a slight speedup if you use mt_merge() instead of overlay() . Overlay() is slower, but has more options like blending modes, other colorspace support, opacity adjustments within
mt_merge(filtered, a, m1, luma=true)
You might want to apply some type of dithering after the overlay operation, to "blend in" the composite -
Filtering's really not my thing, I discovered it was the flash3kyuu_deband filters that were doing most of the slow down, I didn't really think they were doing anything and wasn't sure why I added them so I removed them and it messed everything up. Now I'm afraid to touch it again. There's still the occasional remnant of some of the more virile "bands" but it's head and shoulders above the original. It's definitely banding, you just have to look at the shot of the thing standing up to see that. Maybe another round of Deen/flash will finish off the last of the problems.
I'll update the post above with the modified script. -
Here is the video after a slight surface (edge aware) blur.
DigimonX.mp4