i want to perform average thresholding

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 Kommentare

Geoff Hayes
Geoff Hayes am 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
kalyani ohri am 30 Jan. 2016
Dear Sir yes the code was written by me .I have performed gray thresholding but the results are not so obtained that i needed. So base paper which i am following have performed average thresholding so i need mcode for average thresholdingf
kalyani ohri
kalyani ohri am 30 Jan. 2016
This image i have taken
kalyani ohri
kalyani ohri am 30 Jan. 2016

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 30 Jan. 2016

0 Stimmen

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

Gefragt:

am 29 Jan. 2016

Beantwortet:

am 30 Jan. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by