this is the function I used to get the image
function selectImage_Callback(hObject, eventdata, handles)[filename, pathname] = uigetfile({'*.jpg';'*.bmp';'*.png''*.jpeg'},'File Selector'); handles.myImage = strcat(pathname, filename); axes(handles.imageAxes2); imshow(handles.myImage) % save the updated handles object
clear axes scale axis off guidata(hObject,handles);
and I'm trying to use the same image in another function
function classifyImage_Callback(hObject, eventdata, handles) net = alexnet; image = handles.myImage; image = imresize(image,[227 227]); label = classify(net,image); set(handles.imageType, 'String' , label)
%
Best Answer