Quote:
Originally Posted by jimmyz80
most of the time my captured video is overly bright. I started trying to figure out which component in the system might be causing this, or whether it was the tape itself.
|
The black borders, border noise (head switching, etc.) affects the histogram. More on this, below.
Quote:
Originally Posted by jimmyz80
One really basic test I did was to just view the AVT-8710 color bars in Virtualdub capture mode, and then turn on the live histogram. I attached two screenshots of this test, and you'll notice that the white color bar is being captured in the unsafe zone according to Virtualdub. I'm assuming this region represents RGB 236-255?
|
The safe zone is equivalent to RGB 16-235. More on this later, but the AVT patch isn't an accurate or conclusive test. It might tell you what the AVT is doing (it usually raises gamma, as most users know, and no TBC is perfect), but nothing about the incoming content. YUV represents the way video is
stored in most standard formats. RGB represents the way it
displays. YUV is almost always expanded in RGB at both ends, whether TV or PC. Actually in YUV there's no such thing as "RGB" -- it's all translated via various matrices. The U and V channels store red-ish and blu-ish and blend into each other. Green is derived from subtracting U and V values from the luma component.
Quote:
Originally Posted by jimmyz80
So here's the first real question. Assuming I'm capturing to HuffYUV will everything in that red zone be crushed into one value (235), or will the full range be preserved but playback devices will crush the whiter than white values?
|
Most YUV colorspace schemes have a wider gamut than RGB. YUV can store luma/chroma values exceeding RGB 0-255. In some YUV systems, the equivalent of RGB greater than 0-255 can be stored, but RGB can't accept all of it. Crushing (darks) and clipping (brights) will occur during translation. Crushing and clipping are interchangeable: they mean the same thing. Characterized by detail disappearing at both extremes and changing color. Example: "White" contains equal proportions of all three RGB colors. If Red and Green lie within RGB 255 (or 235, depending on the playback medium). but blue exceeds those values, high blue gets clipped and white turns yellow (red + green), not to mention lost detail that can't be recreated. Crushed blacks have similar problems.
Quote:
Originally Posted by jimmyz80
What I'm really trying to figure out, is whether I need to adjust the input brightness "in hardware" to keep that red zone empty, or if it's safe to leave video reaching into the red and just scale the brightness levels later with an AVIsynth script. If the whole range is preserved, and assuming my playback will be on a PC 99.999% of the time, wouldn't it provide a higher dynamic range to just use the whole range including the red zones?
|
Stuff filling the red zone is stuff that will be destroyed (crushed or clipped) in RGB display, and can be pretty destructive even in YUV. No, clipping of darks and brights doesn't mean more dynamic range, whether it's standard video display or "PC" mode. It means less dynamic range in the final display. You can't correct with good dynamic range if 20% of the dynamic range has been cut off. The results will look flat and dull. A little touchy-kissy inside the red zone is usually not bad and is usually black border or border noise, but stretching to the widest borders for the core image content is a no-no. You can retrieve a little data using the PC matrix, but many RGB 16-235 systems will clip sooner than PC-matrix will. Look at it this way: if YUV says you already have RGB 255, what do you think will happen in any mode when RGB 255 is expanded? There are enough UTube videos showing what happens when YUV 0-255 is expanded in RGB. Frankly, RGB zero looks rather grimy, even on a PC. Media players don't always treat that range the same way.
Quote:
Originally Posted by jimmyz80
Now for the sake of taking this a step further, let's just assume I'm supposed to keep things out of the red. I've tried adjusting the settings on both the ATI USB 600 and on the AVT-8710, and both can accomplish the goal of keeping the red zone empty. Is there any preference as to which device I should use for such an adjustment?
|
It's 1000% easier to use the ATI600 controls.
Quote:
Originally Posted by jimmyz80
Also it seems both Brightness and Contrast settings can accomplish this goal on either device. Dialing down the brightness seems to just slide the histogram to the left, which seems to throw away shadow detail. Contrast seems to scale the whole histogram range horizontally, preserving the shadow detail. To me this seems like a Contrast adjustment would be the least destructive?
|
With most proc amp controls,
brightness raises or lowers the black level. It also affects brighter areas, but not as much as it shifts the darks left or right.
Contrast raises or lowers the white level, a term that refers to the brightest whites but includes the general luminance of the brightest areas. As you've seen, the two controls affect each other somewhat, so some fiddling is required. You find that home made tapes usually fall into a certain range of settings, while tapes off tv or from retail usually fall into a different range.
Black borders are always in the red at the left, along with some darker components of the head-switching noise. Bright edge fringes and whites in head-switching noise are always in the red at the right. That's why the Crop control is used to temporarily remove those edge areas from the incoming image so that they don't throw off your histogram. Before you start capture be sure to re-set cropping to all-zeros. Just removing the check mark from "Crop" doesn't turn it off. Otherwise you get get the wrong image/frame relationship and will have aspect ratio problems later. Take it from one who once made a lovely capture with perfect levels, but the wrong image ratio for 90 minutes because I left cropping turned on!!!!!
What you can adjust is a
range of brightness and contrast. Sometimes content creeps a little into the red at either side of a histogram. You can't prevent that entirely, but you don't want the red area filling up or crashing against the side walls. After a while you get a feel for most tapes, which tend to play with a certain brightness/contrast range -- there's some variation, but you soon get an idea of the worst-case scenario, which is what you set your controls for and where now and then you have to accept a little occasional overflow.
Things like oversaturation from good players aren't usually a problem, but lesser players juice up saturation and contrast. More saturation means a wider dark-to-bright range, in case you run into that problem. I had some poorly mastered retail tapes with that issue.
If you're trying to correct color balance from analog tape during capture, you're in for a continual hassle, even with a well-adjusted monitor. Analog tape changes color balance every few seconds. Add the effects of typical consumer camera AGP and AutoWhite, and it's like trying to fight off a swarm of The Birds with a fly swatter.
Lordsmurf's comment on monitors, especially the aspect of calibration, is one very good reason for not depending on what your eyeballs tell you. It's not possible to make conclusive judgements about video using uncalibrated monitors, and it's not possible to calibrate them accurately by eye. Your eyes might tell you something's not right about a certain video or graphic, but they can't often tell you why it's incorrect.
Be careful about using free monitor test charts off the internet. Some are helpful, but CRT's and LCD's display these patterns differently. Likely you know that all monitors change color balance and gamma levels with aging. This includes LCD's. But in a pinch, since there are so many bad test charts around, you could use some of the test panels from
http://www.lagom.nl/lcd-test/. Yeah, they're LCD charts, but better than nothing. The blank-to-white gradation panels would be fairly useable. Most monitors don't have a separate gamma adjustment. Usually you have to make do with brightness and contrast controls. PC monitors are usually set up for a gamma of 2.2. Some use lower gamma like 1.8, which brightens darks. Often this is done to look for noise, but it's set back to 2.2 later because a video corrected with low monitor gamma will look too tame on most displays.
The only for-sure, accurate way to calibrate a display is to use a colorimeter and software designed for it. Yeah, they charge money for that stuff, from a c-note to a couple of c-notes to a pile of c-notes (the latter for techs who charge lotsa money to do it for you). The cheaper kits are OK if you can live without a bunch of special features -- which most people can do -- and the cheap ones use the same probes as more pricey kits. Spyder and XRite/i1 are the favorites. I get a little piqued at Spyder being less accurate than Xrite probes, but you're talking about "errors" that exceed some pro testing expectations. A color error of 4% in certain color ranges from a Spyder isn't nearly as bad as the typical color errors of 15% to 25% from most monitors, and up to 50% for aging sets. For most people, if colors are off by 3% or more they don't look entirely "accurate", even if the seer can't explain exactly why. By 6%, many housewives searching for wallpaper matches can accurately tell you that the errors are obvious. Even worse are the typical monitor errors of 200% for brightness and contrast, and gamma is nowhere near the way people see stuff in the real world -- it's closer to the way managers want to sell monitors in retail showroom lighting. Here's a glance at a website that knows how to check out monitors and calibration, to give you an idea of how mainstream kits work:
http://www.tftcentral.co.uk/reviews/...e_display2.htm...and why even a $100 kit is far better than eyeballs.
What will surprise you about these calibration kits and many test charts is that gray test patches are used to correct both gamma and grayscale. Why? Because every shade of "white" from black thru gray to bright white contains all three colors in equal portions. If those blacks-to-white look correct, all 3 colors are in balance. The other hues will fall into place. Another trick about these test kits: after working the gray scale, the kits usually display multiple shades of colors -- reds, greens, blues, then yellows, magenta, cyan, then tertiary browns, oranges, purples, etc., varying in brightness. Why? Because typical monitor controls don't get hue and saturation levels correct across all ranges from dark to bright. The software creates a monitor profile that helps your graphics card display those ranges correctly at all levels.
When correcting color for captures, first test to see that blacks are black and whites are white. Don't always trust eyeball analysis. Use a pixel reader that can read pixel values directly from your screen. ColorPic has a free one. Many use csamp, which is fiddly with a tiny window but still works. The basic RGB formulas for "pure" colors:
Some basic color theory:
Black: RGB 0 0 0 ("video black": RGB 16 16 16)
dark gray: RGB 64 64 64
middle gray: RGB 128 128 128
light gray: RGB 192 192 192
super white: RGB 255 255 255
Yellow = Red + Green
cyan = green + blue
Magenta = blue + red
Working environment: don't work in bright light, stay away from sunlight thru windows, and don't put a lamp behind you that's in front of the monitor. Work in subdued light. There's a bright living room window 35 feet from the right side of my monitor. I place a big piece of cardboard propped upright on my desk between me and that window at high noon. Don't work in near-darkness, either: your eyes will pop open to correct for what look like a bright monitor. And besides, you won't be able to see your keyboard, LOL! Don't stare at the same video for hours. Take a break, walk around, read a magazine, etc. Then come back, and you'll see a difference.
The images below are from your capture sample. In the top image is frame 86 of the original, unfiltered and with original black borders, resized for 4:3 display, with YUV (middle) and RGB (right) histograms.
You can see that the image looks washed out and brights are blobs. Likely you won't get those candles to render 100% correctly, so it's ok to let them wash out a bit. The image looks flat and lacks depth. Notice in the YUV histogram in the middle, the right side has brights outside the safe area and Dark colors start at a high level, about RGB 64 (dark gray). At the left side of the YUV histogram, notice where your black borders are:
right on RGB 16.
Now look at the RGB histogram (right) for what happens when YUV is expanded.
The RGB 16 black borders are at RGB zero on the far left. On the right-hand side, luma and all three colors are climbing the walls of the histogram (clipped). In RGB, black detail starts a bit lower but is still gray.
Below, frame 86 after levels and gamma adjustment in Avisynth. The side borders have been cropped off (more about that in a minute), and the YUV and RGB histograms look more normal.
The YUV histogram, above, isn't fully populated across the spectrum -- no matter, because later your video levels will transmogrify in both directions, thanks to the camera's Autogain. Note that if you make the darks any darker, detail in the lady's arm will disappear, the black skirt will look unnatural, and you'll crush dark detail in the boy's hair. The RGB histogram shows almost everything within the safe-level bars (yeah, you're allowed some leeway for stuff that really doesn't count, and the darkest skirt areas have no detail anyway). The image has more perceived detail and depth. You c an always tweak more in post-processing. I didn't do that here. Note: no black borders this time, but that won't always be the case.
Your sample changes luma levels abruptly as the camera moves. The YUV histogram below is from unprocessed frame 186. Brights are definitely clipped here, some of it happening in the camera, and darks are even brighter than the earlier scene.I think you can see the results of clipping in this frame in your own sample.
Why crop 8 pixels of side border off the 720x480 image? That leaves you with a 704x480 frame. It happens that 704x480 is valid for DVD and BluRay alike at 4:3 display (but you need full 720x480 for 16:9 display). Now, notice the boy's face in the two images. The top frame is 720x480 resized for 4:3. The bottom image is 704x480 resized for 4:3. Notice anything? The boy's face in the top image is slightly elongated. The aspect ratio in the bottom image looks more natural. In fact, in the top frame the core image is 16 pixels more narrow during display than in the bottom image, so it looks slightly "squished". For 4:3 images, the SMPTE standard populated only the center 704 horizontal pixels. Players differ.