Background modelling and foreground detection, which significantly affect the performance of intelligent visual surveillance systems, are challenging works due to dynamic background, illumination changes, image artefacts, etc. This paper describes an improved algorithm for background modelling. A pixel-wise non-parametric statistical model of the HSV colour components and gradients is used for background modelling. Since the non-parametric statistical model using the kernel density estimation is computationally complex, the probability density functions are estimated as a product of several one-dimensional histograms. Then, foreground regions are detected by using the Bayesian decision rule. The experimental results showed that the proposed algorithm produced more accurate and stable results than existing background modeling methods and the colour de-correlation procedure produced improvements.