cammera and axis

hey group

I am looking into a project and I want to be able to set up a software program that shows on screen the feed from a camera and also the position of something based on its angle in a 3d plane.
but the axis needs to work in a small area.

imagine a biro pen writing on paper, I would like to know the position of this pen relative to axis, so if the pen was vertical I would like to know how many degrees it is off axis when it leans forward or backwards or left to right and I would like to have the position indicators overlaid on a pc screen on top of the camera feed.

the sensors need to be really small if possible

is this possible

regards Fluffy

That sounds possible, but not for Arduino. It doesn't have nearly the speed or memory to handle something like video processing.

If you’re using standard definition video, there are Maxim SPI devices which will allow you to overlay simple text.
Don’t know about HD video.