View Full Version : Unfilter versus sharpen
jorel
21st November 2002, 06:53
can someone explain parameters ?:rolleyes:
(or :how to transform one thread in 3-part 3)
trbarry
21st November 2002, 18:50
jorel -
I'm not sure what you are asking. But for the parms to the UnFilter see www.trbarry.com/Readme_UnFilter.txt .
Or try again with a more specific question.
- Tom
jorel
22nd November 2002, 06:01
@ trbarry
i ever use unfilter,read all about,
but i don't know how it works.
i see the image clean in the preview and the final encoded
in dvd2svcd,.......resuming;
tweak filter works with color,hue,bright and contrast..
and Unfilter, work in "what parameters"?
what is the best(20,20 30,30) and
before or after another dll ?........(bilinear,convolution3d,...etc).
how it works?
thanks in advance!;)
wotef
22nd November 2002, 06:16
question - are you mad?
jorel
22nd November 2002, 07:00
Originally posted by wotef
question - are you mad?
oh God,"another one"!
Please,explain your "observation"!
thanks!:rolleyes:
Guest
22nd November 2002, 14:02
I'm mad, and proud of it. :D
Jorel, the parameters are explained in the readme file Tom linked.
The other information you asked for can be gleaned from the original thread:
http://forum.doom9.org/showthread.php?s=&threadid=28197&highlight=unfilter
Finally, you must know that there is no answer to the question "what is best"?
Abond
22nd November 2002, 16:32
@jorel
Well, I am far away of understanding how exactly from theoretical point of view is working UnFilter, but may be I will say what I understand at all for, and may be an attempt to put together your part2 and part3;) .
My first understanding come from what trbarry wrote, when announcing the filter for first time:
Now previously I tried a number of times to use the built-in Avisynth Sharpen filter but it always crashed. But yesterday I read here (somewhere) that it was fixed in the 1b7 Avisynth release I'm now running, so I thought I'd try it. It did indeed work and looked pretty good, but it seemed very slow.
So I've ported some of my DScaler code that does a similar thing and released it today as an Avisynth filter, UnFilter.dll.
UnFilter is a simple and reasonably fast Avisynth Soften/Sharpen filter.
.....
It implements 5-tap user adjustable horizontal and vertical filters...
When softening, the UnFilter will attempt to approximate the inverse of a simple 3-tap edge enhancement filter. When sharpening it will attempt to approximate the inverse of a simple 3-tap softening filter. (bold is mine)
Well, for me seems that Unfilter is more than simply sharpening filter but also smoothing filter (Conection to TemporalSmoother;)). This seems to be an Universal Filter - from here the name UnFilter (trbarry?-Am I wrong?:D). Compare to the Sharpen it obviously doing the same thing, but quite faster. Another quote:
This was interesting because it still seems to run faster with 5-6 UnFilter's instead of one Sharpen command...
How in sharpening - reverse the softening. How it softening - reverse the edge enhancement. The most interesting is when one put negative and positive values in one Unfilter(-XX,YY). I may imagine the situation when you have several horisontal bands of diferent color. Then the horisontal softening will produce more uniformly distribution of the color, and vertical sharpening will make the borders between the bands more sharp. The opposite should be when you have vertical bands - unfilter(XX,-YY). (Well, here I might be wrong). A bit thinking in that direction might lead us to understanding that in case of strong unfilter(XX,-YY) might be seen some deinterlacing effects (and here I am probably totaly wrong:D ).
Well, I hope this not very clear thoughts may help to your better understanding of UnFilter. BTW, you wrote in part1;) that you are using TemporalSmoother and UnFilter. Well try with UnFilter(-,-) and UnFilter(+,+):)
Greetings.
trbarry
22nd November 2002, 18:07
This seems to be an Universal Filter - from here the name UnFilter (trbarry?-Am I wrong?
I really had no thoughts of "Universal". IIRC, Unfilter got started on an old thread on the AV Science forum where we were discussing how to remove excessive filtering in DScaler. So I just named it UnFilter because it (somewhat) can Un-Filter (DeFilter? reverse filter?) something that has been filtered too much.
I guess I was remembering the old 7-UP ad's where they were calling it the Un-Cola. ;)
The real issue at first was that most video had been vertically filtered because they expected it to be displayed on an interlaced display, and wanted to avoid aliasing artifacts. But if we are going to be IVTC'ing or deinterlacing to create progressive material then it would be nice to remove that excessive filtering.
But since just changing one sign in an equation turned it into a softening filter it seemed useful to also try to remove edge enhancement.
- Tom
Marc FD
22nd November 2002, 18:18
>> run faster with 5-6 UnFilter's instead of one Sharpen command..
BTW, Sharpen2 should be almost as fast as Unfilter now ^_^
scmccarthy
22nd November 2002, 19:07
The real issue at first was that most video had been vertically filtered
@tom
What would undo the vertical filtering you refer to, UnFilter(30,0) or UnFilter(0,30)?
I get confused by what is meant by vertical and horizontal. If you could use the word scanline instead, I would understand instantly.
jorel
23rd November 2002, 01:19
;)
@neuron2
you wrote:"I'm mad, and proud of it."
me too! thanks you bro!....and for the link.
@Abond
very good explanation,
thanks for your attention "wise boy" !!! :)
@trbarry
thanks too master,unfilter is fantastic,
and your work too!
@Marc FD
Sharpen2 is fast and good too!
i'm searching for a good explanation.thanks.
@wotef
c'mon friend,this is a place
that have tons of genius,
and they understand a "mad" ! ;=/
in few answers ,lots of wise.
see the explanations?
you learn some too!
:p
wotef
23rd November 2002, 02:11
hehe, we ARE all friends :p
i think you just lost something with the translations in your various posts, i know the feeling
trbarry
23rd November 2002, 02:26
If you could use the word scanline instead, I would understand instantly.
"scanline!" ;)
- Tom
trbarry
23rd November 2002, 02:30
What would undo the vertical filtering you refer to, UnFilter(30,0) or UnFilter(0,30)?
scmccarthy -
It's UnFilter(H,V) so it's the 2nd one. Unfortunately this can also amplify interlace artifacts if any exist, so it has to be used with care.
- Tom
-h
23rd November 2002, 03:20
"scanline!" ;)
Ha! Brilliant, I didn't see that coming.
-h
scmccarthy
23rd November 2002, 07:29
Vertical filtering blends the scanlines and UnFilter(0,30) would sepatate them again. And I would call that horizontal filtering. UnFilter(-30,0) seems to sharpen the filter. I call that vertical filtering, but it is horizontal filtering. Vertical and Horizontal resolution causes the same confusion.
Again, I never am sure what is being refered to until someone can use the word scanline meaningfully in a sentence. Usually scanline is equivalent to vertical even though that makes no sense since scanlines are horizontal.
@tom
OK, so in the UnFilter readme, you say:
Since DVD's were intended originally for interlaced displays this has caused content providers to vertically filter them even a bit more to hide interlacing artifacts.
My interpretation of that is that interlace artifacts refers to combing and blending the fields together hides the artifacts, therefore vertical filtering is blending the scanlines. And that is conterintuitive because I consider scanlines to be horizontal. So you can see that in this context I might interpret it that way and still be a little uncertain?
So, in other words, short version, just use scanline in a sentence.
trbarry
23rd November 2002, 16:59
Think of vertical filtering (softening) as averaging the pixels of one horizontal scanline with the pixels directly above and below the target pixels. Like smearing the image by moving a pencil eraser vertically, up and down on the screen.
And horizontal filtering would be averaging (of some sort) each pixel with other near pixels on the same horizontal scanline, left and right.
Then again maybe I have my terminology backwards. It wouldn't be the first time. ;)
Note the vertical filtering for interlace could (and probably should) blend only scanlines from one field so it does not blend pixels from 2 different points in time. But UnFilter should be used after IVTC or deinterlacing so then it can use all the lines.
- Tom
scmccarthy
23rd November 2002, 17:39
No, I do not think you have your terminology backwards, it probubly is parallel to the horz. and vert. resolution that always confuses me.
What I do think is that your explanation in the UnFilter ReadMe is about one sentence too short, because it is easy to get confused about what horz. and vert. filtering is. It makes sence to me that vertical filtering works on the frame column by colomn with the end result being that the scanlines are blended or separated from each other depending whether you are soothing or sharpening. I think this is what most of us already assume vertical filtering means.
Marc FD
23rd November 2002, 17:57
>Think of vertical filtering (softening) as averaging the pixels of one
>horizontal scanline with the pixels directly above and below the target
>pixels. Like smearing the image by moving a pencil eraser vertically, up
>and down on the screen.
>And horizontal filtering would be averaging (of some sort) each pixel
>with other near pixels on the same horizontal scanline, left and right.
cool, that's exactly how i always understood it ^^
sorry, but why do you want to use the term of "scanlines" ? most of the filter are dealing with (or assuming) progressive sources. for me, vertical and horizontal filtering is very easy to understand. how can you say that more simply ?? using scanlines is only confusing me.
maybe i'm too young ^__^
Cheers,
MarcFD
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.