MSharpen Plugin for VirtualDub
(Version 1.2.1)

by Donald A. Graft/Andreas Ludwig

[Place this text file in the VirtualDub plugins directory to make it available via the Help button on the filter configuration dialog box.]

Introduction

This plugin for VirtualDub implements an unusual concept in spatial sharpening. Although designed specifically for anime, it also works quite well on normal video. The filter is very effective at sharpening important edges without amplifying noise.

The justification for the filter is simple. The biggest complaint about Unsharp Mask (for example) is that setting the strength high enough to sharpen important edges also amplifyies noise and small detail. MSharpen solves this problem effectively by detecting important edge areas and then applying sharpening only to those areas. You first set the 'threshold' parameter so that desired edges are selected. Then you set the sharpening strength. You can set very high sharpening strengths without amplifying noise or fine detail (because the edge map is used to mask the sharpening).

There is an important caveat about the use of this filter. It works best on frames obtained from progressive source material, such as films and anime. It can be used on interlaced video by separating the fields first, applying this filter, and then recombining the fields. Field unfolding/folding can be accomplished with the internal deinterlace filter.

Although it can be used on deinterlaced video, if the deinterlacing is poor or applied weakly, this filter can emphasize the residual combing, because it sharpens the important edges; these edges are where the most combing occurs! So be aware of this. If this is a problem, consider sharpening the interlaced video as described above, and then deinterlace it.

This version includes speed optimizations by Andreas Ludwig.


MSharpen Configuration Options

Strength: This is the strength of the sharpening to be applied to the edge detail areas. It is applied only to the edge detail areas as determined by the 'Threshold' option. Strength 255 is the strongest sharpening.

Threshold: This parameter determines what is detected as edge detail and thus sharpened. To see what edge detail areas will be sharpened, use the 'Show sharpened areas' option.

Show internal: When checked, the 'Sharpen area' and 'Blur' options are enabled. The normal filtered video is replaced with debugging video as described below. Leave this unchecked for normal processing.

Sharpen area: When selected, the areas to be sharpened are shown in white against a black background. Use this to set the level of detail to be sharpened. This function also makes a basic edge detection filter.

Blur: The edge detection logic uses a preliminary blur of the video. When selected, the output of the blur operation is shown. Don't worry! This blur is not applied to your output video; it is used only to create the sharpening areas mask. This option is not particularly useful; it allows you to see the result of selecting different internal blur methods (see below).

Blur method: This option allows you to trade off quality of edge detection versus processing time. The 'Cross' method is an inaccurate blur but is the fastest method. The '3x3 block' method is a fairly accurate blur but is slower than 'Cross'. The 'Radius 1' method is the most accurate blur, but is the slowest method. In practice, use 'Cross' if you want speed, and '3x3 block' if speed is not so important. You can use the 'Show internal option' together with 'Show Preview' to see the effect of this option on the sharpening mask.


Copyright (C) 2002-2005, Donald A. Graft, All Rights Reserved.

For updates and other filters/tools, visit my web site:
http://neuron2.net/