Package boofcv.alg.cloud
Class DisparityToColorPointCloud
java.lang.Object
boofcv.alg.cloud.DisparityToColorPointCloud
Renders a 3D point cloud using a perspective pin hole camera model. An ROI can be specified if only part of the image is desired
Rendering speed is improved by first rendering onto a grid and only accepting the highest (closest to viewing camera) point as being visible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for accessing RGB values inside an image -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves the ROIvoidconfigure(double baseline, DMatrixRMaj K, DMatrixRMaj rectifiedR, @Nullable Point2Transform2_F64 rectifiedToColor, int disparityMin, int disparityRange) Stereo and intrinsic camera parametersvoidconfigure(DisparityParameters param, @Nullable Point2Transform2_F64 rectifiedToColor) Convenience function which allows you to useDisparityParametersand callsconfigure(double, DMatrixRMaj, DMatrixRMaj, Point2Transform2_F64, int, int).voidprocess(ImageGray<?> disparity, DisparityToColorPointCloud.ColorImage color, PointCloudWriter output) Given the disparity image compute the 3D location of valid points and save pixel colors at that pointvoidsetRegionOfInterest(int x0, int y0, int x1, int y1) Specifies a ROI in the disparity image the cloud should come from
-
Field Details
-
radius
public double radius
-
-
Constructor Details
-
DisparityToColorPointCloud
public DisparityToColorPointCloud()
-
-
Method Details
-
configure
public void configure(double baseline, DMatrixRMaj K, DMatrixRMaj rectifiedR, @Nullable @Nullable Point2Transform2_F64 rectifiedToColor, int disparityMin, int disparityRange) Stereo and intrinsic camera parameters- Parameters:
baseline- Stereo baseline (world units)K- Intrinsic camera calibration matrix of rectified camerarectifiedToColor- Transform from rectified pixels to the color image pixels. If null then no transform.disparityMin- Minimum disparity that's computed (pixels)disparityRange- Number of possible disparity values (pixels)
-
configure
public void configure(DisparityParameters param, @Nullable @Nullable Point2Transform2_F64 rectifiedToColor) Convenience function which allows you to useDisparityParametersand callsconfigure(double, DMatrixRMaj, DMatrixRMaj, Point2Transform2_F64, int, int). -
process
public void process(ImageGray<?> disparity, DisparityToColorPointCloud.ColorImage color, PointCloudWriter output) Given the disparity image compute the 3D location of valid points and save pixel colors at that point- Parameters:
disparity- Disparity imagecolor- Color image of left camera
-
setRegionOfInterest
public void setRegionOfInterest(int x0, int y0, int x1, int y1) Specifies a ROI in the disparity image the cloud should come from- Parameters:
x0- lower extent, x-axis, inclusivey0- lower extent, y-axis, inclusivex1- upper extent, x-axis, exclusivey1- upper extent, y-axis, exclusive
-
clearRegionOfInterest
public void clearRegionOfInterest()Removes the ROI
-