<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236954</link>
    <title>MATLAB Central Newsreader - unstable and un-convergence total variation regularization (with the code)</title>
    <description>Feed for thread: unstable and un-convergence total variation regularization (with the code)</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 03 Oct 2008 03:49:01 -0400</pubDate>
      <title>unstable and un-convergence total variation regularization (with the code)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236954#603503</link>
      <author>sheng fang</author>
      <description>HI,everyone:&lt;br&gt;
&lt;br&gt;
I am working to solve a linear ill-posed problem Au=f using total variation regularization as follows:&lt;br&gt;
&lt;br&gt;
min || A*u - f ||^2_L^2  +  lambda*TV(u)&lt;br&gt;
&lt;br&gt;
However, the TV regularized solution is not stable. When the lambda is large, the solution contains large oscillation. When the lambda is small, the solution remains the same as the direct matrix inversion solution,i.e. u=f\A. Besides, the solution doesn't converge. Whatever lambda is, it is either one of the aforemention cases.&lt;br&gt;
&lt;br&gt;
This really puzzles me, because the same code works well for denoising. will anyone give me some hints?&lt;br&gt;
Thanks a lot!&lt;br&gt;
&lt;br&gt;
Code:&lt;br&gt;
&lt;br&gt;
% solve the WING problem using TV regularization:&lt;br&gt;
% min || A*u - f ||^2_L^2  +  lambda*TV(u)&lt;br&gt;
%% setup problem&lt;br&gt;
n=64;% length of tested data.&lt;br&gt;
t1=1/3;&lt;br&gt;
t2=2/3;&lt;br&gt;
&lt;br&gt;
% Set up matrix A.&lt;br&gt;
A = zeros(n,n); h = 1/n;&lt;br&gt;
sti = ((1:n)-0.5)*h;&lt;br&gt;
for i=1:n&lt;br&gt;
&amp;nbsp;&amp;nbsp;A(i,:) = h*sti.*exp(-sti(i)*sti.^2);&lt;br&gt;
end&lt;br&gt;
% set up the idea solution;&lt;br&gt;
I = find(t1 &amp;lt; sti &amp; sti &amp;lt; t2);&lt;br&gt;
u0 = zeros(n,1); u0(I) = sqrt(h)*ones(length(I),1);&lt;br&gt;
% setup the right-hand &lt;br&gt;
f = sqrt(h)*0.5*(exp(-sti*t1^2)' - exp(-sti*t2^2)')./sti';&lt;br&gt;
&lt;br&gt;
%% solve by TV regularized problem&lt;br&gt;
% parmeters setup&lt;br&gt;
ep2 = 1e-3;&lt;br&gt;
dt = 0.02; % time step&lt;br&gt;
lambda = 1;&lt;br&gt;
nx = size(f,1);&lt;br&gt;
NumSteps=400; % iteration number&lt;br&gt;
&lt;br&gt;
u=zeros(size(f));% set initial value&lt;br&gt;
&lt;br&gt;
for i=1:NumSteps,  &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% estimate derivatives&lt;br&gt;
	u_x = (u([2:nx nx],:)-u([1 1:nx-1],:))/2;&lt;br&gt;
	u_xx = u([2:nx nx],:)+u([1 1:nx-1],:)-2*u;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% compute flow&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Num = ep2.*u_xx;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Den = (ep2+u_x.^2).^(3/2);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;u_tv = Num./Den;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;u_fidelity = 2*A'*(f-A*u);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% evolve image by dt&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;u=u+dt*(lambda*u_tv+u_fidelity);  &lt;br&gt;
end &lt;br&gt;
%% display&lt;br&gt;
figure(2);plot(u,'r');hold on;plot(u0,'-.k');hold off;legend('tv','original');</description>
    </item>
    <item>
      <pubDate>Fri, 03 Oct 2008 05:46:02 -0400</pubDate>
      <title>Re: unstable and un-convergence total variation regularization (with the code)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236954#603517</link>
      <author>Bruno Luong</author>
      <description>&quot;sheng fang&quot; &amp;lt;maelstromer@gmail.com&amp;gt; wrote in message &amp;lt;gc44nd$ejf$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This really puzzles me, because the same code works well for denoising. will anyone give me some hints?&lt;br&gt;
&amp;gt; Thanks a lot!&lt;br&gt;
&lt;br&gt;
Have you studied the stability of your discretization scheme? Notably selecting dt by Courant-Friedich-Lecy and/or discretize the TV term by upwind scheme?&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Fri, 03 Oct 2008 06:19:02 -0400</pubDate>
      <title>Re: unstable and un-convergence total variation regularization (with the code)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236954#603520</link>
      <author>Bruno Luong</author>
      <description>In complement, see for example:&lt;br&gt;
&lt;br&gt;
SIGAL GOTTLIEB, CHI-WANG SHU&lt;br&gt;
TOTAL VARIATION DIMINISHING RUNGE-KUTTA SCHEMES&lt;br&gt;
&lt;br&gt;
MATHEMATICS OF COMPUTATION&lt;br&gt;
Volume 67, Number 221, 73-85, January 1998.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Fri, 03 Oct 2008 07:12:02 -0400</pubDate>
      <title>Re: unstable and un-convergence total variation regularization (with the code)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236954#603524</link>
      <author>sheng fang</author>
      <description>&quot;Bruno Luong&quot; &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;gc4dgm$4nu$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; In complement, see for example:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; SIGAL GOTTLIEB, CHI-WANG SHU&lt;br&gt;
&amp;gt; TOTAL VARIATION DIMINISHING RUNGE-KUTTA SCHEMES&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; MATHEMATICS OF COMPUTATION&lt;br&gt;
&amp;gt; Volume 67, Number 221, 73-85, January 1998.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
Hi, Bruno:&lt;br&gt;
&lt;br&gt;
Thank you very much!&lt;br&gt;
I download the paper and I am working on it!&lt;br&gt;
&lt;br&gt;
Sheng Fang</description>
    </item>
  </channel>
</rss>

