Hi Shreya,
Your question is difficult to answer without knowing whether your are trying to create a conceptual model or a working prototype. What you are trying to do is already widely used in homes and businesses via motion sensors to determine the presence of people, animals or other activity.
See this article for an overview of the technology ~
http://en.wikipedia.org/wiki/Motion_sensor
Here is an article which explains the basics of Face Detection ~
http://en.wikipedia.org/wiki/Face_detection
The major drawback to the system you are trying to devise is that it requires a system that is too complex and costly. You can already buy affordable sensors that convert an analog signal being read by the detector into a "Digital" state (On/Off) that is converted to the "ON" state by a microchip (tiny computer) that switches the circuit ON, it then activates a timer to reset the switch to OFF after a certain interval. When the interval on the time expires the circuit signals the detector to check for motion, heat, etc. Then, if nothing is detected changes the switch to OFF., otherwise it resets the timer to check again after another time interval.
You can easily adapt a motion sensor, which is essentially a very primitive "digital camera" in most cases, to send its on/off signal to a computer to trigger a desired activity. Electronics supply stores like Radio Shack can usually provide you with materials to do this.
Hope that helps.