Package boofcv.alg.cloud
Class DisparityToColorPointCloud
- java.lang.Object
-
- boofcv.alg.cloud.DisparityToColorPointCloud
-
public class DisparityToColorPointCloud extends java.lang.ObjectRenders 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 Classes Modifier and Type Class Description static interfaceDisparityToColorPointCloud.ColorImageInterface for accessing RGB values inside an image
-
Field Summary
Fields Modifier and Type Field Description doubleradius
-
Constructor Summary
Constructors Constructor Description DisparityToColorPointCloud()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearRegionOfInterest()Removes the ROIvoidconfigure(double baseline, org.ejml.data.DMatrixRMaj K, org.ejml.data.DMatrixRMaj rectifiedR, boofcv.struct.distort.Point2Transform2_F64 rectifiedToColor, int disparityMin, int disparityRange)Stereo and intrinsic camera parametersvoidprocess(boofcv.struct.image.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
-
-
-
Method Detail
-
configure
public void configure(double baseline, org.ejml.data.DMatrixRMaj K, org.ejml.data.DMatrixRMaj rectifiedR, boofcv.struct.distort.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.disparityMin- Minimum disparity that's computed (pixels)disparityRange- Number of possible disparity values (pixels)
-
process
public void process(boofcv.struct.image.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
-
-