First input must be single or double. how to solve?

27 views (last 30 days)
I am running the Modified decision based unsymmetric trimmed median filter for gray image and getting the errors like this
First input must be single or double.
Error in trimf(line 17)
y=median(y(:));% Meadin of the required data
Error in mdbutmfg (line 66)
rp=trimf(wnim); %calling Trimmed mean
filter
what can be the probable reasons and solutions

Answers (1)

John D'Errico
John D'Errico on 11 Feb 2016
READ THE ERROR MESSAGE!
Is y a single or double precision there? If not, then think about what it means.
My guess is, y is a uint8 image.
help single
help double

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!