Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Displaying Image having minimum Mse

1 回表示 (過去 30 日間)
kash
kash 2012 年 7 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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

回答 (1 件)

Image Analyst
Image Analyst 2012 年 9 月 3 日
編集済み: Image Analyst 2012 年 9 月 3 日
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);

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by