i am getting error in line 35
Show older comments
RGB =imread('mammogram.jpg');
hsv=rgb2hsv(RGB);
imshow(hsv);
i= 0:20:240;
r1=0.1;
r2=0.85;
s= 0.8;
wgray1= 1-s.^(r1*(255./i).^r2);
i= 0:20:240;
r1= 0.1;
r2=0.85;
s=0.0;
wgray2= 1-s.^(r1*(255./i).^r2);
i= 0:20:240;
r1=0.1;
r2=0.85;
s=0.2;
wgray3= 1-s.^(r1*(255./i).^r2);
i= 0:20:240;
r1=0.1;
r2= 0.85;
s=0.4;
wgray4= 1-s.^(r1*(255./i).^r2);
i= 0:20:240;
r1=0.1;
r2=0.85;
s=0.6;
wgray5= 1-s.^(r1*(255./i).^r2);
i= 0:20:240;
r1=0.1;
r2=0.85;
s=1.0;
wgray6= 1-s.^(r1*(255./i).^r2);
level = graythresh(wgray1+wgray2+wgray3+wgray4+wgray5+wgray6);
BW= im2bw(level,wgray1+wgay2+wgray3+wgray4+wgray5+wgray6); *line 35*
imshow(BW);
1 Comment
kalyani ohri
on 29 Jan 2016
Answers (1)
Walter Roberson
on 29 Jan 2016
0 votes
im2bw() needs the parameters in the other order, image first and level second.
1 Comment
Walter Roberson
on 29 Jan 2016
Please mark the Answer as Accepted if the question is solved.
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!