oa::image::reproject_image_to_3d
Per-pixel reprojection of a disparity map into 3D coordinates, following cv::reprojectImageTo3D. For each pixel it evaluates (X, Y, Z, W) = Q * [x, y, disparity, 1] with the row-major 4x4 F32 matrix q, then writes the normalized coordinates X/W, Y/W, Z/W. disparity must be F32 [planes, 1, H, W] (the stereo_bm output layout) and q F32 [4, 4]; the homogeneous divide is unguarded, so a degenerate last row surfaces as inf/NaN. Returns the F32 [planes, 3, H, W] coordinate map. Errors Returns an error unless disparity is F32 with shape [planes, 1, H, W] and q is F32 [4, 4] on the same runtime.
Function Documentation
Per-pixel reprojection of a disparity map into 3D coordinates, following cv::reprojectImageTo3D. For each pixel it evaluates (X, Y, Z, W) = Q * [x, y, disparity, 1] with the row-major 4x4 F32 matrix q, then writes the normalized coordinates X/W, Y/W, Z/W. disparity must be F32 [planes, 1, H, W] (the stereo_bm output layout) and q F32 [4, 4]; the homogeneous divide is unguarded, so a degenerate last row surfaces as inf/NaN. Returns the F32 [planes, 3, H, W] coordinate map. Errors Returns an error unless disparity is F32 with shape [planes, 1, H, W] and q is F32 [4, 4] on the same runtime.