How to optimize a function ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!