View Full Version : Temporal filters for greyscale captures
lpn1160
2nd December 2004, 17:05
I captured a film from satellite using huffyuv, the film is "A Thousand Clowns" from 1965 with Jason Robards, Barbara Harris, Martin Balsam, anyway during the captured I turned off the saturation in virtualdub [film is B&W]
I would like to know if there are any temporal or spatial filters for dealing with getting rid of any noise from such captures.
I will not[hoping I'm correct] Use #greyscale() during encode because there is no colour info anyway. Do the regular filters such as, #fluxsmootht()or #temporalsoften() work well with greyscale video??
Thanks heaps for any insight or info!!!
stickboy
2nd December 2004, 19:46
Originally posted by lpn1160
I will not[hoping I'm correct] Use #greyscale() during encode because there is no colour info anyway.There is not supposed to be any color information. In practice, there probably will be noise in the color channels...
Do the regular filters such as, #fluxsmootht()or #temporalsoften() work well with greyscale video??They'll work the same; they just won't have any effect on the color channels. (They still will spend time processing them, though.)
iradic
2nd December 2004, 20:03
take a look at removedirt ... its somewhere in this forum - search...
it has a 'greyscale' option which will discard any color info left in your source and it will not process it ...
it is a powerfull filter but use it with care ...
bye
hartford
3rd December 2004, 05:09
Avisynth has the filter Greyscale()
[edit]
Let me amplify:
If I cap a black and white, I use Greyscale() in my avisynth script.
Filters are up to you. I currently use Pixiedust at limit=2 with
LimitedSharpen, except for scenes with fog (mucho problema).
Didée
3rd December 2004, 09:08
Originally posted by hartford
.. Pixiedust at limit=2 with LimitedSharpen, except for scenes with fog (mucho problema).
Twin-Dust, Quad-Dust ... (like in this thread (http://forum.doom9.org/showthread.php?s=&threadid=78959), iirc)
Soulhunter
3rd December 2004, 15:26
Originally posted by Didée
Twin-Dust, Quad-Dust ... (like in this thread (http://forum.doom9.org/showthread.php?s=&threadid=78959), iirc)
As we're back @ this stuff...
Would something like this work ???
# QuadDust
function Dust1(clip clp)
{
clp = clp.isYUY2() ? clp : clp.ConvertToYUY2()
ox = clp.width
oy = clp.height
LoadPlugin("Dust1.dll")
clp.LanczosResize(ox*2,oy*1.2).Dust()
Lanczosresize(ox,oy)
}
function Dust2(clip clp)
{
clp = clp.isYUY2() ? clp : clp.ConvertToYUY2()
ox = clp.width
oy = clp.height
LoadPlugin("Dust2.dll")
clp.LanczosResize(ox*1.2,oy*2).Dust()
Lanczosresize(ox,oy)
}
function Dust3(clip clp)
{
clp = clp.isYUY2() ? clp : clp.ConvertToYUY2()
ox = clp.width
oy = clp.height
LoadPlugin("Dust3.dll")
clp.LanczosResize(ox*2.2,oy*1).Dust()
Lanczosresize(ox,oy)
}
function Dust4(clip clp)
{
clp = clp.isYUY2() ? clp : clp.ConvertToYUY2()
ox = clp.width
oy = clp.height
LoadPlugin("Dust3.dll")
clp.LanczosResize(ox*1,oy*2.2).Dust()
Lanczosresize(ox,oy)
}
function QuadDust(clip clp)
{
QD1=clp.Dust1.Converttoyv12
QD2=clp.Dust2.Converttoyv12
QD3=clp.Dust3.Converttoyv12
QD4=clp.Dust4.Converttoyv12
A=Overlay(QD1, QD2, mode="blend")
B=Overlay(QD3, QD4, mode="blend")
Overlay(A, B, mode="blend")
}
Tia n' Bye
Didée
3rd December 2004, 15:51
Originally posted by Soulhunter
Would something like this work ???
Principally yes. But averaging 4 Dust instances each of which works on ~200% of the original framesize - that's nothing but pure masochism ( "have a spare machine for the next couple of weeks?" ) ;)
BTW, that function won't ~really~ work, as it is now:
- you must not feed floats as resizing arguments - you'll get "invalid argument to ..." ( you're multiplying by floats. You need to truncate the result to integers, and Dust very much prefers MOD16 values)
- doubling frame width is more than dangerous when using Dust: above 1024*y you'll likely get errors in the picture.
Soulhunter
3rd December 2004, 16:06
Well, then this script wont work @ all... :(
- Is there a way to cut a picture in quarters or so ???
- How to make a "resize to the next multiple of 16" function ???
Bye
Didée
3rd December 2004, 16:18
Originally posted by Soulhunter
Is there a way to cut a picture in quarters or so ???Perhaps yes. You could give a try on the "crop" command :D
How to make a "resize to the next multiple of 16" function ???Make_x_MOD16:
round( float(x)/16.0 ) * 16
(actually I'm not sure if "round(x/16)*16" is the same, or if that'll do pre-rounding :o - the long way above is waterproof ...)
edit:
Soulhunter, it should be noted that your beloved way of feeding squeezed'n'stretched frames into Dust is not really optimal:
- the noise characteristics change by that way, especially by the upsizing. PixieDust is looking for noise with certain characteristics (from the name, guess which ;) ). By stretching the picture, you're fooling the poor plugin, and the single instances become less effective.
- I could also imagine that the motion estimation isn't working as good on a squeezed/stretched frame.
***
And all of a sudden, I remember to once have promised a full-fledged wrapper function for Dust ... ooops :o :o
Soulhunter
3rd December 2004, 16:45
Thanks for the info... :)
But dont you think my posted "stretch" example looks much better than the MultiDust one !?!
Originally posted by Didée
I remember to once have promised a full-fledged wrapper function for Dust... ooops :o :o
You could put a "PieceMealMultiDust" processing in the next version of iip... :D
Ok, I think this is enough offtopic talk now !?!
Sorry for hijacking the thread... :o
Bye
hartford
4th December 2004, 05:58
To solve the "fog" problem I used
Removegrain(mode=2).Removegrain(mode=2) plus a VDub Temporal filter.
Not as good as Pixie, but it was at the final scene of Casablanca. Anything else that I tried resulted in "halos" or "rings" in the fog scenes.
@ Didée
Don't know anything about that "twin-dust" stuff.
Didée
4th December 2004, 21:45
Originally posted by Soulhunter
You could put a "PieceMealMultiDust" processing in the next version of iip... Bah, iiP with PieceMealMultDust has encoded quite some stuff on my rig already. I just never dared to post it in that configuration ;)
Yep, sorry for OT.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.