Path: news.mathworks.com!not-for-mail
From: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Need algorithm help: molecule length from an image
Date: Sun, 11 May 2008 20:04:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 51
Message-ID: <g07jfi$afk$1@fred.mathworks.com>
References: <g023qb$j0m$1@fred.mathworks.com>
Reply-To: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
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 1210536242 10740 172.30.248.37 (11 May 2008 20:04:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 11 May 2008 20:04:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:467811


"Adrian " <ajr@med.unc.edu> wrote in message <g023qb$j0m
$1@fred.mathworks.com>...
> 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.edu/~arandall/image.png 
> 
> Thank you in advance for any suggestions!
> 
> -Adrian Randall (ajr [at] med.unc.edu) 
------------
  Adrian, there is no denying that your problem is a difficult one and involves 
several stages.  In my opinion the most difficult stage comes after you have 
successfully processed an image to the point where it is a single connected 
black and white image without any false holes within it, giving a good 
silhouette of the laid-out molecule.  What I describe here is by no means a 
solution but merely an insight into what kinds of problems need to be solved.

  Think how human beings would proceed if faced with this problem.  They 
would probably start sketching little line segments or arcs which were more 
or less tangent to the shape at various points, and then they would begin 
drawing a kind of envelope along these lines or curves.  This would hopefully 
produce a single curve running along the centered-length of the shape.  
Finally they would probably whip out their handy little arc length tool with the 
calibrated wheel at one end and roll it along the total length of the curve to 
get its length.

  This should give you an idea of the formidable tasks that await you in this 
project if you want to develop a fully automated and reliable answer to your 
question.  You will need to find best-fitting line segments or arcs to various 
regions of the shape.  You need to be able to connect these into a single 
coherent envelope curve along the length of the shape.  Finally you need to 
determine the length of this envelope.

  Note to ImageAnalyst: In my opinion the length of the shape's perimeter 
(presumably divided by 2) is not a reliable measure of what Adrian is seeking 
as the over-all length of a molecule.  Its outline is likely to be a somewhat 
jagged affair as is characteristic of long-chain molecules with differing kinds 
of structures and would tend to give too large and inconsistent a value.  I 
think his problem is more difficult than that.

Roger Stafford