Rather than implement motion detection on a security camera feed, I think it's easier to add a microphone and detect barking sounds from the dog.