Log in

View Full Version : Need help with last step in a filterchain


Chainmax
14th February 2006, 19:34
Not much to say here. Screenshots:

Before:
http://img102.imageshack.us/img102/2943/sourceimage8db.png (http://imageshack.us)


After:
http://img148.imageshack.us/img148/5017/filteredimage1qs.png (http://imageshack.us)


As you can see, the filtered image looks considerably less vivid. What should I do to make colors and brightness closer to the source image's?

Richard Berg
14th February 2006, 21:43
Use Levels(...).Histogram(mode="levels") to set the black & white levels correctly. Adjust the saturation with Tweak(sat=1.2) or similar.

Chainmax
15th February 2006, 13:22
Having never used Levels(...).Histogram I am at a loss at how to proceed. Could you please expand your answer or link me to a guide?

Didée
15th February 2006, 13:41
Reminder: don't forget about this (http://forum.doom9.org/showthread.php?p=709492#post709492) ... (problem & partial solution)

Chainmax
15th February 2006, 14:14
Thanks :). I'd have to use pc2tv_smooth() here, right?

Wilbert
15th February 2006, 15:01
Having never used Levels(...).Histogram I am at a loss at how to proceed. Could you please expand your answer or link me to a guide?
1) http://www.avisynth.org/Tweak
2) analog capture guide

Chainmax
15th February 2006, 15:36
Thanks for the links, but I know how to use Tweak and I already read the capture guide's section 7.2.9.1, but color Adjusting the brightness and contrast uses VideoScope, not histogram and is not explained nearly as clear cut as Adjusting the brightness and contrast.

Wilbert
15th February 2006, 15:58
fixed it for you :)
but color Adjusting the saturation and hue uses VideoScope, not histogram and is not explained nearly as clear cut as Adjusting the brightness and contrast.
Yes, ok. First you should look at whether the hue is good or not. Since the skin of people and the other stuff in the screenshot have the correct colors flavors, the hue is good. Then you should look at the saturation of the colors (*). As you say it's less vivid, so you crank it up a bit with Tweak.

In v2.60 you will have the possibility the crank up only certain hues, as well as some visual help with Histogram(mode="color2").

(*) Which applied filters resulted in less vivid colors?

Richard Berg
15th February 2006, 18:21
Could you please expand your answer or link me to a guide?

Pretty much every Avisynth guide has a section on setting levels. Basic idea: start with Levels(16, 1, 235, 16, 235). Adjust the 1st & 3rd parameters until the histogram shows you're just about to clip detail at both ends. If that makes the image look subjectively wrong, adjust the 2nd parameter to fix gamma or add Tweak to fix hue/sat.

Reminder: don't forget about this ... (problem & partial solution)

It's only a problem if you do sharpening after Levels, right? I do Levels (YLevels, actually) & Tweak at the very end.

foxyshadis
15th February 2006, 21:27
Another way is to export to photoshop/gimp/YourFavoriteImageEditor and adjust to your liking with preview, then scale the range you get to 16-235 (gamma might need a bit of manual tweaking unless you want to break out the calculator).

Didée
15th February 2006, 22:54
The histogram's discontinuities introduced by levels/tweak mostly are a minor issue when these adjustments are made as the last step in processing, that's true. However it might become a problem ...

... if other processing is done after levels/tweak, in particular sharpening

... even if it's the last step, it might enhance banding effects or similar in low-contrast areas. In particular dark areas are dangerous, even more so if gamma adjustments with gamma > 1.0 are done.

In this particular case, it's probably the most minor problems of all :D
I just thought it should get mentioned once more ... lately, tweak() seems to get advised more often again, and for sure it's adviseable to know what's actually happening.