Class DisparityToColorPointCloud

java.lang.Object
boofcv.alg.cloud.DisparityToColorPointCloud

public class DisparityToColorPointCloud extends Object

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.

  • 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 camera
      rectifiedToColor - 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)
    • 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 image
      color - 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, inclusive
      y0 - lower extent, y-axis, inclusive
      x1 - upper extent, x-axis, exclusive
      y1 - upper extent, y-axis, exclusive
    • clearRegionOfInterest

      public void clearRegionOfInterest()
      Removes the ROI