Balancing High Pass Filter in GIMP for Line Art

Extracting clean line art from scanned sketches or images in GIMP relies on fine-tuning the High Pass filter. By understanding the direct interaction between the Standard Deviation and Contrast sliders, you can isolate crisp pencil or ink strokes while completely eliminating paper texture, uneven lighting, and unwanted background gradients.

Understanding the Sliders

The High Pass filter operates by preserving high-frequency spatial details (edges) and flattening low-frequency information (gradients, page shadows) into a neutral 50% gray.

  • Standard Deviation (Radius): This controls the detection radius of the edges. A lower value detects only the finest, sharpest transitions (thin lines), while a higher value widens the detection area to include broader strokes, shading, and gradients.
  • Contrast: This acts as a multiplier on the detected edges relative to the neutral gray background. Increasing contrast sharpens the falloff between the detected stroke and the surrounding canvas.

The Balancing Process

To balance these two controls effectively for line art extraction, follow a systematic order of operations rather than moving both sliders simultaneously.

1. Set the Standard Deviation First

Leave the Contrast slider at its default setting (typically 1.0) and focus solely on the Standard Deviation.

  • Low-resolution or fine-ink art: Set the Standard Deviation between 1.0 and 3.0. This captures delicate pen work without picking up paper grain.
  • High-resolution scans (300+ DPI) or thick pencil sketches: Set the Standard Deviation between 3.0 and 8.0.
  • The Rule: Increase the value only until the core structure of your lines appears against the gray field. If you begin to see dark halos around the strokes or patches of the original paper tone reappearing, the value is too high.

2. Compensate with Contrast

Once the edge radius encompasses only your actual lines, use the Contrast slider to separate those lines from the gray base.

  • Gradually increase the Contrast slider until the lines darken significantly and the transition between line and gray becomes sharp rather than blurry.
  • For ink drawings, high contrast values (between 1.5 and 3.0) work best to mimic solid ink.
  • For pencil art, keep the contrast moderate (around 1.0 to 1.8) to preserve the natural pressure variations of graphite.

Finalizing the Extraction

The High Pass filter output is a gray-based representation. To complete the extraction after balancing:

  1. Apply the filter.
  2. Go to Colors > Threshold to immediately convert the result into a pure black-and-white mask, or use Colors > Levels to manually pull the white point down until the neutral gray turns completely white while the lines remain black.
  3. Set the layer mode to Multiply over a white background, or use Colors > Color to Alpha to remove the white background entirely, leaving pure, isolated line art.