This paper presents a background modeling method to detect foreground objects precisely. An object detection system must face the problem of moving background, illumination changes, chaotic etc. in real applications. The proposed background model can be established and updated efficiently from real-time image sequences to overcome the various illumination environments. Based on our approach, the static background model and adaptive multi-layer dynamic background model are constructed completely and correctly. In order to extract the moving object precisely, the proposed detection method considers the dependence between adjacent pixels by using homogeneous region analysis. Experimental results indicate that the proposed approach has lower error rate than other existing methods. Furthermore, our approach has been implemented in TI TMS320DM6446 Davinci development platform, and it can achieve 18 frames per second for benchmark images of size 768×576.I.