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$>
References: <itq9tr$4a3$> <itqvji$et2$> <itvecg$3pn$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1308896165 20664 (24 Jun 2011 06:16:05 GMT)
NNTP-Posting-Date: Fri, 24 Jun 2011 06:16:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:733528

"Padmavathy Subramanian" wrote in message <itvecg$3pn$>...
> 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:

Roger Stafford