本帖最后由 ppp10w 于 2017-5-5 13:04 编辑
function loadimage_Callback(hObject, eventdata, handles)
% hObject handle to loadimage (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global i;
global A;
global B;
if(i<7)
try
[filename, pathname] = uigetfile({'*.jpg';'*.png';'*.tif';'*.bmp'}, '载入图像');
imagePath = [pathname filename];
in = imread(imagePath);
str1 = 'axes(handles.axes';
str2 = ')';
str = [str1,num2str(i),str2];
eval(str);
imshow(in);
catch
end
A(:,:,i)=in;
i=i+1;
elseif(i>6)
helpdlg('最多加载6张图片!','提示');
end
A=uint8(A);
B=i-1;
% --- Executes on button press in process.
function process_Callback(hObject, eventdata, handles)
% hObject handle to process (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global A;
global B;
filespec_user = [pwd '\createword.doc'];
% 判断Word是否已经打开,若已打开,就在打开的Word中进行操作,否则就打开Word
try
% 若Word服务器已经打开,返回其句柄Word
Word = actxG