I am getting the following error message in Matlab "Unrecognized function or variable 'adaptivethreshold'" when every time I want to use Adaptive Threshold function
clear;close all;
im1=imread('page.png');
im2=imread('tshape.png');
bwim1=adaptivethreshold(im1,11,0.03,0);
bwim2=adaptivethreshold(im2,15,0.02,0);
subplot(2,2,1);
imshow(im1);
subplot(2,2,2);
imshow(bwim1);
subplot(2,2,3);
imshow(im2);
subplot(2,2,4);
imshow(bwim2);
those coding from https://www.mathworks.com/matlabcentral/fileexchange/8647-local-adaptive-thresholding
You should open MATLAB editor inside a folder containing all files:
adaptivethreshold.m,page.png,testadaptivethreshold.m,tshape.pngand run your scripttestadaptivethreshold.Or, you can copy-paste the function definition below the script as follows and make sure also that the images are in the same folder or MATLAB search path.
And here is how it shows the output: