Log in

View Full Version : Filtering bad analog Anime Capture


grua
26th April 2005, 09:41
Hi,

I've tried to do the best with a very bad analog VHS anime-capture, but I think it's not really the best that could be done...

Separate Frames look OK, but when watching the motion I can see still too much noise and mainly bad areas.

Maybe someone has some tips and tries to do it better? I think, it's really difficult to clean this anime...

Here's some sample:

The original capture (PicVideo MJPEG Q=19):
http://web.utanet.at/grundlau/Quelle.avi (7 MB)

Here is what I was producing with the following script and CCE 4000 kBit/s:
http://web.utanet.at/grundlau/Ergebnis.mpv (2 MB)

Import("D:\Programme\AviSynth\Lib\SmartBob\TMCBob.avs")
Import("D:\Programme\AviSynth\Lib\mfToon\mfToon-v0.52.avs")
Import("D:\Programme\AviSynth\Lib\LimitedSharpen\LimitedSharpen.avs")

AviSource("VHS-Anime.avi",true,"YUY2")

TMCBob() # deinterlace 50 fps

Crop(22,4,-18,-12)

ConvertToYV12() # Depan needs YV12
data=depanestimate(last,pixaspect=1.094)
depaninterleave(last,data,pixaspect=1.094,prev=2,n ext=2)

# temporal Denoise (Cnr2 already a little too strong...)
Cnr2(mode="ooo",scdthr=1.4,ln=35,lm=192,un=60,um=255,vn=60,vm=255 ,log=false,sceneChroma=false)
RemoveDirt(mthreshold=100,pthreshold=200,cthreshol d=150)

selectevery(5,2) # because of Depan

selectodd() # make 25 fps out of 50

# spatial Denoise (eDeen won't work on my AMD TBird)
deen("a2d",2,5,7)

# sharpen
LimitedSharpen()
warpsharp()
Unfilter(-3,-3)

mftoon() # sharpen black borders

UnDot()

AddBorders(20,8,20,8)

ColorYUV(levels="PC->TV")

ConvertToYUY2() # for CCE
__________________
Thanks & cu, grua

AVIL
26th April 2005, 12:15
Hi,

Perhaps you must give a try to MVDENOISE from MANAO. It is a motion compensated denoise very effective. Search in this forum for more information. You can postprocess it with FFT3DFILTER from FIZICK. Very good also. Get, again, more information in this forum.

Good luck.

lamer_de
26th April 2005, 13:02
For my likings, your result is totally overfiltered. You made a nice watercoloured encode. The only thing that's needed imho is deinterlacing and maybe moderate sharpening with limitedsharpen (read: not the default values). Also, using mftoon and limitedsharpen is total overkill. If you're after the linedarken capacity, use fastlinedarken. For sharpening, use limitedsharpen. There seems to be very little to zero grain or other noise (blocking, ringing), so the only additional filter would maybe something to change the colours a bit, cause atm it looks rather dull. But as I don't know the anime, I can't tell if the look is intended or a shortcoming of VHS. The above mentioned filters might help as well, especially the fft3d one.

CU,
lamer_de

Kagura
26th April 2005, 23:34
MVdenoise and fft3d are general purpose filters and not very effective on anime.

Rather, separate the luma and chroma components into 3 channels with greyscale, utoy, and vtoy. Then, process each channel separately. Do dehalo, sharpening, line darkening, antialias, anti-ghost, and moderate cleaning on the luma channel. Do heavy luma type cleaning on the chroma(supersampled) channels and then sharpen those up with sharpen(1).asharp(0.6,0,0).awarpsharp(4,1,bm=3,cm=0,thresh=0.99)

After that, join the three channels back together again.

This is, for me, up to this point, the most effective type of filtering on analog anime.

acrespo
27th April 2005, 13:12
@Kagura

Can you post a full example? I don't know the filters can do this steps too.

grua
27th April 2005, 18:07
@Kagura
Yes, full example would be interessting - sounds great but also very complicated ;)


In the meanwhile someone helped me on the german Doom9 board with this script and I must say it's a very simple kind of deinterlacing, but for this kind of VHS-anmie a very efficient one. And it also corrects chroma-shift:
x=4
y=2
avisource("orig.avi",true,"YUY2")
assumetff()
blur(0,1)
mergechroma(crop(0,y,-x,0).addborders(x,0,0,y))
levels(56,1,220,0,255)
#insert denoising and sharpening here
For Denoising I used this one in a first try and I think it's not so bad:UnDot()
Convolution3d(preset="animeHQ")
converttoyv12().Deen("a2d",2,5,7)Of course there would be better ones, like you told me - so I have read about them - but I think I can live with Conv3d and deen at this first step.

But very important for me is sharpening. You told me to use LimitedSharpen and FastLineDarken instead of mftoon, but I must say, that I didn't get very good results with LimitedSharpen but much better with mftoon:

LimitedSharpen(ss_x=2,ss_y=2,strength=100).Fastlinedarken(): http://web.utanet.at/grundlau/LimitedSharpen+FastLineDarken.jpg
mftoon(): http://web.utanet.at/grundlau/mftoon.jpg

I tried to tweak LimitedSharpens parameters, but didn't get the same results like using mftoon...

cu, grua

lamer_de
28th April 2005, 11:54
About LimitedSharpen strength:

For Smode=3, 0~100 is common, but 100~inf. can be used if necessary.
You could also change the smode. Or go down with the supersampling factor. Or set wide to true. Or change any of the other 20 parameters ;)
awarpsharp could be handy at moderate/huge strengths (10-26 maybe) as well, but you had that filter already.

CU,
lamer_de

grua
28th April 2005, 22:36
Yes, added awarpsharp after mftoon and I think, it's not so bad! Here's my script:AviSource("VHS-Anime.avi",true,"YUY2")

x=4
y=2

avisource("orig.avi",true,"YUY2")

# Deinerlacing
assumetff()
doubleweave().selectodd()
blur(0,1)

# Chromashift
mergechroma(crop(0,y,-x,0).addborders(x,0,0,y))

Crop(22,4,-18,-12)

# Denoising
UnDot()
Convolution3d(preset="animeHQ")
converttoyv12()
deen("a2d",3,7,9)

# Sharpen
AddBorders(4,0,4,0).mftoon().Crop(4,0,-4,-0)
aWarpSharp(depth=18.0, blurlevel=2)

# Colors
ColorYUV(levels="PC->TV")
tweak(sat=1.2)

AddBorders(20,8,20,8)

# YUY2 for CCE
converttoyuy2()And here're some examples:
http://web.utanet.at/grundlau/Original_1.jpg
http://web.utanet.at/grundlau/Filtered_1.jpg
http://web.utanet.at/grundlau/Original_2.jpg
http://web.utanet.at/grundlau/Filtered_2.jpg

cu, grua