Hi...I got some issue here,i get "undefined function or variable matlab 'sout'. The first class assignment to a local variable determine its class"

I keep trying to solve but still can't. Some buddy can help me solve this? I appreciate your advice !

1 件のコメント

John D'Errico
John D'Errico 2016 年 5 月 23 日
We might try, but how can we see? Is there text in that image?

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

 採用された回答

t0 = 60;
imgmin = 0;
imgmax = 0;
imgmin = min(img(:));
imgmax = max(img(:));
th = t0 + (imgmin + imgmax)./2;
sout = zeros(size(img));
sout = img > th;

その他の回答 (1 件)

Replace the whole function contents with this:
t0 = 60;
threshold = t0 + (max(img(:)) + min(img(:))) / 2;
sout = img > threshold;

1 件のコメント

ching linnkee
ching linnkee 2016 年 5 月 24 日
thanks for your reply, but it still no work. It come out the threshold variable issue.

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

カテゴリ

ヘルプ センター および File ExchangePrinting and Saving についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by