ofcourse you can!

the logic of detecting any movement in camera's view are the pixel changes in your current snapshot/picture to the normal state of your room.

normal state - the first frame captured by your camera when it wakes up for the first time.
current state - are the frames interrupting at an interval. u may use timers for this.