I am trying to compare an uploaded image to a trained neural network in an application. I have been ablet o upload an image using a push button, however, I am not able to have that image analyzed by the trained neural network. Below is the code for the application and I am unsure where the failure is occuring. Please let me know what you think would be the best way to go about this. Thank You
methods (Access = private) function results = startupfunc(app) x_net = load("xraycat.mat"); x_net = app.net.net; end end methods (Access = private) % Button pushed function: UploadImageButton function UploadImageButtonPushed(app, event)[File_Name, Path_Name] = uigetfile('PATHNAME');imshow([Path_Name,File_Name],'Parent',app.UIAxes); end % Button pushed function: AnalyzeImageButton function AnalyzeImageButtonPushed(app, event)[YPred, Scores] = predict(app.net, [File_name, Path_Name]);imshow([YPred, Scores],'Parent',app.UIAxes2); end end
Best Answer