Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Minimize a function
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
sudesh

Posts: 15
Registered: 11/2/11
Minimize a function
Posted: Dec 28, 2012 2:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I need to minimize the following function for edge preservation in image restoration -

F(u)=summation of (abs(u(i,j)-y(i,j)) + 5/2(S1+S2)) ..... summation over all (i,j) belongs to Noisy set N
here S1=Summation of(2*abs(u(i,j)-u(m,n))^1.3) summation over all (m,n) belongs to some set N1
and
S2=Summation of(abs(u(i,j)-u(m,n))^1.3) summation over all (m,n) belongs to some set N2

Given: y is noisy image, amy as image obtained by adaptive median filter is given.

I have been trying to code this problem in following way, but not able to understand this correctly.

----------------------------
for i=1:numel(N)
V=[i-1 i+1 i-row i+row];
V(V<=0)=[];
NcV=intersect(V,Nc);
NV=intersect(V,N);
S1=0;S2=0;
for nm=1:numel(NcV)
S1=S1+(2*(abs(amy(N(i))-y(NcV(nm))))^1.3);
end

for nm=1:numel(NV)
S2=S2+(abs(amy(N(i))-y(NV(nm))))^1.3;
end
sum=sum+abs(amy(N(i))-y(N(i)))+(5/2)*(S1+S2);
end
-----------------------------

I think I need to include some function from optimization toolbox but dont know how in this situation. Please suggest!!!!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.