Last decade witnessed the rapid development of Wireless Sensor Networks. More recently, the availability of inexpensive hardware such as CMOS cameras and microphones that are able to ubiquitously capture multimedia content from the environment has fostered the development of Wireless Multimedia Sensor Networks (WMSNs). There is a wide range of applications that are using Wireless Multimedia Sensor Networks, including Indoor Surveillance Systems. Nearly all surveillance systems start with a motion detection algorithm. After detection of motion in an image, either the motion areas are sent to another algorithm for more processing or an alarm is sent to the base station informing that there is motion in the environment. In this paper, we proposed a new motion detection algorithm, which is specifically designed for scenarios with no constant movement in the background. Our tests using Goyette's datasets show that, our proposed algorithm achieved a 97% accuracy with an average execution time of 48ms for QVGA images on ARM9 architecture, and thus outperformed the two currently available methods.