So I'm trying to read the image and then pass it through a function so that I can perform image analysis with some defined parameters.
For the "Load Image" button here's the code:
% Button pushed function: LoadImageButton
function LoadImageButtonPushed(app, event)
[FileName, FilePath]= uigetfile('.TIF');
imshow(I, 'Parent' , app.UIAxes); %Displays selected image onto original image
I would then need to define some paratmers (Filter Size, Threshold, Cut Cells Regions) before running my external function. Once you input the paramters and press "Compute", I'm hoping that it would go into my function that I've written (called trialfunction here):
function ComputeButtonPushed(app, event)
filter_size = app.FilterSizeEditField; %Input parameter
S = app.ValueEditField;
The "trial function" is just a simple range filter that manipulates the image (stored in a 2D matrix):
I_bin_regions = rangefilt(I_M,ones(filter_size,filter_size));
However, I'm having trouble linking the data from I (2D matrix) into my function. How can I "connect" the "Load Image" function with the "Compute Button" function?
Thanks so much!
Note: I have tried adding app.I.ImageSource = imread (...) but that doesn't work. Error message says "
Unrecognized method, property, or field 'I' for class 'imageprocessing'.