ArticleslgStudy

mathematics

Watershed (image processing)

Watershed (image processing) is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Watershed (image processing) rather than just read about it. In short: In the study of image processing, a watershed is a transformation defined on a grayscale image. The name refers metaphorically to a geological watershed, or drainage divide, which separates adjacent drainage basins.

Watershed (image processing) — main illustration
Watershed (image processing) — illustration

Key takeaways

  • Watershed (image processing) belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Watershed (image processing) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Watershed (image processing) from memory before moving on to harder problems.

Reference excerpt

In the study of image processing, a watershed is a transformation defined on a grayscale image. The name refers metaphorically to a geological watershed, or drainage divide, which separates adjacent drainage basins. The watershed transformation treats the image it operates upon like a topographic map, with the brightness of each point representing its height, and finds the lines that run along the tops of ridges. There are different technical definitions of a watershed. In graphs, watershed lines may be defined on the nodes, on the edges, or hybrid lines on both nodes and edges. Watersheds may also be defined in the continuous domain. There are also many different algorithms to compute watersheds. Watershed algorithms are used in image processing primarily for object segmentation purposes, that is, for separating different objects in an image. This allows for counting the objects or for further analysis of the separated objects.

Definitions In geology, a watershed is a divide that separates adjacent catchment basins.

Watershed by flooding The idea was introduced in 1979 by S. Beucher and C. Lantuéjoul. The basic idea consisted of placing a water source in each regional minimum in the relief, to flood the entire relief from sources, and build barriers when different water sources meet. The resulting set of barriers constitutes a watershed by flooding. A number of improvements, collectively called Priority-Flood, have since been made to this algorithm.

Watershed by topographic distance Intuitively, a drop of water falling on a topographic relief flows towards the "nearest" minimum. The "nearest" minimum is that minimum which lies at the end of the path of steepest descent. In terms of topography, this occurs if the point lies in the catchment basin of that minimum. The previous definition does not verify this condition.

Watershed by the drop of water principle Intuitively, the watershed is a separation of the regional minima from which a drop of water can flow down towards distinct minima. A formalization of this intuitive idea was provided in for defining a watershed of an edge-weighted graph.

Inter-pixel watershed S. Beucher and F. Meyer introduced an algorithmic inter-pixel implementation of the watershed method, given the following procedure:

Label each minimum with a distinct label. Initialize a set S with the labeled nodes. Extract from S a node x of minimal altitude F, that is to say F(x) = min{F(y)|y ∈ S}. Attribute the label of x to each non-labeled node y adjacent to x, and insert y in S. Repeat Step 2 until S is empty.

Topological watershed Previous notions focus on catchment basins, but not to the produced separating line. The topological watershed was introduced by M. Couprie and G. Bertrand in 1997, and beneficiate of the following fundamental property. A function W is a watershed of a function F if and only if W ≤ F and W preserves the contrast between the regional minima of F; where the contrast between two regional minima M1 and M2 is defined as the minimal altitude to which one must climb in order to go from M1 to M2. An efficient algorithm is detailed in the paper. Watershed algorithm Different approaches may be employed to use the watershed principle for image segmentation.

Local minima of the gradient of the image may be chosen as markers, in this case an over-segmentation is produced and a second step involves region merging. Marker based watershed transformation make use of specific marker positions which have been either explicitly defined by the user or determined automatically with morphological operators or other ways.

Meyer's flooding algorithm One of the most common watershed algorithms was introduced by F. Meyer in the early 1990s, though a number of improvements, collectively called Priority-Flood, have since been made to this algorithm, including variants suitable for datasets consisting of trillions of pixels. The algorithm works on a gray scale image. During the successive flooding of the grey value relief, watersheds with adjacent catchment basins are constructed. This flooding process is performed on the gradient image, i.e. the basins should emerge along the edges. Normally this will lead to an over-segmentation of the image, especially for noisy image material, e.g. medical CT data. Either the image must be pre-processed or the regions must be merged on the basis of a similarity criterion afterwards.

A set of markers, pixels where the flooding shall start, are chosen. Each is given a different label. The neighboring pixels of each marked area are inserted into a priority queue with a priority level corresponding to the gradient magnitude of the pixel. The pixel with the lowest priority level is extracted from the priority queue. If the neighbors of the extracted pixel that have already been labeled all have the same label, then the pixel is labeled with their label. All non-marked neighbors that are not yet in the priority queue are put into the priority queue. Redo step 3 until the priority queue is empty. The non-labeled pixels are the watershed lines.

Optimal spanning forest algorithms (watershed cuts) Watersheds as optimal spanning forest have been introduced by Jean Cousty et al. They establish the consistency of these watersheds: they can be equivalently defined by their “catchment basins” (through a steepest descent property) or by the “dividing lines” separating these catchment basins (through the drop of water principle). Then they prove, through an equivalence theorem, their optimality in terms of minimum spanning forests. Afterward, they introduce a linear-time algorithm to compute them. It is worthwhile to note that similar properties are not verified in other frameworks and the proposed algorithm is the most efficient existing algorithm, both in theory and practice.

Links with other algorithms in computer vision

Graph cuts In 2007, C. Allène et al. established links relating Graph Cuts to optimal spanning forests. More precisely, they show that when the power of the weights of the graph is above a certain number, the cut minimizing the graph cuts energy is a cut by maximum spanning forest.

… excerpt ends here. Continue reading the full article.

Illustrations

Watershed (image processing) illustration
Watershed (image processing) illustration
Watershed (image processing) illustration
Watershed (image processing) illustration
Watershed (image processing): Example of a marker-supported watershed transformation for a population of pharmaceutical pellets. Watershed lines are superimposed in black on the CT image stack.[11]
Example of a marker-supported watershed transformation for a population of pharmaceutical pellets. Watershed lines are superimposed in black on the CT image stack.[11]

Worked examples

Example 1 — a first encounter with Watershed (image processing)

Start with the simplest possible case. Write down what Watershed (image processing) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Watershed (image processing) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Watershed (image processing) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Watershed (image processing)

In research
Watershed (image processing) appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Watershed (image processing) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Watershed (image processing) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Image segmentation, Mathematical morphology, so understanding it makes those chapters shorter.
In everyday life
Look for Watershed (image processing) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Watershed (image processing)” →

How to study Watershed (image processing) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Watershed (image processing) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Watershed (image processing) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Watershed (image processing) in simple terms?

In the study of image processing, a watershed is a transformation defined on a grayscale image. The name refers metaphorically to a geological watershed, or drainage divide, which separates adjacent drainage basins.

Why does Watershed (image processing) matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Watershed (image processing)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Watershed (image processing).

Tags

  • Image segmentation
  • Mathematical morphology

Keep exploring