Questions tagged [motion-detection]

Related to detection of motion related to programming issues, like computer vision, sensor control, etc.

Motion detection is a process of confirming a change in position of an object relative to its surroundings or the change in the surroundings relative to an object. This detection can be achieved by both mechanical and electronic methods. In addition to discrete, on or off motion detection, it can also consist of magnitude detection that can measure and quantify the strength or speed of this motion or the object that created it.

Motion can be detected by: sound (acoustic sensors), opacity (optical and infrared sensors and video image processors), geomagnetism (magnetic sensors, magnetometers), reflection of transmitted energy (infrared laser radar, ultrasonic sensors, and microwave radar sensors), electromagnetic induction (inductive-loop detectors), and vibration (triboelectric, seismic, and inertia-switch sensors).

424 questions
346
votes
17 answers

How do I detect when someone shakes an iPhone?

I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this?
Josh Gagnon
  • 5,342
  • 3
  • 26
  • 36
297
votes
1 answer

Store Kinect's v2.0 Motion to BVH File

I would like to store the motion capture data from Kinect 2 as a BVH file. I found code which does so for Kinect 1 which can be found here. I went through the code and found several things that I was not able to understand. For example, in the…
Jose Ramon
  • 5,572
  • 25
  • 76
  • 152
37
votes
4 answers

How can I detect and track people using OpenCV?

I have a camera that will be stationary, pointed at an indoors area. People will walk past the camera, within about 5 meters of it. Using OpenCV, I want to detect individuals walking past - my ideal return is an array of detected individuals, with…
Nick Johnson
  • 100,655
  • 16
  • 128
  • 198
18
votes
3 answers

Optical flow ignore sparse motions

We're actually working on an image analysis project where we need to identify the objects disappeared/appeared in a scene. Here are 2 images, one captured before an action has been made by the surgeon and the other afterwards.…
Maystro
  • 2,907
  • 8
  • 36
  • 71
16
votes
1 answer

How can you track motion using the iPhone's camera?

I saw that someone has made an app that tracks your feet using the camera, so that you can kick a virtual football on your iPhone screen. How could you do something like this? Does anyone know of any code examples or other information about using…
Burf2000
  • 5,001
  • 14
  • 58
  • 117
13
votes
7 answers

Android MotionEvent: find out if motion happened outside the view

I have a button and OnTouchListener attached to it. How can I find if motion (when user presses the button) happened inside or outside it? Both event.getAction() and event.getActionMasked() return only 0, 1 or 2, which is ActionDown, ActionUp,…
Yury Pogrebnyak
  • 4,093
  • 9
  • 45
  • 78
11
votes
3 answers

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

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…
Vishwesh Shetty
  • 687
  • 9
  • 27
11
votes
2 answers

Get rotation and display in degrees

I need something very simple, but I could not find a suitable example to learn from. My sole purpose is the following: As the device is placed flat (on its back) on the desk, it should show 0 (or close to 0) for X and Y axis. When I lift it from…
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
11
votes
2 answers

Motion Detection

I really cannot get my head around this, so I hope that someone can give me a little hand ^^ I'm trying to detect motion in C# via my webcam. So far I've tried multiple libraries (AForge Lib), but failed because I did not understand how to use it.…
Jazerix
  • 4,729
  • 10
  • 39
  • 71
10
votes
2 answers

What is output from OpenCV's Dense optical flow (Farneback) function? How can this be used to build an optical flow map in Python?

I am trying to use the output of Opencv's dense optical flow function to draw a quiver plot of the motion vectors but have not been able to find what the function actually outputs. Here is the code: import cv2 import numpy as np cap =…
James Mallett
  • 827
  • 4
  • 11
  • 27
9
votes
3 answers

How to modify motion tracking in AS3

I have this amazing tutorial at http://www.computerarts.co.uk/tutorials/build-your-own-motion-tracking-system In the developer version, the tracker moves along the X-axis. I want it to stay stationary rather than moving and when the object from the…
Vivian Lobo
  • 583
  • 10
  • 29
9
votes
2 answers

How to count steps using an Accelerometer?

I have to develop the same functionality as of this Pedometer App I have observed this Pedometer app in very high detail. It's not a perfect pedometer app. For example, if you stay/sit at one place and shake your hand, it also detects steps counts…
Tariq
  • 9,861
  • 12
  • 62
  • 103
9
votes
1 answer

Linear acceleration direction to track upward and downward movement of phone

I am trying to track the movement of the device only on the vertical direction, i.e. upward and downward movement. This should be irrespective of the orientation of the device. Things that i already know or have tried are these Linear acceleration…
Udit Khandelwal
  • 326
  • 3
  • 15
9
votes
2 answers

Visual Odometry (aka. Egomotion estimation) with OpenCV

I'm planning to implement an application with augmented reality features. For one of the features I need an egomotion estimation. Only the camera is moving, in a space with fixed objects (nothing or only small parts will be moving, so that they…
Christian Strempfer
  • 7,291
  • 6
  • 50
  • 75
9
votes
0 answers

How to detect movement of object on iPhone's camera screen?

I have an application which needs to be able to detect the movement of object or image which is shown on camera screen. Is this possible with the iPhone?
Colonel Software
  • 1,401
  • 1
  • 11
  • 16
1
2 3
28 29