i want to perform average thresholding
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((wgray1+wgray2+wgray3+wgray4+wgray5+wgray6),level));
imshow(BW);
4 Comments
Geoff Hayes
on 29 Jan 2016
kalyani - you have provided some code and the statement i want to perform average thresholding. How is the code related to the problem that you are trying to solve? Was the code written by you? Are you observing any errors, and if so, what are they? Please clarify what it is you want help with. Attach an image (probably the one mentioned in the code) and indicate what it is you expect the code to do.
kalyani ohri
on 30 Jan 2016
kalyani ohri
on 30 Jan 2016
kalyani ohri
on 30 Jan 2016
Answers (1)
Image Analyst
on 30 Jan 2016
0 votes
I don't know what that is. It must be some name the author invented specially for his algorithm. You can try my interactive/visual thresholding app: http://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image

Categories
Find more on Feature Detection and Extraction 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!