フィルターのクリア

while running d code below error is showing and can i inecrease the height of the stem.

3 ビュー (過去 30 日間)
Sapam Jaya
Sapam Jaya 2013 年 11 月 5 日
編集済み: Sapam Jaya 2013 年 11 月 5 日
close all; clear all; clc; data=imread('cameraman.tif'); figure(1),imshow(data);
h=imhist(data);
h1=h(1:10:256);
horz=1:10:256;
figure(2), stem(horz,h1,'fill')
axis([0 255 0 15000])
set(gca,'xtick',[0:50:255])
set(gca,'ytick',[0:2000:15000])
s=size(data)
count =0;
for x=1:256
for y=1:256
if data(x,y)==248
count=count+1;
end;
end;
end;
for x=1:256
for y=1:256
f=(1/2)*((sum((max(data)-data(x,y)).^4))*(count/65536))/(sum((max(data)-data(x,y)).^2))
mf(x,y)=exp(-(max(data)-data(x,y)).^2/2*f);
%fuzzification
I=(mf(x,y)./data(x,y));
end;
end;
  2 件のコメント
Sapam Jaya
Sapam Jaya 2013 年 11 月 5 日
error is ??? Undefined function or method 'exp' for input arguments of type 'uint8'. Error in ==> ann at 26 mf(x,y)=exp(-(max(data)-data(x,y)).^2/2*f);
Sapam Jaya
Sapam Jaya 2013 年 11 月 5 日
please help asap

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

回答 (1 件)

Wayne King
Wayne King 2013 年 11 月 5 日
exp() does not accept uint8 inputs. Do your data have to be uint8?
Can you cast both your f and data variables to doubles?
f = double(f);
data = double(data);

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by