Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Displaying Image having minimum Mse

조회 수: 2 (최근 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