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

25 次查看(过去 30 天)
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

回答(1 个)

John D'Errico
John D'Errico 2016-2-11
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!

Translated by