Detail decides how small a shape can be and still be cut, and how small a hole can be and still stay open. It works on whole shapes, never on their edges: whatever it keeps, it keeps exactly as the threshold drew it.
What it does
“Detail” runs from 0 to 100 and starts at 100. After the threshold has split the photo in two, Detail looks at every separate patch of front, and every hole of back enclosed by front, and measures its area in pixels.
- Every patch of front smaller than the cut-off is dropped: it becomes back.
- Then every hole smaller than the cut-off is filled: it becomes front. Back that reaches the edge of the image is never filled, because it is open ground, not a hole.
- Everything else passes through pixel for pixel. No edge is moved, softened or rounded.
The cut-off runs on a logarithmic scale. At 100 it is 4 square pixels of the working image, so only specks of one to three pixels go. At 0 it is 2% of the sheet's area, about the size of a square a seventh of the way across a square sheet. At 50 it is the halfway point on the logarithmic scale: on a photo whose 2048 pixels span a square sheet, about 24 pixels square. Because the cut-off is measured against the sheet, the same setting means much the same thing however large the photo is and however it is placed.
A note under the slider says what the setting does, for example “Drops shapes and holes smaller than 0.3% of the sheet”, or at the top of the range “Keeps every shape and hole; only specks a few pixels across are dropped”. A line above the “Trace” button counts the result, such as “3 small shapes dropped · 2 holes filled”, and with “Preview” on “Outlines” it adds how many shapes there are to trace.
Two pixels that touch only at a corner raise a question: are they one shape or two? Detail, and the tracer after it, answer differently for the two sides. Front is 8-connected: front pixels that share an edge or only a corner belong to one shape, so a diagonal line of pixels is one line, not a scatter of dots. Back is 4-connected: back pixels belong together only if they share an edge, so back cannot leak through a diagonal chain of front.
Why it works this way
The request behind this control was to lose the small shapes while keeping the line detail of the big ones. Blurring or smoothing cannot do that, because both soften every edge, the big shapes' included. Working on whole regions can. Measuring by area rather than width matters too. A long, fine tendril that belongs to a large shape is part of that shape's region, and the region is large, so the tendril survives every setting.
The slider is logarithmic because the useful settings are crowded at the fine end. The difference between dropping 4-pixel specks and 40-pixel crumbs is plain to the eye; the difference between dropping shapes of 1.8% and 2% of the sheet is not. A log scale gives the fine end most of the slider.
The pairing of 8 and 4 keeps shapes and holes honest. If both sides were 8-connected, a diagonal ring of front pixels would be one closed shape, and yet the back inside it would join the back outside through its corners: the ring would be closed and open at once. If both were 4-connected, the ring would fall apart into separate dots while still sealing the back inside. Only mixed connectivity makes every boundary divide exactly one inside from one outside, as a closed line drawn on paper does. The tracer keeps the same rule, turning at a corner-touch so as to keep front pixels together, so the shapes Detail counts are exactly the shapes that get traced.
The metaphor
Detail is a sieve. Shake the photo through a mesh and the small stuff falls through, the specks of grain, the dust, the pinholes, while the shapes that matter stay on top. The slider sets the size of the mesh.
It is also the retoucher's brush and the screen printer's blockout. Photographers spent hours spotting prints, touching out each white dust mark with a fine brush and dye. Screen printers go over a freshly made stencil and fill its pinholes, because every pinhole prints as a dot. Detail does both jobs, in both directions, in a single pass.
The sieve breaks on shape. A sieve judges a particle by its smallest width: a long, thin needle slips through end-on. Detail judges by area, so a long, thin sliver survives if its area passes the cut-off, however narrow it is. And a sieve cannot fill holes. Detail can, because on a two-tone image a hole is simply a small shape of the other color.
A history
In art
The art strand here is thin, and it is better to say so than to invent one: artists simplify all the time, but rarely by a rule of size. The nearest craft is the paper cutter's own. Scissors and knife have a smallest cut, below which paper tears or curls, and a design meant to be cut by hand is drawn with that limit in mind. Matisse's late cut-outs, cut from sheets his assistants had painted with gouache, favor shapes that read from across a room.
The other near relative is the photographic retoucher. Before digital tools, spotting a print was a craft of its own, done with a brush fine enough to lay dye on a single speck, one dot at a time, until the dust of the darkroom disappeared from the picture.
In printing
Specks are a printer's old enemy. In offset lithography a fleck of dust or dried ink on the plate or the blanket prints as a hickey, a spot often ringed with white, and press crews stop to clean them out. Dust on a negative prints as a white mark on the enlargement, which the retoucher then spots. In screen printing, pinholes in the stencil print as dots and are filled with blockout before a run. All three are Detail's two jobs, done by hand: take away the small dark mark that should not be there, and fill the small light hole that should not be there either.
In technology
To drop a shape, a program must first know which pixels make it up. In 1966 Azriel Rosenfeld and John Pfaltz described how to label every connected region of a digital picture in two sweeps, in “Sequential Operations in Digital Picture Processing”. Rosenfeld's “Connectivity in Digital Pictures” followed in 1970, and in 1973 he gave the study of such questions a name, digital topology. Its first lesson is the one above. On a square grid, a single kind of connectivity breaks the rule that Camille Jordan stated in 1887 for curves in the plane, that a closed curve has exactly one inside and one outside, and the cure is to pair one kind for objects with the other for their background. A hexagonal grid, where every neighbor shares an edge, has no such problem.
Removing whole regions by size has a name in mathematical morphology, the discipline Georges Matheron and Jean Serra founded at the École des Mines de Paris in 1964 to measure minerals in thin sections. Luc Vincent's area openings and closings of 1993 remove every component, and fill every hole, below a given area; J. Andrew Bangham and his colleagues called such filters sieves in the 1990s. Autotracers carry the same setting. Potrace, Peter Selinger's tracer first released in 2001, has an option to “suppress speckles of up to this many pixels”, and a “turn policy” for deciding what to do where two pixels meet only at a corner.
In professional software
Every tracer has a way to leave out the smallest specks. The programs call it noise, speckles or despeckling, and most count it in pixels of area, as a fixed number rather than a share of the page.
- Adobe Illustrator. ‘Noise’, under ‘Advanced’ in the ‘Image Trace’ panel, sets the area in pixels below which a patch is ignored; raise it and small shapes drop out of the trace.
- Inkscape. ‘Speckles’ in ‘Path › Trace Bitmap’ suppresses spots of up to the number of pixels you give. Inkscape’s brightness tracing is done by Potrace, so this is Potrace’s own speckle setting.
- CorelDRAW. PowerTRACE, under ‘Bitmaps › Outline Trace’, has a ‘Detail’ slider that runs the same way as Studio Notan’s: lower values discard detail and leave fewer objects.
- LightBurn. The ‘Trace Image’ dialog can skip any area with fewer pixels than a number you set.
- Autodesk AutoCAD. The Raster Design toolset’s ‘Despeckle’ cleans a black and white scan, removing every speck up to a size you set by typing it or by clicking a sample speck.
- Adobe Photoshop. To clean before tracing, ‘Filter › Noise › Dust & Scratches’ and ‘Filter › Noise › Median’ remove specks narrower than about their radius. They judge by width, not area, so they also thin fine lines and round small corners, which Detail never does.
What carries over. Clean by area, after the split, when small shapes must go and the edges of large ones must stay; clean by blur or median, before it, when the edges themselves are ragged. Mind the units. A fixed pixel count removes more from a small scan than from a large one, while Studio Notan measures against the sheet, so its settings mean much the same whatever the size of the photo. And look for both kinds of speck afterwards: dark crumbs and light pinholes.
Try this
- With “Preview” on “Two-tone”, slide “Detail” slowly down from 100 and watch the note beneath it: the specks go first, then the crumbs, then whole small shapes.
- Trace a leafy tree. At 100 every chink of sky between the leaves is a hole. Lower Detail until the small chinks fill and the canopy reads as one mass, while the big openings stay open.
- Compare with “Blur” on the same photo: Blur rounds the canopy's edge, Detail leaves it as it was.
Going further
See Blur, Threshold, Auto and Invert and Trace as.
- Jean Serra, Image Analysis and Mathematical Morphology
- Azriel Rosenfeld and Avinash Kak, Digital Picture Processing