Ask Your Question

Marcin's profile - activity

2017-06-07 01:59:36 -0500 received badge  Editor (source)
2017-06-07 01:56:07 -0500 asked a question Estimation of ball position (3d reconstruction)

I have a white small ball in camera view. The ball is in front of camera but higher than camera (Yball > Ycam). View is compensated by undistort(). I try to calculate X and Y position of the ball relative to camera position. What I know:
- know exact distance from the optical center of the camera to the ball,
- know shift dX,dY of my ball in pixels from center of cam view,
- know focal length in pixels (fx and fy from camera matrix determined by camera calibration).

I try calculate physical X and Y position relative to camera using dx,dy,fx,fy,distance. If the position of the ball is near the center of the screen then I can accurately calculate the position using fx and fy. But I noticed, that if the ball is on the side, near the edge of the view (but physicial Y position and distance from camera are the same as previous), then the ball in image is higher. Here's an example:

1) Ball X coordinate is in center


2) Ball X coordinate high (near right side of image)


On the second example, 'top' coordinate changed from 433px to 396px, but ball is on the same physical Y as in previous example and at the same distance from the optical center. So if I use 'fy' (focal length y) to calculate Y position, my estimated position will be different.
Could You please help me, what am I doing wrong? How to calculate the position of the ball, what parameter did not take into account?

2017-01-05 06:32:08 -0500 asked a question Get 3d coordinates by 2d point on camview

Hi!, I have calibrated camera (i have camera_matrix, distortion_coefficients, projection_matrix). My cam is pointed to a wall. When I choose a point on 2d image (camera view capture), I would like to get a point of wall in world coordinates, assuming that cam is coordinate origin and distance from cam to real point on wall is known. Could you please help me how to do it? Regards,