motion-detection

Optical flow ignore sparse motions

主宰稳场 提交于 2019-12-18 18:48:30
问题 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. BEFORE: AFTER: First, we just calculated the difference between the 2 images and here is the result (Note that I added 128 to the result Mat just to have a nicer image): (AFTER - BEFORE) + 128 The goal is to detect that the cup (red arrow) has disappeared from the scene

How to count steps using an Accelerometer?

心已入冬 提交于 2019-12-18 10:29:50
问题 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 and distance. Ignore this ideal and gravity behavior, because in the instructions of this app it's already been mentioned that you should tie up your iPhone or you should place it in your pocket to count steps. This way, I have found this app

How to detect onLongClick ACTION_UP event?

大城市里の小女人 提交于 2019-12-18 07:22:51
问题 I have an image which implements both OnClickListener and OnLongClickListener . In the OnLongClickListener at press down ( ACTION_DOWN ) I start a timer. I want to cancel it at ACTION_UP . Now, if I implement OnTouchListener for this image, then I catch ACTION_DOWN for normal clicks. And I want to catch Long clicks ONLY. Why does not long click fire ACTION_UP event? How can I detect this event and stop the timer. If you need a code, I can post it, but I do not think it will help you as there

How to detect onLongClick ACTION_UP event?

爷,独闯天下 提交于 2019-12-18 07:22:42
问题 I have an image which implements both OnClickListener and OnLongClickListener . In the OnLongClickListener at press down ( ACTION_DOWN ) I start a timer. I want to cancel it at ACTION_UP . Now, if I implement OnTouchListener for this image, then I catch ACTION_DOWN for normal clicks. And I want to catch Long clicks ONLY. Why does not long click fire ACTION_UP event? How can I detect this event and stop the timer. If you need a code, I can post it, but I do not think it will help you as there

Is it possible to use ViBe algorithm, implemented in opencv, for systema without GPU?

拜拜、爱过 提交于 2019-12-18 03:48:12
问题 I want to test ViBe algorithm for Background Subtraction. Currently I am using opencv libraries. I found out a sample implementation in opencv/samples/gpu/bgfg_segm.cpp and bgfg_vibe.cpp files. These files are under gpu module. Now I have a system without GPU. And when I try to run the code, it crashes on the initialization of the first frame. Can anybody tell me how to solve this issue? Thanks in advance. 回答1: pseudo codes suck big time! here's the un-pseudo/ed version. results?:there is

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

落爺英雄遲暮 提交于 2019-12-17 17:28:58
问题 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 the iPhone camera for detecting objects and tracking them? 回答1: I just gave a talk at SecondConf where I demonstrated the use of the iPhone's camera to track a colored object using OpenGL ES 2.0 shaders. The post accompanying that talk, including my

CV - Extract differences between two images

為{幸葍}努か 提交于 2019-12-17 03:53:30
问题 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:

Detecting Significant Device Motion on Android

让人想犯罪 __ 提交于 2019-12-12 10:57:02
问题 I've been trying to figure out how to make an application that detects whether the device has been moved a significant amount, something more than just shakes. I am trying to detect a distance of, say, at least a foot. Reading the Training section on the official Android Development site, my best guess is that I should be using the Significant Motion Sensor, but I can't find an example of how to use it. Do I just store my "current" location in an array, and then compare that versus the Event

How to detect Shake Gesture while application in Background?

﹥>﹥吖頭↗ 提交于 2019-12-11 07:29:35
问题 I'm currently working on a music player app, and like the iPod application, I would like to shuffle songs with shake gesture. I'm implementing motion methods like Apple recommends to, and in foreground everything works fine. - (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event; - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event; - (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event; But I just can't figure out how to call those methods

iPhone Shake event not properly working

邮差的信 提交于 2019-12-11 02:52:04
问题 I have this inside my viewController: - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event { if (event.type == UIEventSubtypeMotionShake) { NSLog(@"I have shaked"); } } Why is this not working? Edit: I do infact have this: - (void) viewWillAppear:(BOOL)animated { [shakeView becomeFirstResponder]; [super viewWillAppear:animated]; } - (void) viewWillDisappear:(BOOL)animated { [shakeView resignFirstResponder]; [super viewWillDisappear:animated]; } 回答1: If the UIViewController is