Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Implementing Mean Curvature Flow (MCF) for an image in Matlab
Date: Fri, 24 Jun 2011 06:16:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <iu1a35$k5o$1@newscl01ah.mathworks.com>
References: <itq9tr$4a3$1@newscl01ah.mathworks.com> <itqvji$et2$1@newscl01ah.mathworks.com> <itvecg$3pn$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1308896165 20664 172.30.248.45 (24 Jun 2011 06:16:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 24 Jun 2011 06:16:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:733528

"Padmavathy Subramanian" wrote in message <itvecg$3pn$1@newscl01ah.mathworks.com>...
> Below are the steps that I calculated in my matlab program
> 1. Compute Ix and Iy 
> Ix=imfilter(I,hx,'replicate','conv');
> Iy=imfilter(I,hy,'replicate','conv');
> where hx and hy are 2D gaussian kernels along x direction and y direction 
> 
> 2. Compute Ixx, Ixy and Iyy 
> I get stuck in calulating these three matrices and I need advise on how to do it. 
- - - - - - - - - -
  For Ixx, Ixy, and Iyy I would try using the three second partial derivatives of the 2D gaussian distribution function to make gaussian kernels hxx, hxy, and hyy in a manner analogous to the way you created hx and hy.  Guanglei Xiong has a FEX file written in 2005 which finds the gaussian gradient with hx and hy, probably much as you have done.  If you follow that example but use second partial derivatives instead of first partial derivatives, I would think you could create Ixx, Ixy, and Iyy without any great difficulty.  I would guess you could use the same sigma as in Ix and Iy.  Of course you will have to arrange that everything is properly scaled.

  You probably already have this FEX link, but in case you don't, it is located at:

http://www.mathworks.com/matlabcentral/fileexchange/8060-gradient-using-first-order-derivative-of-gaussian/content/gaussgradient/gaussgradient.m

Roger Stafford