Avisynth EdgeCleaner
Jump to navigation
Jump to search
EdgeCleaner is a simple edge cleaner and weak dehaloer. It cleans up ragged or slightly haloed lines without touching flat areas.
Filtering → Avisynth → DeHalo

What it does
The script warps the picture toward its edges with aWarpSharp2, which thins lines and pulls halos in. If Repair is on, the result is limited against the source so it cannot move too far. The effect is blended in only along edges, using an inverted Prewitt edge mask.
Two optional extras: Smoothing protects small stars or particles (they are restored from the source), and Remove hot pixels does an additional Repair pass against the source.
Picture sizes divisible by 16 or 32 work best.
Requirements
- Windows, CPU only.
- The helper plugins (aWarpSharp2, masktools2, RgTools) are shipped with Hybrid.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Strength | strength | 0–100 | 10 | Edge denoising strength. The warp depth is strength / 2 (rounded), plus 4 when Smoothing is on. |
| Repair | rep | on/off | on | Limits the result against the source with Repair. |
| Repair mode | rmode | 0–18 | 17 | Repair mode, only available while Repair is on. 1 is mild and good for halos. 16 and 18 keep structure with strong settings but leave more halos; 17 is like 16 with less haloing. Other modes are not recommended. |
| Smoothing | smode | 0–2 | 0 | 0 off. 1 uses a RemoveGrain-based star mask, 2 a mini-Deen-based one. Stars are restored from the source. |
| Remove hot pixels | hot | on/off | off | Extra Repair mode 2 pass against the source. |
Example
Default settings on a 10-bit YUV 4:2:0 source:
EdgeCleaner()
How Hybrid calls it
- Hybrid loads masktools2, aWarpSharpMT, the RemoveGrain helper and
EdgeCleaner.avs, then callsEdgeCleaner. - Planar Y8, YV12, YV16 and YV24 input; other formats are converted first. The example needs no conversion.
- Parameters are only written when they differ from the defaults (Repair and Remove hot pixels as true/false). Repair mode is only written while Repair is on.
- The filter is not interlace-aware.
- EdgeCleaner also offers the common options and can be added to the filter queue several times.
Background
- The script is EdgeCleaner v1.041 (2020-04-18). It needs aWarpSharp (SEt), masktools2, Repair and RemoveGrain, and optionally Deen.
See also: Vapoursynth EdgeCleaner
Sources
- The AviSynth+ documentation does not cover EdgeCleaner.
- Header of the script
EdgeCleaner.avs - Hybrid's tooltips