Connected Components
Label connected regions in binary images to count blobs, inspect regions, review bounding boxes, and analyze separated foreground areas.
Connected components analysis is useful after thresholding or segmentation when the next question is how many regions exist, where they are, and how large they are. It helps with document cleanup, blob counting, particle analysis, region filtering, and basic measurement tasks.
How to Use Connected Components
- Upload an image: Upload one of the formats listed by the tool (JPG, PNG, WebP) and wait for the local preview.
- Adjust settings and process: Adjust the binary threshold and connectivity type (4 or 8) to control how regions are labeled.
- Review and download: Review the result, then download it in one of the formats offered by this tool.
Frequently asked questions
What are connected components?
Connected component labeling groups pixels that are spatially adjacent and have the same value (foreground) into distinct regions. Each region receives a unique label and can be analyzed for area, bounding box, and centroid.
4-connectivity vs 8-connectivity?
4-connectivity only links pixels sharing an edge; 8-connectivity also links pixels sharing a corner. 8-connectivity produces fewer, larger regions while 4-connectivity can split diagonal structures.
Should I use 4-connectivity or 8-connectivity?
4-connectivity is stricter. Only horizontal and vertical neighbors count as connected. 8-connectivity includes diagonals, merging more pixels into single components. Use 4-connectivity when diagonal touching should not merge objects (text characters). Use 8-connectivity for general object detection.
Is the Connected Components tool free?
Yes. All tools on Pixlane are free with no signup required.
Does it reuse cached assets on repeat visits?
Browser caching can speed repeat visits; uncached site assets can still require an internet connection.
What image formats are supported?
JPG, PNG, and WebP are supported.
What statistics does connected component analysis provide?
Each component reports its bounding box (x, y, width, height), total area in pixels, and centroid coordinates. These metrics enable object counting, size filtering, and spatial analysis of labeled regions.
How does the minimum area filter help?
Small noise artifacts and stray pixels often create tiny connected components. The minimum area filter ignores components below a pixel-count threshold, letting you focus on meaningful objects and regions.