The closest thing I can remember is in the script writing section: a script that keeps refocusing and shoots when focus distance is in a certain range. It's of course quite noisy and tiring for the camera's mechanics.
In principle a this is something just as possible as motion detection (especially if limited to a small square area of the LCD live view image) i.e. it can definitely made to work using the simplest algorithm one can think of, but it will likely not be lightning fast to react and it won't be particularly good at it either. This of course requires someone keen enough to implement it in C.