Error in storing values

4 Ansichten (letzte 30 Tage)
kash
kash am 22 Mai 2012
I have a code
for xx = 1:length(dirlist(1:2))
x = imread([pathname, dirlist(xx).name]);
x=rgb2gray(x);
x=double(x);
n = numel(x);
A1_20 = repmat(A,[1,1,20]);
t = ones(size(A));
for j1 = 1:size(A1_20,3)
p = t;
p(randi(n,3000,1)) = 0;
A1_20(:,:,j1) = A1_20(:,:,j1).*p;
w{j}{s1}{s2} =A1_20(:,:,j1);
y1 = idualtree2D(w, J, Fsf, sf);
Er= mean2((single(x) - single(y1)).^2);
final_col2{xx}=min(Er)
% figure,imshow(uint8(y1))
Er1= mean2((single(x) - single(y1)).^2)/20;
Mse{j1}=Er1
end
end
end
end
end
i have taken two images,Mse{j1} stores error for only second image,i want even for 1st image to be stored,the second image error values is overwriting the first ,please help how to store both
  2 Kommentare
Jan
Jan am 22 Mai 2012
What is the difference to your last questions http://www.mathworks.com/matlabcentral/answers/39045-displaying-the-image ?
Posting duplicate questions wastes the time of the ones, who want to assist you voluntarily. I appreciate, that you've formatted the code this time, but you still hesitate to do this in the other thread and you do not reply to my questions there. Therefore I assume, that you do not want me to help you and that's ok.
kash
kash am 23 Mai 2012
Jan i think you have mistaken ,both are different questions,the cyclist has answered for my question,i have replied to u in my previous thread,only after his reply i have posted the duplicate question,I did not think u will delete it,i want every one to help me,if possible plz answer my question posted above

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

the cyclist
the cyclist am 22 Mai 2012
I haven't looked in detail, but it looks like the variable xx counts over your images? So, if you replace this line
Mse{j1}=Er1
with this
Mse{xx,j1}=Er1
do you get everything you want stored in Mse?
  1 Kommentar
kash
kash am 22 Mai 2012
Thanks a lot i got as i required ,now a small thing in that i want to find the minimum error and display the image which has minimum error ,please help,so i will get 2 images

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by