How to create dams without any markers using the "watershed" function?

I am working with "watershed" function from Image Processing Toolbox. I would like to know whether the standard "watershed" method, without any markers, create any dams? Will the "watershed" method without the use of markers give me the left or right solution?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2021 年 6 月 17 日

0 投票

The "watershed" function will produce one catchment basin for each local minimum in the input. The curve provided has 3 local minima, and so the watershed function will produce three labeled catchment basins.
Here is a simplified curve with the same basic shape:
x = [5 4.5 2.8 1 1.7 2.3 1.0 1.2 2.7 3.8 3.6 3.8 4.8 5.4 5.7]
And here is the output of watershed:
watershed(x)
ans =
 1×15 uint8 row vector
 1 1 1 1 1 0 2 2 2 0 3 3 3 3 3

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGenomics and Next Generation Sequencing についてさらに検索

製品

リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by