Loading ClickForArt…

Threshold Image

Threshold an image or video into two flat colors at the brightness you choose, with a hard or soft edge. It all runs in your browser, so nothing is uploaded.

The scene split into pure black and white, the whale and balloon as black shapes on a blank white sky

What is image thresholding?

Thresholding is about the simplest way to segment an image. Every pixel brighter than a set level becomes one color, and everything darker becomes the other. What you get is a binary image, two flat tones with no grays, like a photocopy or a rubber stamp.

It's also a common first step before cutting a stencil or tracing a picture into vector shapes, because it leaves clean edges to follow.

Automatic methods like Otsu's method pick the level from the image's histogram. Here the level is up to you, and the picture redraws as you drag.

How to threshold an image

Move Level to the brightness where dark should turn to light. Softness widens that cut into a ramp on either side of the Level. At the default 0.02 it runs from 0.48 to 0.52, which is enough to smooth the stair-steps on curved edges, and at 0 the cut is a hard step.

Mode picks what gets measured. Brightness uses one luma value per pixel with the Rec. 709 weights, and Per channel thresholds red, green and blue separately, for eight colors.

Dark and Light are the two colors, so the result doesn't have to be black and white. The Blueprint, Neon and Newsprint presets swap in navy, magenta and newsprint tones, and Ink, Soft and Per channel stay black and white.

Settings for a stencil, a rubber stamp, a signature and eight-color pop art

For a stencil for spray paint or vinyl, set Level between 0.45 and 0.55, Softness 0, Dark #000000 and Light #ffffff. Zero softness leaves nothing but pure black and pure white, so a cutter or a tracer sees one clean edge. For a rubber stamp, try Level 0.5, Softness 0.03, Dark #b3121c and Light #f4efe4. That's red ink on off-white, with an edge just soft enough to look pressed.

For a signature from a phone photo, use Level 0.6 to 0.7 and Softness 0.02. Paper photographed indoors is hardly ever white, so the level sits above the middle to push the gray paper to Light while the ink stays Dark. For eight-color pop art, set Mode Per channel and Level 0.5, which gives the same colors as Posterize Image at 2 steps.

To change which colors end up dark, run the photo through Black and White Converter first and turn its Hue. That shifts each color's gray before the cut, the way a colored filter does on black-and-white film.

Why does half of my scanned page turn black?

One Level covers the whole picture. On a page lit more from one side, the paper is white at one end and gray at the other, and wherever the gray paper drops below Level, it goes Dark along with the ink.

Photograph the page in even light, or crop it into parts and threshold each at its own Level. Image-processing libraries deal with this through local thresholding, which picks a level per neighborhood, but this tool uses one level for the whole frame.

Which format for a stencil or a cutting machine?

Go with PNG. A two-color picture compresses to a tiny file, and every edge pixel stays exact. JPG adds gray specks and ringing along the edges, which a tracer turns into stray bumps and a cutter will try to follow.

Cutting machines and lasers follow vector paths, not pixels. Take the PNG to the Image Tools hub and convert it to SVG there.

Further reading