Image Threshold Filter
Turn any image into pure black and white at the brightness you choose, or let Auto find the best split with Otsu's method. Great for scans, stencils and line art.
Image
Settings
Readme
What is a threshold filter?
A threshold filter turns every pixel pure black or pure white. Pixels at least as bright as the threshold become white, the rest become black, with no grays in between. It's the standard way to clean up scanned text and signatures. Stencils, rubber stamps, vinyl cutters, laser engravers, and screen printing also need images with two flat tones.
Tool description
Open an image and move the Threshold slider until the shapes you care about stand out. Press "Auto" and the tool picks a threshold from the image's brightness. That's a good starting point for scans and high contrast photos. Compare with the original using the before and after slider, then download. PNG is the default, since a two tone PNG stays small and sharp.
Features
- Pure black and white output with an adjustable threshold
- Automatic threshold with Otsu's method
- Keeps transparency, so cutouts stay cutouts
- Runs in your browser, so your images never leave your device
How it works
Brightness here is luma: 0.299 × red + 0.587 × green + 0.114 × blue. These are the standard Rec. 601 weights for turning color into gray. That's why a pure blue looks darker than a pure yellow of the same strength.
The "Auto" button uses Otsu's method. It counts how many pixels have each brightness and tries every possible threshold. It keeps the one that splits the pixels into two groups as far apart as possible, with each group staying tight. For a document, that's usually right between the ink and the paper.
Tips
- If thin strokes break up, raise the threshold a little. If the background gets speckled, lower it.
- Photos with uneven light can't be split well by one threshold. Crop to the part you need, or brighten the dark side first.
- For stencils and cutters, simple shapes with strong contrast give the cleanest edges.