12 Removal of chroma artefacts

There are different kinds of chroma artefacts. For example: chroma noise, crosstalk and chroma phase problems. Have a look at the following examples

color bleeding:
The capture of a vhs-recording can result in color bleeding (or chromashifts). This means that one or more colors are bleeded (shifted) in the horizontal or vertical direction (or both).

chromashift1a
figure 1: color bleeding

If you look at the trousers and jackets of the girls, you see that the blue has shifted some pixels to the right. Likewise the green (of the gras) has shifted some pixels to the right.

chroma noise and rainbow effects:
There are two kinds of chroma noise in the following picture. The first one is some bright coloring around the text of the book and around the timer (chroma noise around edges). These are typical examples of rainbow effects. The second one is the ugly thick red/yellow areas on the skin of the girl. This effect has no special name.

chromaband1
figure 2: rainbow effects and color bands

dot crawls:
The following is a typical example of dot crawls, i.e. dots/pixels which are crawling over your picture. Note, that in this case there is motion in the area of the dot crawls (of course, you can only see that when looking at the complete clip).

dotcrawl1
figure 3: dot crawls

References:
The engineers guide to Decoding & Encoding: luma and color crosstalk (sections 2.4-2.6).
A guide to comb filters (by Greg Rogers).
TV and Video Comb filters (by Allan W. Jayne, Jr.).

12.1 Chroma noise (red/yellow areas on the skin of people)

We have no idea what is causing these ugly chroma noise effects. The plugin Chroma Noise Reduction (there exist VirtualDub and AviSynth (1) versions) can be used to remove this kind of noise.

Let's have a look again at the first picture. The following AviSynth script is used (GuavaComb is a filter which removed rainbow effects, see 14.3 for more information):

AviSource("F:\Guides\AnalogCaptureGuideClips\Chromanoise\xvid.avi")
ConvertToYUY2()
Cnr2("xxx", 4, 5, 255)
GuavaComb(Mode = "PAL", Recall = 83, MaxVariation = 25, Activation = 40) # requires YUY2

The result is as follows

chromaband2

The ugly thick red/yellow horizontal lines are completely smoothed out using the Cnr2 filter. The rainbow on the timer is removed using GuavaComb (the rainbow on the book is still there, as can be checked by subtracting the filtered clip from the original clip). Removal of rainbows and dot crawls should happen before any deinterlacing (because it can mess up the interlace patterns).

Proceed with the VirtualDub or AviSynth post processing guide.

12.2 Correcting chroma shifts

12.2.1 Introduction

A PAL signal uses YUV. There is one component that represent brightness (Y or luminance) and two other components that represent color (UV or chrominance). A NTSC signal uses YIQ. Also here there is one component that represents birghtness (Y or luminance) and two other components that represent color (IQ or chrominance). The IQ plane is just a rotation of the UV plane.

There is horizontal and vertical chromashifting. They are both caused by your video recorder or camcorder, but they have different causes:

Color Bleed (horizontal chromashifts) is the effect seen on video tapes where strong colors seem to spread out from their correct places and "bleed" into adjacent areas. This is especially noticeable on strong reds but normally occurs on all colors equally, being simply more obvious on reds and to a lesser extent on blues.

VHS stores luma with 3.0 MHz bandwidth, and the chroma is stored with about 0.6 MHz bandwith. In other words the chroma is strongly reduced. This causes bright colors to spread, but providing they stay in the correct position they can still look sharp. However very often video recorders do not reproduce the color in exactly the correct position, but cause it to shift left or right a bit.

Color Droop (vertical chromashifts) is the effect seen on video tapes where colors seem to drop below their correct places and "droop" into adjacent areas, leaving the top of strongly coloured areas often colorless and non-colored areas below strongly colored ones tinted at the top. This is especially noticeable on strong reds but normally occurs on all colors equally, being simply more obvious on reds and to a lesser extent on blues.

Luckely, there are VirtualDub and AviSynth plugins which can do something about this. For VirtualDub flaXen VHS Filter can be used, and for AviSynth the plugin ChromaShift is available. In both plugins the chrominance can be adjusted. The process of shifting should be done before any deinterlacing and denoising.

