motion-detection

How can I detect and track people using OpenCV?

半城伤御伤魂 提交于 2019-11-28 02:49:14
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 bounding rectangles. I've looked at several of the built-in samples: None of the Python samples really apply The C blob tracking sample looks promising, but doesn't accept live video, which makes testing difficult. It's also the most complicated of the samples, making extracting the relevant knowledge and converting it to the Python API problematic.

Get rotation and display in degrees

北慕城南 提交于 2019-11-27 05:52:50
问题 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 the top part (where the speaker is) and the bottom part (where the microphone is) stays put down - it should show me how many degrees is the phone tilted. Mathematically described - show in degrees the angle between the back of the phone and the table

How can I detect and track people using OpenCV?

浪子不回头ぞ 提交于 2019-11-27 05:02:33
问题 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 bounding rectangles. I've looked at several of the built-in samples: None of the Python samples really apply The C blob tracking sample looks promising, but doesn't accept live video, which makes testing difficult. It's also the most complicated of

CV - Extract differences between two images

只愿长相守 提交于 2019-11-26 17:15:15
I am currently working on an intrusion system based on video surveillance. In order to complete this task, I take a snapshot of the background of my scene (assume it's totally clean, no people or moving objects). Then, I compare the frame I get from the (static) video camera and look for the differences. I have to be able to check any differences, not only human shape or whatever, so I cannot specific feature extraction. Typically, I have: I am using OpenCV, so to compare I basically do: cv::Mat bg_frame; cv::Mat cam_frame; cv::Mat motion; cv::absdiff(bg_frame, cam_frame, motion); cv:

How do I detect when someone shakes an iPhone?

做~自己de王妃 提交于 2019-11-25 22:45:32
问题 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? 回答1: In 3.0, there's now an easier way - hook into the new motion events. The main trick is that you need to have some UIView (not UIViewController) that you want as firstResponder to receive the shake event messages. Here's the code that you can use in any UIView to get shake events: @implementation