VirtualDub MSU Cartoonizer Filter
(Converts Movies into Cartoons)

MSU Graphics & Media Lab (Video Group)

Algorithm: Dmitriy Vatolin,
Michail Burkhinov, Konstantin Strelnikov
Implementation: Michail Burkhinov

The filter is designed for paining, drawing and animated cartoon rendering. MSU Cartoonizer filter has many parameters, which allow to obtain very interesting results. This is the first filter developed by Graphics & Media Lab referring to non-photorealistic rendering area.


Interface of the filter allows to choose Cartoonizing mode. It can be either "Painting" or "Drawing".


The following settings can be modified in "Painting" mode:

Brush Size
Allows to control size of the brush, which painting is made by. Small brushes make the frame more detailed, thus allowing image to be more realistic. It is recommended to apply small brushes to the video with small resolution. Large brushes make the image more blurred, thus increasing non-photorealistic effect. It is better to apply large brushes to the video with large resolution or in case when small details are not very important and maximum painting effect is needed. It is necessary to take into account, that small details may disappear. Sometimes, to receive better results, it is useful to increase resolution of the video. It can be done by means of Virtual Dub's internal filter - resize.

Brush Wetness
Controls wetness of a brush. In fact, allows to change accuracy of strokes.

Color Randomization
Adds variety to color luminance of strokes. This setting allows to achieve better results on monochromatic areas of the image.

Color Saturation
Changes Saturation of resulting image. Usually cartoons are brightl and colorful, this setting allows to increase or decrease level of these parameters.

Edge Mode
This setting allows to choose a mode of edge rendering. This can be Simple Edges, Pencil Edges or Without Edges.

Edge Luminance
Controls luminance of edges. The very right position corresponds to light edges, and left position corresponds to dark edges.

Number of Edges
This parameter is responsible for the amount of rendered edges. The righter the position is the more edges will be rendered.

Edge Thickness
Controls edge thickness.


The following settings can be modified in "Drawing" mode:

Pencil Type
Allows to choose the type of a pencil, which a cartoon is rendered by. It may be colored pencil or non-colored pencil.

Number of Strokes
Controls the amount of rendered strokes.

Stroke Brightness
Controls brightness of the strokes for non-colored pencil and saturation of the strokes for colored pencil.

Stroke Thickness
Controls stroke thickness.

Stroke Accuracy
Controls accuracy of stroke rendering. The left edge of the bar corresponds to precise strokes.


General Settings:

Process each N frame
Allows to control the amount of processed frames. Each N-th frame is processed, other frames are duplicated. This parameter is used to reduce realism of the processed video, and also to decrease shaking.

Features of the filter:

The new version supports job contol allowing the filter to be used by AviSynth.


Examples of using filter in AviSynth:

Example of a script for Painting:

LoadVirtualDubPlugin("MSU_Cartoonizer.vdf", "MSU_Cartoonizer", 0)  
clip=AVISource("test.avi", false, "RGB24")
clip.ConvertToRGB32.MSU_Cartoonizer(0, BrushSize, BrushWetness, ColorRandom, ColorSaturation, EdgeMode, EdgeLuminance, EdgesNumber, EdgeThickness, ProcessEachNframe)

Example of a script for Drawing:

LoadVirtualDubPlugin("MSU_Cartoonizer.vdf", "MSU_Cartoonizer", 0)
clip= AVISource("test.avi", false,
"RGB24") clip.ConvertToRGB32.MSU_Cartoonizer(1, PencilType, StrokesNumber, StrokeBrightness, StrokeThickness, StrokeAccuracy, ProcessEachNframe, 0, 0, 0)

E-mail:  video@graphics.cs.msu.su