Ask Your Question
0

Fix a position in a webcam video

asked 2015-01-19 09:44:53 -0600

maiq gravatar image

updated 2020-11-03 08:29:31 -0600

Hello everyone,

What I want to do is the following. I want to draw an arrow in a webcam video. While the webcam is moving the arrow should get drawn at the right position relativly to the video (in the correct real world coords). The important part is to fix the position of a point in a moving video. Does anyone have some ideas how to achieve that?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-01-19 12:16:32 -0600

updated 2015-01-19 12:19:02 -0600

I'm guessing you have two possibilities.

1 - Your scene shows a detectable object at which you want to arrow to be pointing at. You'll have to detect this object and then draw the arrow accordingly to its position

2 - There is no reference object, in which case your only option is to derive camera movement and keep compensating the arrow position (assuming that you know where the arrow is pointing at the beginning of the execution). In this case I'm not sure if you can do this only with a webcam, but I would try to compute optical flow, which gives you a measure of movement of the image, and this might be enough for you to draw this arrow according to your needs.

A 3rd fringe possibility is adding a gyroscope to your setup, which will give you the rotating movement of your camera and this would allow you to know how to draw the arrow.

edit flag offensive delete link more

Comments

Thanks for your answer. I think posibility 2 is what I need. I'm a total newbie so could you explain it in more detail. And could you also go a little bit more in detail for possiblity 3 which might also could work.

maiq gravatar imagemaiq ( 2015-01-20 01:50:37 -0600 )edit

Optical flow is an algorithm that uses two consecutive frames to calculate de difference between them, thus giving a measure of the movement of the scene. Now that I think about it a little deeper, I don't think that it will work for your case, because optical flow will not only give a measure of movement of your camera, but also of the movement of the objects in the scene.. and you will not be able to tell if it was the camera that moved or something in the scene, so I guess my answer is wrong.

A gyroscope is a little sensor that is on every computer/phone/tablet nowadays. It outputs the rotation on the 3 axis (roll, yaw and pitch). This will allow you to transform a virtual object on a real scene to make it look like it is really there. I've done that ...(more)

Pedro Batista gravatar imagePedro Batista ( 2015-01-20 04:58:08 -0600 )edit

There is plenty information about that online. 1 hour on google will put you up to speed.

Pedro Batista gravatar imagePedro Batista ( 2015-01-20 04:58:52 -0600 )edit

This is pretty much, what I'm looking for, but it needs to be optimized. I'm a total newbie, so it would be awesome if I could get some help.

maiq gravatar imagemaiq ( 2015-01-21 02:00:45 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-19 09:43:21 -0600

Seen: 393 times

Last updated: Jan 19 '15