Displaying Image having minimum Mse
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
I am performing dualtree3D,i have a code for this
x=rand(256,256,10);
x=double(x);
J=1;
[Faf, Fsf] = FSfarras;
[af, sf] = dualfilt1;
w = dualtree3D(x, J, Faf, af);
now i have created 10matrices and have multiplied w with those matrices
n = numel(A);
A1_10 = repmat(A,[1,1,1,10]);
t = ones(size(A));
for j1 = 1:10
tic
p = t;
p(randi(n,9000,1)) = 0;
A1_10(:,:,:,j1) = A1_10(:,:,:,j1).*p;
w{1}{2}{3} =A1_10(:,:,:,j1);
y1 = idualtree3D(w, J, Fsf, sf);
end
so y1 will contans 10 images processed in that loop,now i want to find or dispalay the image which has minimum error(i.e calculating Mse),if it is not possible to display please tell how to find the image having minimum error
Risposte (1)
Image Analyst
il 3 Set 2012
Modificato: Image Analyst
il 3 Set 2012
Make y1 an array
y1(j1) = ......
and then keep track of min MSE like you do for anything that you want to keep track of min or max:
best_j1 = 1
minMSE = inf;
for j1 = 1 : 10
MSE(j1) = .... % Do calculation. Make array in case we want to inspect
if MSE(j1) < minMSE
best_j1 = j1;
minMSE = MSE(j1);
end
end
Or find it after the loop, instead of keeping track inside the loop:
[sortedMSE indexes] = sort(MSE, 'descend');
minMSE = sortedMSE(1);
best_j1 = indexes(1);
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!