View Full Version : Using a Histogram
ses
18th March 2004, 20:48
Hi Folks,
A while back, I found a very good guide for using a histogram to adjust the color and contrast for recording VHS tapes in AVI format. I had thought that I copied the URL amongst several other Internet guides that I had pasted into a Word file for future reference. Apparently, I did not add that one as it doesn't seem to be with the other guides. Now, I have not had any luck in trying to find it on the Internet.
Does this ring a bell with anyone? It was very good, I wish I had not been so careless.
jggimi
18th March 2004, 21:49
I found this link by using http://forum.doom9.org/images/top_search.gif: http://forum.doom9.org/showthread.php?s=&postid=358816&highlight=histogram+AND+guide#post358816. I hope it's what you're looking for.
trevlac
19th March 2004, 15:52
I get 404s when I try Luke's site. Ivo mentioned his stuff last week and I tried to re-read it. No luck then, no luck now.
Personally, I don't think you should adjust the brightness/contrast settings on a capture driver (if you have another option). This is because 1)The vdub chart is a bit crude 2)The changes are done in digital and it's not always clear what the driver is doing 3)Live video is constantly changing, making it hard to find black and definately white.
Anyhow ....
A histogram is simply a chart of the pixels in a video frame. Pixels have a brightness value between 0 and 255. A histogram is a bar chart with one bar for each value 0-255. The bar height represents the count of pixels with that given value. Zero is on the left and 255 is on the right.
The idea behind improving the picture is that you want black to look black and have the widest range of values as possible, without running the ends off the scale. For example, if your entire picture had values between 100 and 200, there would be no black (the picture is too bright). Almost every picture has some black. Also, even though there are 101 different values between 100 and 200, your eye sees the detail better if they are spread out some (contrast).
So ....
In theory, you should lower the brightness until some black is zero. You don't want to lower the brightness too much because you will then make the dark blacks (say 0-16) all the same (zero) and you would loose any distinction between them (detail in the shadow). NEXT you raise the contrast until something white is 255. Here you have to be more careful because every frame is not going to have bright white. If you do your setup based upon a dark room, when they turn on the lights, many things may run off the top of the scale. Regardless, you have to be careful. Metal/glass reflections, white logo letters, lightbulbs, are things that could hit the top. If you want room for these, you have to have other things lower.
Problems ....
Using a histogram on source that has black borders makes it hard to tell the value for black in the picture. Don't assume borders should be 0. They may need to be -9 (off the scale). It's very hard to set the very high white. Impossible on a moving picture. This should probably be set a little low. Your eye can't see the difference between very bright objects as well as the difference between mid range objects. So too much very bright stuff is not good for visible detail.
What to do ....
Well, that should get you going. Personally, I set the capture setting to default (hopefully this means not digital change). I then look at the source with vdub and a waveform chart. Avisynth's built in histogram is really a waveform chart. It gives more detail than a histogram. The Doom9 capture guide has a section on using this.
Hope that helps... :)
ses
19th March 2004, 21:50
Thanks!
I guess there is a limit as to just how well one can reproduce a VHS recording in digital format. I use the iuVCR program and TMPEG for compressing and have gotten fair results. But when there is lots of color in the picture, the image always looks so "dirty" even with the use of filters. I have tried turning down the color intensity in iuVCR and some "on the fly" mpg programs such as Win DVR, but everything looks so pale then.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.