How to take a picture of any object entered the area?

Hello
It is necessary to make an application using the camera, and that is: select the area on the camera that will keep track of the appearance of objects (people, dogs, cats, etc.). Then put the phone and when entering the object area in a photo. In principle, this minimal functionality.
Tried to Google - neither Russian, nor English found nothing (maybe wrong query to build).
Maybe there are some libraries, or better ready-made guides with the same or similar functionality? The finished application is not needed, I would like somehow to make
Himself into Android development recently, I apologize in advance for possible incompetence)
June 5th 19 at 21:46
2 answers
June 5th 19 at 21:48
Solution
You can use the functionality of the openCV library, it seems to have the build under Android.
The motion detection algorithm is very simple:
1. Specify the scope where you want to detect movement
2. Built initial assessment of the background (https://docs.opencv.org/3.4.1/de/de1/group__video_... (usually it is 20-30 frames)
3. Obnavljam evaluation and obnarujivaet movement
3. And then analyze selected segments
4. Make a decision about the presence or absence of motion in the frame
Thanks for the reply! At this point my knowledge will not allow you to perform this algorithm) But the idea came to take the source code of any of the motion detection and have to change for themselves, for example in a method for the identification of the movement add to and make a photo - maurine.Rosenbaum1 commented on June 5th 19 at 21:51
June 5th 19 at 21:50
Solution
Using this - https://github.com/jjoe64/android-motion-detection... , added to the preservation by comparison, have increased the zoom on the camera and set the focus, so it is best recognize in the far distance

Find more questions by tags AndroidJavaVideo surveillance