<< return to Pixycam.com

question about x position

Hi,

If I have an object within view of the pixy, and it moves purely towards and away the camera, should the reported x position change?

some notes regarding what I am trying to do:

I have an IMU mounted so I can get the angle of rotation of the pixy relative to a target. I am looking to get the “absolute” x coordinate from that target, even when the pixy rotates relative to the target.
For example, if the pixy is pointed straight at the target, and the target is dead center in front of the camera, the reported pixy (x,y) would be (w/2,h/2).
If I turn the camera an angle theta now, without moving the target, the reported (x,y) will change. I am trying to come up with an equation apply to the new coordinates that give a new x relative to the original position.

Hope this is clear, thanks for the help!

Hello GB

You question:

If I have an object within view of the pixy, and it moves purely towards and away the camera, should the reported x position change?

It depends on where it is in the image. If your object is in the center of Pixy’s image, neither the x or y coordinates will change when you move the object toward and away. It has to do with the camera equation. See this page:

Hope this helps!

Edward