motion

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

Check only particular portion of video feed in OpenCV

爷,独闯天下 提交于 2019-12-17 10:07:02
问题 How to get webcam video feed, for specific width and height? I have zero experience with OpenCV library, so I need help in this regard. This code is from geeksforgeeks.com. This is the only thing I have right now. What I'm trying to achieve is that, I want to detect motion in only specified area of video feed. import cv2, time, pandas from datetime import datetime static_back = None motion_list = [ None, None ] time = [] df = pandas.DataFrame(columns = ["Start", "End"]) video = cv2

Arduino - detecting motion/movement?

为君一笑 提交于 2019-12-13 21:16:01
问题 I need to detect in which direction the item is moving. I want to know if the item is moving up or down. Is this possible with this platform and by using a specific shield? I had in my mind the ultrasonic sensor, with which I would measure how far the item is from a certain point, and with this suggest what type of movement is happening because of the distance changes. I think this might be tricky, and wanted to see if there are better alternatives. UPDATE: I updated the question, corrected

Why would onTouch() generate FATAL EXCEPTION when returning false?

霸气de小男生 提交于 2019-12-13 02:37:23
问题 I wrote a simple MotionEvent exercise in which all I do is log the parameters of the event. I do that by implementing OnTouchListener and overriding onTouch() in the main activity. For one button, I return true at the end of onTouch(). No problems there. For another button, I return false at the end of onTouch(). This is where it gets interesting. By mere returning 'false', a FATAL EXCEPTION is thrown with a tiny hint which I don't really understand: "recycled twice!". What does this mean?

detecting motion on opencv c++ (moving camera)

老子叫甜甜 提交于 2019-12-12 08:13:33
问题 I'm doing a project for the university and I'm working with OpenCV (that is really awesome). Now my problem is: I have a video (.avi) and I have detected all the information I want to know about the blobs that suddenly appear in the RGB range between red and yellow. After I have realized a matrix that saves all the information about the pixel values, finally I create an image in the scale of red that represents the median pixel values. The real problem is that the video is not static and the

Motion event error on ImageButton click

一曲冷凌霜 提交于 2019-12-12 05:51:05
问题 public class AddActivity extends Activity implements OnClickListener{ String[] info = new String[11]; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.add_layout); } @Override public void onClick(View v) { // TODO Auto-generated method stub TextView keyString = (TextView)findViewById(R.id.keyString); TextView site1 = (TextView)findViewById(R.id.site1); TextView site2 = (TextView)findViewById(R.id.site2); TextView site3

Deblurring motion blurred images in MATLAB

一笑奈何 提交于 2019-12-12 02:57:22
问题 I'm currently working on program and I need to automatic perform motion un-blurring on a picture. Currently, I make a for loop for LEN and THETA , guessing from LEN 0:50 and THETA from 1:180 . There are plenty of motion un-blurred pictures produce in this way - some correct and some are wrong. Now here is my problem: How do I actually determine which set of parameters yields the one most closest to original photo? I'm thinking of using pixel comparison. Any idea on this? Here's a pictorial

Android detect turn from phone

偶尔善良 提交于 2019-12-12 02:27:04
问题 I want to detect, if my smartphone user turn left or right or doing a turn around. Here an example to explain "turn right": The User faces a crossroad. Now I want to detect if my user takes the right path or the left path or goes straight on. therefore i use this to get azimuth: @Override public void onSensorChanged(SensorEvent event) { switch (event.sensor.getType()) { case Sensor.TYPE_ACCELEROMETER: for (int i = 0; i < 3; i++) { valuesAccelerometer[i] = event.values[i]; } break; case Sensor

Real time Motion History Image (MHI) in Matlab

ε祈祈猫儿з 提交于 2019-12-11 02:25:52
问题 My project was to detect human activity through stored video clips. I have used following code in order to get the Motion History Image (MHI) of the video clip. function MHI = MHI(fg) % Initialize the output, MHI a.k.a. H(x,y,t,T) MHI = fg; % Define MHI parameter T T = 15; % # of frames being considered; maximal value of MHI. % Load the first frame frame1 = fg{1}; % Get dimensions of the frames [y_max x_max] = size(frame1); % Compute H(x,y,1,T) (the first MHI) MHI{1} = fg{1} .* T; % Start

Simulate the gravitational pull of a star?

隐身守侯 提交于 2019-12-10 14:57:51
问题 I'm making a game where the player will ( on release of mouseclick ) shoot a "star" in a certain direction at an initial speed determined by how far he dragged the mouse before releasing. I have a "planet" ( stationary circle ) on the canvas that I want to exert a gravitational pull on the moving planet. I believe I'm using the right formulas for gravitational force and such, and I have it partially working - the planet affects the planet's trajectory up until a certain point, when the star