Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: damage measurement in a micrograph
Date: Thu, 29 Oct 2009 22:07:01 +0000 (UTC)
Organization: iitkanpur
Lines: 61
Message-ID: <hcd3m5$a9e$1@fred.mathworks.com>
References: <hcadg1$3m1$1@fred.mathworks.com> <op.u2kwubcja5ziv5@uthamaa.dhcp.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256854021 10542 172.30.248.37 (29 Oct 2009 22:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Oct 2009 22:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2015903
Xref: news.mathworks.com comp.soft-sys.matlab:581157


"Ashish Uthama" <first.last@mathworks.com> wrote in message <op.u2kwubcja5ziv5@uthamaa.dhcp.mathworks.com>...
> On Thu, 29 Oct 2009 15:56:03 -0400, Krishna Chaitanya  
> <chaitanya.alur@gmail.com> wrote:
> 
> > ImageAnalyst <imageanalyst@mailinator.com> wrote in message  
> > <655ad327-a1b1-417c-b0f9-40d2643158ca@x5g2000prf.googlegroups.com>...
> >> Just do a web search for "free image hosting" and you'll find plenty
> >> of options such as flickr.com, imageshack.us, etc.  Just upload it
> >> somewhere so that everyone (not just me) can see it and offer you
> >> advice.
> >
> >
> > _____________________________
> >
> > Thanks for the information..
> >
> > here is the link for the micrograph...
> >
> > http://www.flickr.com/photos/30274557@N05/4056558292/
> >
> > the black portionis the damage and i have to measure the total damage in  
> > that figure (total black portion but grain boundaries(thin lines in  
> > between grains) are not to be counted)
> >
> > i'm able to locate the only damged part using the function,
> >
> > "rgb_bw_closed = imclose(rgb_r_bw, strel('disk',2));"
> >
> >  but unable to figure out the total area ........
> >
> > just have a look at it....
> 
> I had some fun with the image:
> 
> in=imread('in.jpg');
> 
> %intensity image
> hsv=rgb2hsv(in);
> v=hsv(:,:,3);
> %imtool(v); %Used to objectively seletc the threshold
> 
> %threshold
> v_bw=v>.6;
> %imshow(v_bw);
> 
> %remove lines by closing
> v_close=imclose(v_bw,strel('disk',2));
> imshow(v_close);
> 
> %look up doc - this would give you the area of individual blobs. You could  
> threshold the 'size' of the blobs if you wish..
> stats=regionprops(~v_close,'Area')
> CC = bwconncomp(~v_close);
> L = labelmatrix(CC);
> RGB = label2rgb(L);
> imshow(RGB)

_____________________________________
thank you....i'm using R2008...seems there is some problem with the function 'bwconncomp'....its saying that 'no function exists like that'....

Instead of that I selected the binary image and counted the total no. of 0(zeros) in that and we know the size of the image (m*n) i.e. total number of elements (pixels) in that image...so we can caliculate the % of damage....hope this will do......