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