Key Facts
- Category
- Design
- Input Types
- file, number, select
- Output Type
- file
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Image Adaptive Threshold tool performs local binarization on images, calculating unique thresholds for small pixel neighborhoods to effectively handle uneven lighting and shadows.
When to Use
- •When an image has inconsistent lighting that makes global thresholding ineffective.
- •When you need to extract text or fine details from documents with shadows or gradients.
- •When preparing images for OCR or feature detection where local contrast is more important than overall brightness.
How It Works
- •Upload your image file in a supported format like PNG, JPEG, or TIFF.
- •Set the block size to define the neighborhood area for local threshold calculation.
- •Choose between Gaussian or Mean methods to determine how the threshold is weighted within each block.
- •Apply the constant value to fine-tune the sensitivity of the binarization process.
Use Cases
Examples
1. Binarizing a Shadowed Document
Archivist- Background
- A collection of historical documents features uneven lighting and dark shadows across the pages, making the text difficult to read.
- Problem
- Global thresholding turns the entire page black or white, losing the text in shadowed areas.
- How to Use
- Upload the document scan, set the block size to 21, and select the Gaussian method to account for local intensity variations.
- Example Config
-
blockSize: 21, method: 'gaussian', constant: 5 - Outcome
- The text becomes sharp and legible against a clean white background, regardless of the original lighting inconsistencies.
2. Isolating Features for Computer Vision
Data Scientist- Background
- An image of a mechanical part has a strong light source on one side, creating a gradient that hides surface details.
- Problem
- Standard binarization fails to capture the edges of the part due to the brightness gradient.
- How to Use
- Upload the image, use a smaller block size of 11 to focus on local contrast, and apply the Mean method.
- Example Config
-
blockSize: 11, method: 'mean', constant: 2 - Outcome
- The edges of the mechanical part are clearly defined as a binary mask, making them ready for further feature extraction.
Try with Samples
image, png, jpgRelated Hubs
FAQ
What is the difference between Gaussian and Mean methods?
The Mean method calculates the average of the neighborhood, while the Gaussian method uses a weighted sum based on a Gaussian distribution, often resulting in smoother edges.
Why must the block size be an odd number?
An odd block size ensures there is a clear center pixel for the neighborhood calculation, which is required for the mathematical operation.
What does the constant value do?
The constant is subtracted from the calculated mean; increasing it can help remove background noise or faint artifacts from the final binary image.
Which file formats are supported?
The tool supports common image formats including JPEG, PNG, WebP, GIF, BMP, and TIFF.
Can I process multiple images at once?
No, this tool is designed to process one image file at a time.