Image processing: Minimizing function (regularized least square problem)

2 Ansichten (letzte 30 Tage)
Hello,
I'm trying to minimize this function (by A):
argmin A (|L(A)|^2 + a*||A-B||^2*)
where:
  • A is a MxN image
  • L is the Laplacian Operator
  • .|| is the usual norm operator
  • a is a weight parameter
  • B is a matrix of size (M+2*k)xN where k is an integer parameter.
  • * indicates that we just consider the pixels in the boundary (we want to preserve in A the pixels in the boundary of B).
Maybe the problem has a trivial solution, but I'm absolutely blocked.
If you need more details, it's (4) equation in this paper.
I will be very grateful for any help provided.

Akzeptierte Antwort

Matt J
Matt J am 30 Sep. 2012
Bearbeitet: Matt J am 30 Sep. 2012
Below is a direct linear algebraic solution. It works by rewriting the problem as
min || H*A(:)-y ||^2
for an appropriate matrix H and vector y. Whether it will be practical for you depends on the magnitudes of M,N and the power of your computer. Also, you will have to modify sqrt(a)*Imn and B(:) to include only the boundary pixels (just delete the rows corresponding to those pixels).
[M,N]=size(A);
Im=speye(M);
In=speye(N);
Imn=speye(M*N);
Dx=diff(Im,2,1);
Dy=diff(In,2,1);
LA=kron(Dx,In)+kron(Im,Dy); %Laplacian operator
H=[LA; sqrt(a)*Imn];
y=[zeros(size(LA,1),1); B(:) ];
A_solution=reshape( H\y, M,N);
  14 Kommentare
OJ27
OJ27 am 28 Dez. 2017
in this case, when I create the H, I would replace sqrt(a)*Imn by k, however I don't know what form I have to put k since they are different dimensions. Should I make k sparse? also, since they are different norms, will that change the implementation
Matt J
Matt J am 28 Dez. 2017
OLGA, there is no algebraic solution to the the problem you've written. You will have to use an iterative solver, probably ga(). For ga(), you don't need matrix implementations of the different operators. Just implement the objective function in function form and pass an appropriate function handle to the solver.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Laurentiu
Laurentiu am 12 Jan. 2014
gui_tech: I am working on the implementation of the paper as well. Were you able to fix the problem with the low intensities in the solution ? I am also getting these -1*10^3 intensities in A.
Any help would be appreciated.
  1 Kommentar
Matt J
Matt J am 12 Jan. 2014
Bearbeitet: Matt J am 12 Jan. 2014
Possibly, my implementation of the Laplace operator is not what the paper expects. It might be worth trying to use
to convert whatever routine you normally use to compute L(A) to matrix form.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by