image - For the array I am getting values either 0 and 255 and nothing in between for matlab? -
i using code:
for m_cof=1:3 n_cof=1:3 fixed_term=(((2*(m_cof-1)+1)*(2*(n_cof-1)+1))/(g(1)*g(2))); c(m_cof,n_cof)=0; u=1:g(1) y=((2*u)/g(1)); uof=polynomial1(y,m_cof); v=1:g(2) z=((2*v)/g(2)); vof=polynomial1(z,n_cof); f=f_template(u,v); iop=(fixed_term*f_template(u,v)*uof*vof) c(m_cof,n_cof)=iop+c(m_cof,n_cof) end end end end`
where f_template
rgb grey image array, but contents of c
0 , 255 , nothing in between can please help?
it looks experiencing saturation due data type image belongs to. overcome this, cast image double
, try code again.
simply put, @ beginning of code before nested loops:
f_template = double(f_template);
Comments
Post a Comment