References:
Color bleed: About color bleeding.
Color droop: About color drooping.
Leopold's Home Video Formats Page: About horizontal/vertical luminance and chrominance resolutions of various video formats.
Television and Video Glossary: Semitechnical Explanation of I and Q versus U and V.
Charles Poyton's ColorFAQ: ColorFAQ including the conversion formulas between IQ and UV (page 17).

12.2.2 Virtualdub usage

Get the "flaXen VHS Filter 1.0". The blue and green must be shifted to the left. We lowered both the "Chroma I" and the "Chroma Y" values (make sure that the NEGative checkbox is checked).

chromashift2

The result is as follows:

chromashift1b

Proceed with the VirtualDub post processing guide.

12.2.3 AviSynth usage

Get the ChromaShift plugin. Using this plugin the "U" and "V" values can be adjusted separately, but also together using the "C" value. The corresponding line for the script becomes:

AviSource("F:\Guides\AnalogCaptureGuideClips\Chromanoise\ghost.avi")
ChromaShift(C=-6)

or what is exactly the same:

AviSource("F:\Guides\AnalogCaptureGuideClips\Chromanoise\ghost.avi")
ChromaShift(U=-6, V=-6)

The results are pretty much identical as when using the "flaXen VHS Filter".

Proceed with the AviSynth post processing guide.

12.3 Removing rainbow effects and dot crawls

12.3.1 Introduction

Rainbow effects and dot crawls are caused by imperfect separation of the luma and chroma components of a composite video signal. This effect is called color crosstalk. It is most noticeable on computer generated images like subtitles, weather maps, stationary logos and video images where you have hi-frequency data (like the shot of a skyscraper in the distance). Whenever you have strong alternating, fine patterns (= high frequencies) in luma, you have rainbow effects. Whenever you have a sudden, big change in chroma (typically computer generated graphics etc.), you have dot crawls. The technical terms are as follows: rainbow effects is cross color (hi-frequency luma data upsets the chroma demodulator) and dot crawl is cross luminance (chroma leftovers in the Y signal).

There is a VirtualDub plugin called DotCrawl which can get rid of rainbow effects and dot crawls in static and dynamic scenes. Since it only has NTSC support, we won't discuss it. There is an AviSynth plugin called GuavaComb which can get rid of dot crawls in static scenes (since it only uses temporal information).

References:
TV Comb Filters: For a general presentation of comb filters.
Video Color Resolution: Semitechnical explanation of I and Q versus U and V.
Charles Poyton's ColorFAQ: ColorFAQ including the conversion formulas between IQ and UV (page 17).
Bt868/Bt869 digital video encoders: Look up page 17 of datasheet 100119a.pdf (which handles Y/C separation and chroma demodulation for cards with the Bt868/9 chip).
Composite, S-video and Component signals: A few words about the differences between the video signals formats.

12.3.2 AviSynth usage

At the moment of writing there is only one good filter which can get rid of rainbow effects: GuavaComb. But the limitation is, that it only does so in static scenes.

Let's consider an example:

rainbow5

The following script is used to reduce the rainbows:

AviSource("F:\Guides\AnalogCaptureGuideClips\Chromanoise\devils_advocate_pal_2.avi")
GuavaComb(Mode = "PAL", Recall = 75, MaxVariation = 25, Activation = 40)

The result is as follows (the Recall value is lowered a bit, since this decides just how far back into the past the Guava will look in order to confirm that there’s really some shimmering going on).

rainbow6

In this example the rainbow effects started to disappear at frame 17 (the picture above is frame 21).

Proceed with the AviSynth post processing guide.

12.4 Other types of chroma noise

People have posted other nasty chroma noise effects:

banding
greenline

At the time of writing this page, there are no filters who can correct this.

footnotes:
(1) At the time of writing this page, the AviSynth plugin Cnr2 v2.4 is the last version which works correctly.


Back to VirtualDub postprocessing

Back to AviSynth postprocessing

Back to the Index: HOME


Last edited on: 06/12/2004 | First release: n/a | Author: Version4Team | Content by doom9.org