This paper proposes a global motion model estimation and target detection algorithm for surveillance and tracking applications. The proposed algorithm analyzes the foreground-background structure of a video frame, and detects objects with independent motions. Each video frame is first segmented into regions where image intensity and motion fields are homogeneous. Then global motion model fitting is accomplished using linear regression of motion vectors through iterations of region search. With the use of non-parametric estimation of motion field, the proposed methods is more efficient than direct estimation of motion parameter; and it is able to detect outliers where independent moving targets are located. The proposed algorithm is more computationally efficient than parametric motion estimation, and also more robust than a variety of background compensation based detection.