? ]]>

thanks for the advertisment!

@ Why we did not cite the other paper: We did not know about it in June when we submitted our draft.

timeline from my point of view:

– 21-22 /09/2012 (Graz: Trends in Optimization and Control Colloquium) O. Scherzer: Tube Methods for Total Variation Minimization.

Otmar presented the explicit TGV-solution for characteristic function.

– 17/06/2013: paper submitted to Communications in Math. Science

– 20/09/2013: Mr. Papafitsoros sent his draft to O. Scherzer. Because our paper got cited there ..

– 27/09/2013: we put our paper online on ArXiv

@ similar pictures: That’s a good thing: The solution seems to be correct ;)

Greetings from Grenoble,

Christiane

I am a novice in matlab. I have an image and I want to compute the gradient and divergence of the image. I was till recently using the gradient command. However I found that it is painfully slow. So I read your blog. Can you tell me the gradient command in matlab does forward difference, backward difference or central difference ?

An can you give me an idea regarding what should I use instead of that so as to make it faster ?

Thanks in advance.

Devraj

Here’s an operator for horizontal differences. You can also use “diff”, but I wanted to later compose this (to put it into a Laplacian) so the output had to be the right size, and this also gives me control over boundary conditions.

diff_h = @(X) [zeros(n1,1),X(:,1:end-1)] – [X(:,1:end-1),zeros(n1,1) ]; % fast

Now, here’s the analogous operation for vertical differences. But the problem is that we want to augment a matrix by adding a row of zeros, not a column of zeros, and this is very slow due to the column-major format:

diff_v = @(X) [zeros(1,n2);X(1:end-1,:)] – [X(1:end-1,:);zeros(1,n2) ]; % slow (6x slower)

So instead, use this:

diff_v_t = @(Xt) ([zeros(n2,1),Xt(:,1:end-1)] – [Xt(:,1:end-1),zeros(n2,1) ])’; % fast

and then instead of calling diff_v(X), call diff_v(X’). It requires two extra transposes, but I found that it was still much faster.

For other boundary conditions, you can do similar tricks.

]]>