i went to applicate the bilateral filter in residuel image (residel image=image origianle-image with weavlet transform) the errer is
Error using bfilter2 (line 35) Input image A must be a double precision matrix of size NxMx1 or NxMx3 on the closed interval [0,1].
i tried to normalizate my data with:
f = rand(256,256)
normf = max(f) - min(f); % this is a vector
normf = repmat(normf, [length(f) 1]); % this makes it a matrix
% of the same size as A
normalizedf = f./normf;
the valuue in matrix become betwen [0,1] but the error still the same NB:the bilateral filter taht i use is B = bfilter2(A,W,SIGMA) performs 2-D bilateral filtering for the grayscale or color image A. A should be a double precision matrix of size NxMx1 or NxMx3 (i.e., grayscal or color images, respectively) with normalized values in the closed interval [0,1]. The half-size of the Gaussian bilateral filter window is defined by W. The standar deviations of the bilateral filter are given by SIGMA, where the spatial-domain standard deviation is given by SIGMA(1) and the intensity-domain standard deviation is given by SIGMA(2). NB:the size of my image is <256x256 double>