how com from the number of neighborhood size of adaptthresh

3 ビュー (過去 30 日間)
mohd akmal masud
mohd akmal masud 2023 年 1 月 23 日
コメント済み: mohd akmal masud 2023 年 1 月 24 日
Hello all,
I've tried the neighborhood size as default for adaptthresh as in figure attached.
The value 42 I know it come from, But I dont know how come the value 26 from?
anyone can explain to me?
>> bb=2*floor(size(spect)/16)+10
bb =
42 42 26
  4 件のコメント
DGM
DGM 2023 年 1 月 24 日
編集済み: DGM 2023 年 1 月 24 日
That parameter is the size of a rectangular window which has odd geometry and is at least size(I)/16 in radius. Note two things. First, the trailing addend is 1, not 10.
x = [256 256 142];
y = 2*floor(x/16)+1
y = 1×3
33 33 17
Second, if you want the window width to be 2*floor(size(I)/16)+1, you don't need to specify it. That's just how it's calculated internally by default.
As to why it needs to be odd, that's often desirable for one of two reasons. First, an odd window gives you a clear center pixel. Second, since the median is being calculated, it gives you a clear central order statistic.
As to why it's size(I)/16, I don't know off the top of my head. I'd have to look at the references and the code.
mohd akmal masud
mohd akmal masud 2023 年 1 月 24 日
Thank you @Image Analyst and @DGM, I understand.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by