Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!b64g2000hsa.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Need algorithm help: molecule length from an image
Date: Sun, 11 May 2008 10:10:53 -0700 (PDT)
Organization: http://groups.google.com
Lines: 45
Message-ID: <99d7387b-c765-4f01-813e-cd850652fd4f@b64g2000hsa.googlegroups.com>
References: <g023qb$j0m$1@fred.mathworks.com>
NNTP-Posting-Host: 75.186.67.199
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1210525854 16540 127.0.0.1 (11 May 2008 17:10:54 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 11 May 2008 17:10:54 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: b64g2000hsa.googlegroups.com; posting-host=75.186.67.199; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
Xref: news.mathworks.com comp.soft-sys.matlab:467801


On May 9, 2:06=A0pm, "Adrian " <a...@med.unc.edu> wrote:
> Hello,
>
> My name is Adrian Randall and I work in an Electron
> Microscopy lab. I am trying to determine the lengths of
> molecules from images using MATLAB. I have just finished a
> semester of MATLAB, so I'm very familiar with the program. I
> need help coming up with an algorithm for such a program.
> Does anyone have any experience with image analysis that
> could give me a hand?
>
> Here is a link to what an electron micrograph looks like:http://www.unc.ed=
u/~arandall/image.png
>
> Thank you in advance for any suggestions!
>
> -Adrian Randall (ajr [at] med.unc.edu)

Adrian:
Thanks for posting the image in advance (that's one better than most
people).  I do have nearly 30 years of image analysis experience and
might be able to help you but you didn't say what you were looking for
and I don't recognize what is what in the image.  Is this an atomic
force microscopy image (the only one that I know of that allows you to
see individual atoms)?  Can you have the system imprint a scale bar
onto the image?  You need to do a spatial calibration on the image so
to determine the length of a molecule you first need some sort of
scale bar or other way of knowing how many pixels equal how many real
world unit.  If that molecule is that long squiggle then there are
many ways of finding it.  You could even just manually trace it.  But
then when you have the number of pixels long it is, you'll want to
convert than into nanometers or something.  This is where you'll need
the spatial calibration.

To find the squiggle, you could try something like a big blurring
(convolution) filter and subtract the original image, threshold, then
clean up a bit (maybe by doing a morphological closing operation to
make sure the squiggle is not in multiple pieces or a smaller median
filter to throw out small particles), then bwlabel() and regionprops()
and toss out all blobs except the blob with the largest area.  Then
look at its perimeter property.  Then multiply by your spatial
calibration factor.  That's what I'd try first and then I'd modify the
algorithm depending on the quality of results I achieved.
Regards,
ImageAnalyst