K
K
korvin22018-05-16 16:21:11
Java
korvin2, 2018-05-16 16:21:11

How to take a photo when an object enters the zone?

Hello
We need to make an application using the camera, that is: a zone is selected on the camera that will track the appearance of objects (people, dogs, cats, etc.). Then the phone is already put in and a photo is taken when the object enters the zone. In principle, this is the minimum functionality.
I tried to google - neither in Russian nor in English did I find anything (maybe the request was wrong).
Maybe there are some libraries, or better ready-made guides with the same or similar functionality? Ready-made applications are not needed, I would like to somehow do it
myself in android development recently, I apologize in advance for possible incompetence)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2018-05-16
@korvin2

You can use the functionality of the openCV library, there seems to be a build for android.
The motion detection algorithm is very simple:
1. Set the area where you want to detect motion
2. An initial background estimate is built ( https://docs.opencv.org/3.4.1/de/de1/group__video_... (usually 20-30 frames)
3. We update the estimate and detect movement
3. And then we analyze the selected segments
4. We make a decision about the presence or absence of movement in the frame

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question