如果之前已经问过这个问题请原谅我,但我想知道从哪里开始实现立体视觉将2D坐标转换为3D坐标。 我正试图在3D中跟踪Hawkeye之类的球。 我有两个高速摄像头,我能够在每个摄像头中检测到球。 我知道我需要校准相机,同步它们并运行一些算法来消除镜头失真等。但是,我不知道下一步是将2D坐标转换为世界3D坐标。
有谁知道如何进行三角测量可以帮助我吗? 此外,相机不会相互平行,但在不同的角度,所以不知何故,我需要知道每个相机的3D坐标位置。
我们将非常感激地提供任何帮助。
非常感谢
Forgive me if this question has been asked before, but I'd like to know where to start to achieve stereo vision to convert 2D coordinates into 3D coordinates. I'm trying to track balls like Hawkeye in 3D. I have two high speed cameras and I'm able to detect the ball in each camera. I understand that I need to calibrate the cameras, synchronize them and run some algorithm to remove lens distortion etc. However, I don't know what the next step is to convert the 2D coordinates to world 3D coordinates.
Does anybody know how to perform triangulation who can assist me with this? Also the cameras will not be parallel to each other, but at different angles, so somehow, I need to know the location of each camera in terms of their 3D coordinates.
Any help with this would be gratefully received.
Many thanks
最满意答案
要将2D转换为3D用于两个校准相机,您可以使用以下公式:z =焦点*基线/视差x = z * u /焦点y = z * v /焦点
其中焦点 - 相机的焦距,以像素为单位u = column-Cx,Cx~image_width / 2但校准将为您提供更精确的值v = -row + Cy,Cy~image_height / 2 Baseline - 相机之间的水平距离差异 - 两个图像中球的水平位置的差异
严格来说,只有在使用密集立体声时才需要进行整改。 对于稀疏立体声,您只需要校准。
To convert 2D into 3D for two calibrated cameras you would use these formulas: z = focal*baseline/disparity x = z*u/focal y = z*v/focal
where focal - the focal length of you camera in pixels u = column-Cx, Cx~image_width/2 but calibration will give you more precise value v = -row+Cy, Cy~image_height/2 Baseline - horizontal distance between cameras disparity - difference in horizontal position of the ball in two images
Strictly speaking you need to do rectification only for working with dense stereo. For sparse stereo you only need calibration.
更多推荐
发布评论