【实例简介】:裂缝识别
【实例截图】
【核心代码】
function pushbuttonOpenFile_Callback(hObject, eventdata, handles)
% hObject handle to pushbuttonOpenFile (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';...
'*.*','All Files' },'载入图像',...
fullfile(pwd, 'images'));
if isequal(filename, 0) || isequal(pathname, 0)
return;
end
I = imread(fullfile(pathname, filename));
Result = Process_Main(I);
handles.File = fullfile(pathname, filename);
handles.Result = Result;
guidata(hObject, handles);
InitAxes(handles)
axes(handles.axes1); imshow(handles.Result.Image); title('原图像');