Home » Android » opencv – Detect a person's motion and identify his body parts moving forward towards camera on Android

opencv – Detect a person's motion and identify his body parts moving forward towards camera on Android

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have this requirement where I need to detect body parts or objects moving towards camera. What are some of the sample projects or library that I can look for as a starting point.

I can take the first frame of the video as reference point and then any object that is moving forwards towards camera has to be perfectly detected.

The camera would be managed by a person so there would be some slight shaking so the background won’t be exactly same through all frames.

How to&Answers:

Augmented Reality is the KEY

“Augmented reality (AR) is a term for a live direct or indirect view of a physical, real-world environment whose elements are augmented by virtual computer-generated sensory input, such as sound or graphics. It is related to a more general concept called mediated reality, in which a view of reality is modified (possibly even diminished rather than augmented) by a computer. As a result, the technology functions by enhancing one’s current perception of reality.”

we can detect a person’s motion and identify and body parts moving with Augmented Reality.

we did not have the sample code but there are some sample code for the Augmented Reality tutorials.

Please look into these links : http://www.instructables.com/id/Augmented-Reality-Tutorial-No-1-Marker-Based-Primi/

https://github.com/phishman3579/android-motion-detection

Answer:

There is a guy that uses opencv and python with a raspberry Pi. You have access to his source code Basic motion detection and tracking with Python and OpenCV but this is only a first part without limb detection. You could try to decipher the code and port to your needs. As for the limb detection that is a big project my friend.

Have a look at this hand / arm / head / legs tracking and this presentation Human body skeleton & tracking and also this function from openCV calcOpticalFlowPyrLK which could help you get started.

Answer:

I think you should give this a try:

Why doný you use the Camera.AutoFocusCallback?

Callback interface used to notify on completion of camera auto focus.

I have no idea if it works but I think this is definitely the easiest option.