Log in

View Full Version : how to "precisely" set Levels() ?


toraneko
27th April 2004, 00:52
I have a quite dark video source file.

As stated in AviSynth documentation, I tried to use VirtualDub's "Levels" as a GUI to the AviSynth's "Levels()".

I want to set "input_low" as high as possible, and "input_high" as low as possible, without losing any pixels (aka take off zero values at the two edges of the histogram).
But the histogram I get from the "sample video..." button isn't precise enough.
As a majority of pixels has a dark luma value, I can't see what is the highest non-zero luma value.

Is it a tool which can give me that kind of histogram, but with numerical values instead, please ?

scharfis_brain
27th April 2004, 01:06
you do not need the histogram.

just set the gamma slider to the left, then drag the black-slider to the right, until some areas of the images are getting saturated black.

then push the gamma slider to the right and drag the white-slider to the left until some areas are getting saturated white.

then set the gamma slider to something around 1.0

finished.

perfect levelling done.

hartford
27th April 2004, 02:29
If you want numbers, you can do this:

AVISource("d:\clip.avi").ConvertToYUY2
ColorYUV(Analyze=true)

toraneko
27th April 2004, 05:55
thanks for the answers, but such methods deal with images one by one (ala Photoshop and so).

then, I still need to find (is there a way ?) two images : one with the darkest pixels, and one with the brightest ones.

the advantage of VirtualDub's "levels" is that its histogram is a sum of (up to) all images in the clip.

that's what I'm looking for : a global knowledge of the luma value, its range of value/variation over the entire clip.

Mug Funky
27th April 2004, 09:13
you could use my AGC script, but any good results encountered while using it will be pure coincidence :)

it simply scales everything depending on the local luma range, like a VCR does (or a tape deck)

scharfis_brain
27th April 2004, 11:36
my method works well on video, too.

just scroll through the video, and look for oversaturated black or white.

perfect levelling out an analogue capture doesn't need more than a minute to me.
set the slider, go for another frame, correct them, recheck on some other frames. that's it.

toraneko
27th April 2004, 22:45
well... thanks again for the reply.

let's see if I'm lucky today. :D

trevlac
28th April 2004, 19:34
@toraneko

I have a little vdub filter that has an option to play a clip and track the lowest/highest levels.

More info here: http://forum.doom9.org/showthread.php?s=&threadid=72634

I don't think the above shows the option of how to show history on a histo, but it's on the vdub filter config screen. It shows the chart and numbers. Be aware, that the numbers are a loose max/min (if there are too few pixels vs the entire scale, they are ignored.)

Maybe this will help.

PS: I don't know what you want to do, but something to note is that the AVS Levels filter not only adjusts Y, but it also adjusts Cb,Cr at the same time. AKA, you can't lower black without desaturating the colors a little. The vdub one has a luma only option. I believe, Tweak in AVS can take the vdub numbers and give the same 'only luma' result.

toraneko
29th April 2004, 23:47
thanks for the info.

that's right. as soon as it comes to "technology" (in general), my English becomes quite poor. sorry for not being clear. :(

I just want to enhance a dark clip, with as few saturation as possible, either on dark places or bright ones, all clip long.

rfmmars
30th April 2004, 00:20
I haven't had the chance to try "AGC" yet. You might want to try using VD's EOD's "AUTO Levels". Don't let the AUTO scare you. This is the filter that I can't do with out!

richard