View Full Version : Smoothing an Aliased Source ...
oo_void
17th November 2004, 19:13
On another site (the www.originaltrilogy.com (http://www.originaltrilogy.com/) restoration forum), I can across what seems to be a nifty little process to remove some of the aliasing artifacts inherent from LD transfers. And, before anyone asks … the artitfacts are definitely in the source and not the byproduct of an IVTC process or any other filtering. Using SangNom, the video is processed as such:
# Upsize the Source ...
Lanczos4Resize(704, 544)
# Grab off-setting pixels(?) ...
top = SangNom(order = 0)
btm = SangNom(order = 1)
# Overlay the offset images on top of each other ...
top.overlay(btm, opacity = 0.5)
# Resize back down to native resolution ...
Lanczos4Resize(704, 272)
The results are quite impressive at first glance, but the bottom line is that this is a blurring operation of sort. Though the implementation is quite cleaver and there is some limit to the blurring, the result is a lose in overall image information. I’ve tried many of the other anti-aliasing techniques posted on this site, but they seem more suited towards treating dark areas of an image or lines in animation sources. I’ve also tried tritical’s TIsophote, but the results are much too hard for my sources.
The question is, is such a function sound, meaning… this is the best I can expect given the source, or are there other methods worth trying? Maybe trying an edge mask and only treating that? Anyways ... here’s are links to the unprocessed and processed source:
Un-Filtered (http://www.badassgeek.com/un-filtered.png)
Filtered (http://www.badassgeek.com/sangnom.png) (with Sangnom)
------
oo_void
Mug Funky
18th November 2004, 01:52
an edge mask certainly could help.
i don't think that artefact is inherent in LD transfers as such - i just think that particular one wasn't filtered properly when it was transferred from film. usually they should have a lowpass done to stop the stairstepping, but this can only be done before it is scaled to SD resolution.
i don't know much about LD... was the source anamorphic and then scaled down in the LD player (using some kind of point resize)? if so, then a re-cap at anamorphic would probably solve this. if not, then the AA script + edge mask is probably as good as it's going to get.
akupenguin
18th November 2004, 01:56
Short answer: antialias == lowpass == blur
If you have a good model of what the source should look like (implicit in sangnom, though it might not actually match your movie), and a model of what distortions are added (you say it's part of the LD transfer process, so it could be studied, though I don't know if it has been), then you could come up with something better than a blur. But there is no general solution.
JanBing
18th November 2004, 13:14
That SangNom-process over at OT.com was posted by me (I'm "Laserschwert" over there).
For those LD-caps I scaled the image up to about 200% vertical size, applied the two SangNoms, overlayed them, added a LimitedSharpen and scaled it back down to the desired size. The LimitedSharpen compensated for any blurring caused by SangNom, and even resulted in a sharper image than before.
By the way, the LD-caps (at least the "Star Wars" ones) weren't anamorphic, so you can't get a better capture than that. I am not sure, if the LD-standard allows for anamorphic images at all... it's been long before 16:9 TV-sets.
Karyudo
20th November 2004, 19:47
I'm on OT.com, too, where I'm... Karyudo. Surprise, surprise.
I like the whole idea of using SangNom() to reduce crappy anti-aliasing, but one notable byproduct was a fairly heavy obliteration of star fields. Unimportant if you're transferring "High Noon", but maybe of interest in our common project...?
One could use selective filtering (i.e. SangNom on this chunk of frames, but not on that other chunk), but there are scenes (e.g. sharp-edged SD flyovers) which could use SangNom but contain stars.
Any ideas?
(BTW, I'm thinking of starting my own OT.com thread, but I don't really want to have to deal with all the nearly-off-topic posts that will inevitably show up. I'd rather work in general terms for the moment -- like we're doing here. But I'm a big fan, Laserschwert! I'd hope you'd participate in any thread I started, like you have with zion's.)
Karyudo
21st November 2004, 01:21
P.S. There are a very limited number of "squeeze" (AKA anamorphic) LDs, but in general LD was 4:3. However, LD featured widescreen releases long before they became popular (?) on VHS, and definitely before DVD came on the scene.
oo_void
22nd November 2004, 20:29
Alright, given that I know nothing about using the Convultion Matrix, one should take this function with a "grain of salt", but here's an attempt at edgemasking the SangNom anti-aliasing function. Accepts one parameter, "UseEDI" utilizes tritical's FastEDIUpsizer should you have the plugin installed. No checks made that the clip is a valid mod4 for Lanczos (Maybe in the next iteration). Comments are definately welcome ...
function EdgeSmooth (clip clp, bool "UseEDI") {
UseEDI = default(UseEDI, false )
src = clp
# Create the edge mask (I have no idea what this is doing ;) )...
edg = DEdgeMask(clp, 0, 255, 0, 255, "5 10 5 0 0 0 -5 -10 -5", divisor = 4, Y = 3, U = 1, V = 1)
edg = blur(edg, 1)
# Double size the clip for processing ...
UseEDI ? FastEDIUpsizer(clp).Lanczos4Resize((clp.width / 2), clp.height) : Lanczos4Resize(clp, clp.width, clp.height * 2)
# Filter the clip ...
top = SangNom(clp, order = 0)
btm = SangNom(clp, order = 1)
clp = top.overlay(btm, opacity = 0.5)
# Rescale the clip back down for merging ...
Lanczos4Resize(clp, clp.width, clp.height / 2)
# Return the merged clip ...
return (MaskedMerge(src, clp, edg))
}
Enjoy ...
------
oo_void
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.