1 | initial version |
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 an 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.
2 | No.2 Revision |
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 an 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.