How to optimize a function ?

1 回表示 (過去 30 日間)
Rawan hamdi
Rawan hamdi 2013 年 4 月 11 日
Hi, i'm running a denoising algorithm on an image which is 3D image and i'm trying to implement some equations and i need help here's my code:
close all Bands =191; %no of bands
SIZE = [280,307 ,191]; %WxHxBands
lam = 0.063; B=12; X0 = multibandread('dc.tif', SIZE, 'int16',1252*2, 'bsq', 'ieee-le');
%%% Add noise (zero-mean Guassian &Salt and pepper ) % show original and noisy images
std_n=40; var_noise=std_n^2; % Gaussian noise standard deviation reduced_pw = 1.5*var_noise; % power to reduce in first phase %sig_w = 5; ws=4*sig_w+1; std_n=sqrt(var(X0(:))); Xn = randn(size(X0))*std_n; %noise
X = X0 + Xn;
figure;imagesc(abs((squeeze(X0(:,:,[50,35,30]))/max(X0(:))))); title('Original Image');
figure; imagesc(abs((squeeze(X(:,:,[50,35,30]))/max(X(:))))); title('Noisy Image ');%plotting noisy
[Gx,Gy,Gz] = gradient(X);
Rcub = sqrt((Gx.^2) + (Gy.^2) + ((Gz.^2) .*B));
------------------------------------------------------------------- now what i need to implement is this constrained least squares problem and then optimize it here's the equation :
x = argmin=||g-u||.^2+(lambda.*Rcub)
g is the observed noisy image
u is the clean image
Any help would be very appreciated Thanks

回答 (1 件)

Alan Weiss
Alan Weiss 2013 年 4 月 12 日
Maybe a documentation example is relevant.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 件のコメント
Rawan hamdi
Rawan hamdi 2013 年 4 月 12 日
will try it ,Thanks a lot !

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by