int im_stdif(in, out, a, m0, b, s0, xw, yw)
IMAGE *in, *out;
double a, m0, b, s0;
int xw, yw;
int im_stdif_raw(in, out, a, m0, b, s0, xw, yw)
IMAGE *in, *out;
double a, m0, b, s0;
int xw, yw;
At point (i,j) the output is given by the eqn:
vout(i,j) = a*m0 + (1-a)*meanv +
(vin(i,j) - meanv) * (b*s0) / (s0+b*stdv)
Values a, m0, b and s0 are entered, while meanv and stdv are the values calculated over a moving window of size xw, yw centred on pixel (i,j). m0 is the new mean, a is the weight given to it. s0 is the new standard deviation, b is the weight given to it. Try:
im_stdif $VIPSHOME/pics/huysum.v fred.v 0.5 128 0.5 50 11 11
The opreation works on one-band UCHAR images only, and writes a one-band UCHAR image as its result. The output image has the same size as the input - a black border is added to mark uncomputable pixels.
im_stdif_raw() behaves exactly as im_stdif(), but does not add the border of black pixels.