Error using listbox multiselection for image SNR manipulation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to use a listbox multiselection to add images together and median combine for SNR improvement comparison reasons. I first allow the multiselection from the list box using:
%Get selected files from listbox selection
set(handles.listbox1, 'Max',2,'Min',0) %allow multi selection
list=handles.listbox1;
temp = get(list, 'String');
selected = temp(get(list, 'Value'));
set(list, 'Value', []); %Clear current selection for next time
I then use the following to perform the sum and median combine:
l=length(selected)
path=getappdata(0,'Folder'); %Get the folder
imSum=[]; %initialise
imStack=[];
for i=1:l
file=fullfile(path,selected{i})
im=double(imread(file));
imSum=imSum+im;
imStack=cat(3,imMed,im)
end
imMed=median(ImgStack,3);
However, I get an error:
Error using +
Matrix dimensions must agree.
Error in MultiImageanalysis>pushbuttonAddImages_Callback (line 1372)
imSum=imSum+im;
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!