Log in

View Full Version : Experimental: Video2Wallpaper, a resize and cleaning filter


dbzgundam
19th February 2004, 04:47
It's glitch free, but lacks optimization for different sources. This is mainly for low noise, high detail sources. It's also meant more for anime, although I haven't tried it on live action, so please give me some responses.

I made the filter, to help get rid of the lack of HQ source pictures for things like, wallpapers... Especially anime, where HQ stuff is all saturated, sharp, and has nice poses and such. I found that lots of this was ONLY found on the episodes and not found in online pictures or books and such... Originally I was going to use Mf's SharpResize but that ended up thickening the outlines a little much; so I apted for lanczos's softness. The script can't be used as a function yet (unless someone wants to help make it work that way) and require a few external filters to work.

AVISource("...")

##Pre-Cleaning##
awarpsharp(depth=17)
Tweak(bright=-1)

##Upscaled to Clean##
LanczosResize(1280,960)
ConvertToYUY2
_2DCleanYUY2(5,5,3)

##Edge Enhance Reduction##
FixVHSOversharpL(30,12,8)
FixVHSOversharp(30,14,10)
FixVHSOversharp(30,12,8)

ConvertToYV12

##Upper Level Sharpening##
awarpsharp(depth=20)
xsharpen(35,35)

##Downscaling##
LanczosResize(1024,768)

##About##
# This script isn't very optimized for low quality sources, as it was meant to fix
# up high quality sources with a little edge enhancement. (white halos) Although, if you wish
# I'd recommend adding an mftoon in the 1280x960 area, right before 2DClean. Settings are all
# up to you but these should work on detailed TV sources and DVD sources.)

Basically I tried to upscale to a REALLY high res (1280x960....4x3) and then lower to a high but slightly lower resolution.(1024x768) I wanted the cleaning filters to work on a higher level to clean out more noise and blocking.(that's what I thought would work best anyway) I found that the source I used had lots of halos and edge enhancement on it so I used FixVHSOversharp to help reduce that. I guess you can turn it off but what I really suggest on almost anything aside from DVD, is mftoon.

Anyway, it worked well for me....remember it's more for withdrawing the frame in Vdub after it's been filtered to get good sources for wallpapers...But I guess if you want you could encode with it. :D Please test it out!

Btw: If you wish to add mftoon, I suggest these settings, along with a reduction in both awarpsharps.

mftoon(cwarp=false, wdepth=0, xstren=50, ustren=50, strength=150)

Oh yeah one final thing... Here are some samples of it in action!

This one is DVD source, with mfToon added in
http://www.esenet.com/baka/enlargedDVD.jpg

As is this...
http://www.esenet.com/baka/enlarged2DVD.jpg

THIS is TV source, blocking was pretty low but it had all sorts of weird edge enhancement which I used FixVHS for. (Although it didn't help too much even on this...But not many sources have this problem if they aren't VHS)
http://www.esenet.com/baka/enlarged3TV.jpg

Sorry, but I had to! Here's a comparison between LanczosResizing and "Video2Wallpaper" resizing! With lanczos you can easily see MPEG2 compression (it's DVD source so you'll have to look a bit) and it's MUCH blurrier than the V2W method. I myself am quite impressed with the results!

http://www.esenet.com/baka/comparison.jpg

And here's an example at the 1280x960 level! (Filtering done at the 1440x1080 level)

http://www.esenet.com/baka/comparison2.jpg

dbzgundam
19th February 2004, 20:41
Nobody wants to try the filter?

MfA
19th February 2004, 21:44
Shouldnt this be on the usage board?

Just a comment looking at the images.

Well the haloing/color-offset is gone ... but even though it might be an esthetic choice, I prefer thick smooth lines over thin jaggy ones (maybe thin smooth ones would be even better, but they arent here to compare).

SoonUDie
19th February 2004, 23:33
I thought it was interesting, so I intergrated parts of it into my own all-in-one filters (handles YUY2, YV12, and RGB (perfect for resizing .jpgs and the like)).

Personally I don't like aWarpSharp because it was buggy last time I tried it.

When I used _2DCleanYUY2() it left luma artifcats (vertical lines), and also blurred too much detail for stuff I'm currently working on.

I have to say, your example resizes look *very* good. It would be cool if you could provide the original non-resized images too ;)

dbzgundam
19th February 2004, 23:47
Heh, I know nothing about programming! I was lucky enough to think of this. What I would suggest, if the lines are jagged, is to reduce both awarpsharp values; or get rid of the latter awarpsharp. (right before downscaling)

Another thing that I found leads to deformation is if you have awarpsharps along with mftoon's settings. Also, 2DCleanYUY2 seems to thin out a bit so you could try something like (3,3,3).

Remember this wasn't really meant for encoding, as I also found out since some of the filters stress out the image...I made it to withdraw individual frames from filtered video and use them for wallpapers. :p

I guess if it could be more fine tuned, (and not to mention turned into more of its own filter, rather than multiple external ones) then it would suit encoding. Another, not so interesting thing is that it really sucks on HD level live action. Although, with low level settings it seemed to filter out DVD resolution material quite well.

A nice bonus you get with this, is that since the EE and Halos are removed, you can add a little of your own edge enhancement. Like .30-.80 on the sharpen scale. But like I said the thing that mostly ruins ANY video is the warpsharping. I suggest lowering them to your taste, especially the later awarpsharp.

Anyway thank you for your feedback, and as soon as I get back to my normal computer, I'll get source pictures.

For live action, another thing I'd suggest is either lowering _2DCleanYUY2, or removing it all together and using a different cleaner.

Oh one more thing... The settings I used for those DVD pics had both awarpsharps at 12, (perhaps lower) and had Mftoon at strength 200. Also the xstren and ustren of mftoon were lowered to 20. (Xsharpen tended to boost some broken and jagged lines so I would suggest lowering it on most material)

Actually here......Now that I'm back, here's the original source.

http://www.esenet.com/baka/original.jpg

Richard Berg
20th February 2004, 06:15
Moving to usage...

RadicalEd
20th February 2004, 06:38
Hmm.. I'll have to try it out in comparison to my version (http://forum.doom9.org/showthread.php?s=&threadid=68494&highlight=mftoon) :p
Actually, I never did get around to testing that with real DVD sources. This'll be a good opportunity.

[edit]
Nice. It made the image I was working with look weird, but it was much better for your image. I got your script looking a bit sharper just by using deen as a replacement for 2dcleaner (was too lazy to seek it out on my hdd :P).

mf
20th February 2004, 15:57
Tried SangNom yet for upsizing? ;)
http://lsoust.hypermart.net/sangnom-upsize.png

Edit: the above image is cheated btw, it's a combination of SangNom and XSharpened Resize. Also, the filters conflicted with eachother in memory space with the huge image sizes, so I needed 2 intermediate files to get the above image. The haloing is from mfToon - BAD filter! I'll have to whiplash it for doing that.

SoonUDie
20th February 2004, 16:12
Looking good MF (Maburaho rocks!), but can I impose upon you to offer the original image and your script as well? I'm half-working on my own anime filter, and I like to compare it with others... :)

morsa
21st February 2004, 01:20
for upsizing ,please use edge directed interpolation filter by Avery Lee.Look for it at Vdub forum.