Package edu.tufts.hrilab.vision.util
Class StereoProc
java.lang.Object
edu.tufts.hrilab.vision.util.StereoProc
Utility methods for stereo image processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double[][]
reprojectImageTo3D
(byte[] depthData, int width, int height, double f) Convert depth image (e.g., from kinect or xtion) into 3D points.static double[][]
reprojectImageTo3D
(byte[] disparity, int width, int height, double f, double T, double scale) Convert disparity image into 3D points.
-
Constructor Details
-
StereoProc
public StereoProc()
-
-
Method Details
-
reprojectImageTo3D
public static double[][] reprojectImageTo3D(byte[] disparity, int width, int height, double f, double T, double scale) Convert disparity image into 3D points. [X Y Z W] = Q * [x y disp(x,y) 1]^T 3dImage(x,y) = (X/W, Y/W, Z/W) Q =| 1 0 0 -Cx | | 0 1 0 -Cy | | 0 0 0 f | | 0 0 a b | ========================== X = (x-Cx)*T/disp(x,y); Y = (y-Cy)*T/disp(x,y); Z = f*T/disp(x,y); ===========================- Parameters:
disparity
-width
- image width (pixel units)height
- image height (pixel units)f
- focal length (pixel units)T
- baseline length between optical centers (world units)scale
- (current disparity image height) / (original disparity image height)- Returns:
-
reprojectImageTo3D
public static double[][] reprojectImageTo3D(byte[] depthData, int width, int height, double f) Convert depth image (e.g., from kinect or xtion) into 3D points.- Parameters:
depthData
- raw depth datawidth
- depth data widthheight
- depth data heightf
- focal length- Returns:
-