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 CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by