In this paper, we propose an image processing scheme for moving object detection from a mobile robot with a single camera. It especially aims at intruder detection for the security robot on either smooth or uneven ground surfaces. The proposed scheme uses the template matching with basis image reconstruction for the alignment between two consecutive images in the video sequence. The most representative template patches in one image are first automatically selected based on the gradient energies in the patches. The chosen templates then form a basis image matrix. A windowed subimage is constructed by the linear combination of the basis images, and the instances of the templates in the subsequent image are matched by evaluating their reconstruction error from the basis image matrix. For two well aligned images, a simple and fast temporal difference can thus be applied to identify moving objects from the background. The proposed template matching can tolerate ±10° in rotation and ±10% in scaling. By adding templates with larger rotational angles in the basis image matrixes, the proposed method can match images from severe camera vibrations. The proposed scheme achieves a fast processing rate of 32 frames per second for images of size 160×120 pixels.