1. A system for inputting operation system (OS) commands to a data processing device comprising: (a) a video camera capturing images of a viewing space; and (b) a processor configured to: i) detect a predetermined object in one or more images obtained by the camera using a segmentation algorithm; ii) extract one or more image analysis parameters of the object in the one or more images obtained by the camera; and iii) for each of one or more motion detection tests: (I) applying the motion detection test to image analysis parameters extracted during a recent time window; and (II) executing an operating system command associated with the motion detection test if the motion detection test succeeds, wherein the segmentation algorithm comprises steps of: (A) for k=1 to N, where N is a predetermined integer: binarizing pixels in the image into a set A k of pixels having an intensity below a kth predetermined intensity and a set B k of pixels having an intensity above the kth predetermined intensity, the kth predetermined intensity being greater than the (k−1)th intensity, for k=2 to N; identifying contiguous sets of pixels in the set A k and identifying contiguous sets of pixels in the set B k ; (B) identifying one or more stable sets of pixels in the image, a stable set of pixels being a contiguous set of pixels present in each of the sets A k for k=M to N, where M is a predetermined constant, or a contiguous set of pixels present in each of the sets B k for k=M to N, and (C) applying an object recognition procedure on the stable sets to identify the predetermined object among the stable sets.