Can we interface a webcam and a PIR motion sensor with an Arduino…?

I want to connect a PIR motion sensor and a webcam to an Arduino…

when a human enters a specified region…the PIR motion sensor will send a signal to the Arduino…
the Arduino then sends an actuating signal to the webcam so that it switches ON and starts recording…

when the human moves out of the specified region…the PIR motion sensor will send another signal to the Arduino

the Arduino then controls the webcam by turning It OFF…

also is it possible to store the recorded video in a storage device (preferably SD card)…?

please help me…