Motion detection is the process of detecting a change in the position of an object relative to its surroundings or a change in the surroundings relative to an object. Motion detection can be achieved by either mechanical or electronic methods. When motion detection is accomplished by natural organisms, it is called motion perception.
Motion can be detected by:
- Infrared (passive and active sensors)
- Optics (video and camera systems)
- Radio Frequency Energy (radar, microwave and tomographic motion detection)
- Sound (microphones and acoustic sensors)
- Vibration (triboelectric, seismic, and inertia-switch sensors)
- Magnetism (magnetic sensors and magnetometers)
The most basic form of mechanical motion detection is in the form of a switch or trigger. For example, the keys of a typewriter employ a mechanical method of detecting motion. Each key is a manual switch that is either off or on. Each letter that appears is a result of motion on that corresponding key and the switch being turned on.
The principal methods by which motion can be electronically identified are optical detection and acoustic detection. Infrared light or laser technology may be used for optical detection. Motion detection devices, such as PIR motion detectors, have a sensor that detects a disturbance in the infrared spectrum. Once detected, a signal can activate an alarm or a camera that can capture an image or video of the motioner.
The chief applications for such detection are detection of unauthorized entry, detection of cessation of occupancy of an area to extinguish lighting, and detection of a moving object which triggers a camera to record subsequent events.
A simple algorithm for motion detection by a fixed camera compares the current image with a reference image and simply counts the number of different pixels. Since images will naturally differ due to factors such as varying lighting, camera flicker, and CCD dark currents, pre-processing is useful to reduce the number of false positive alarms.
More complex algorithms are necessary to detect motion when the camera itself is moving, or when the motion of a specific object must be detected in a field containing other movement which can be ignored. An example might be a painting surrounded by visitors in an art gallery. For the case of a moving camera, models based on optical flow are used to distinguish between apparent background motion caused by the camera movement and that of independent objects moving in the scene. 
A motion detector is a device that detects moving objects, particularly people. Such a device is often integrated as a component of a system that automatically performs a task or alerts a user of motion in an area. An occupancy sensor detects the presence of an entity within a certain space.
- "motion detection". Retrieved 26 January 2015.
- Video motion detection (VMD)
- Mechanisms of visual motion
- Bewley, A., Guizilini, V., Ramos, F., & Upcroft, B. (2014). Online Self-Supervised Multi-Instance Segmentation of Dynamic Objects. In International Conference on Robotics and Automation (pp. 1296–1303). Hong Kong, China: IEEE. http://doi.org/10.1109/ICRA.2014.6907020