Image processing: Minimizing function (regularized least square problem)

조회 수: 2 (최근 30일)
gui_tech
gui_tech 2012년 9월 28일
댓글: Matt J 2017년 12월 28일
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.

채택된 답변

Matt J
Matt J 2012년 9월 30일
편집: Matt J 2012년 9월 30일
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
OJ27
OJ27 2017년 12월 28일
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 2017년 12월 28일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Laurentiu
Laurentiu 2014년 1월 12일
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
Matt J
Matt J 2014년 1월 12일
편집: Matt J 2014년 1월 12일
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.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by