Error using listbox multiselection for image SNR manipulation
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!