Skip to main content
Image AlgorithmsTool Introduction

Watershed segmentation treats a grayscale image as terrain, expanding from marker points (distance map local maxima) via BFS. Teaching focus: raw watershed over-segmentation problem → marker-controlled watershed solution. Three-step visualization: binarization → distance transform heatmap → marker watershed result.

Key Formula / Principle

1. Binarization (Otsu or given threshold)
2. Distance transform (chamfer 3-4 two-pass scan)
3. Marker extraction (distance map local maxima + minDist filter)
4. BFS expansion (assign labels from marker regions)
Data Processed Locally|All computations run in your browser. Images, formulas, state machine definitions, and any other input data are never sent to any server.

Related Tools

Color Matrix· Image AlgorithmsDemosaic· Image AlgorithmsAuto White Balance· Image AlgorithmsGamma Correction· Image AlgorithmsSpatial Denoise· Image AlgorithmsTemporal Noise Reduction (TNR)· Image AlgorithmsSharpen USM· Image AlgorithmsPixel Binning· Image AlgorithmsPipeline· Image AlgorithmsColor Space Converter· Image AlgorithmsHistogram Analysis· Image Algorithms3D LUT Color Grading· Image AlgorithmsTone Mapping HDR· Image AlgorithmsHDR Exposure Fusion· Image AlgorithmsTone Curve· Image AlgorithmsCLAHE Auto Contrast· Image AlgorithmsBlack Level Correction· Image AlgorithmsDefect Pixel Correction· Image AlgorithmsLens Shading Correction· Image AlgorithmsCanny Edge Detection· Image AlgorithmsSobel Edge Detection· Image AlgorithmsLaplacian Edge Detection· Image AlgorithmsPrewitt / Roberts Edge Detection· Image AlgorithmsHarris Corner Detection· Image AlgorithmsHough Line Detection· Image AlgorithmsMean Blur· Image AlgorithmsMedian Filter· Image AlgorithmsNoise Injection· Image AlgorithmsAdaptive Median Filter· Image AlgorithmsNon-Local Means Filter· Image AlgorithmsGuided Filter· Image AlgorithmsErosion· Image AlgorithmsDilation· Image AlgorithmsOpening· Image AlgorithmsClosing· Image AlgorithmsMorphological Gradient· Image AlgorithmsTop-Hat Transform· Image AlgorithmsBlack-Hat Transform· Image AlgorithmsCrop· Image AlgorithmsResize· Image AlgorithmsFlip· Image AlgorithmsRotate· Image AlgorithmsAffine Transform· Image AlgorithmsPerspective Transform· Image AlgorithmsDistortion Correction· Image AlgorithmsSuper Resolution· Image AlgorithmsOtsu Threshold· Image AlgorithmsAdaptive Threshold· Image AlgorithmsK-means Segmentation· Image AlgorithmsRegion Growing Segmentation· Image AlgorithmsGrayscale· Image AlgorithmsContrast Stretch· Image AlgorithmsFixed Threshold Binarize· Image AlgorithmsRetinex Enhancement (SSR)· Image AlgorithmsPseudocolor Mapping· Image AlgorithmsColor Transfer· Image AlgorithmsFFT Spectrum & Filtering· Image AlgorithmsMotion Deblur (Wiener Filter)· Image AlgorithmsResistor Calculator· Basic ToolsOhm's Law· Basic ToolsRC/LC Filter· Basic ToolsNumber / Encoding Converter· Basic ToolsCRC Calculator· Basic ToolsState Machine Editor· FPGA ToolsTiming Diagram Tool· FPGA ToolsFIFO Depth Calculator· FPGA ToolsCDC Synchronizer Selector· FPGA ToolsSDC Constraint Generator· FPGA ToolsSetup/Hold Checker· FPGA ToolsTiming Budget Analyzer· FPGA ToolsPipeline Calculator· FPGA ToolsAI-Verilog Prompt Workbench· FPGA ToolsVerilog Code Template Library· FPGA ToolsClock Divider Calculator· FPGA ToolsIEEE 754 Floating-Point Converter· FPGA ToolsFixed-Point Q Format Converter· FPGA ToolsPLL/MMCM Clock Frequency Planner· FPGA ToolsBOM Manager· BOM ManagementVerilog Coding Style Linter· FPGA ToolsCORDIC Calculator· FPGA ToolsAXI-Stream Handshake Visualizer· FPGA Tools