Class DisparityToColorPointCloud


  • public class DisparityToColorPointCloud
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      double radius  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearRegionOfInterest()
      Removes the ROI
      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
      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
      void setRegionOfInterest​(int x0, int y0, int x1, int y1)
      Specifies a ROI in the disparity image the cloud should come from
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • radius

        public double radius
    • Constructor Detail

      • DisparityToColorPointCloud

        public DisparityToColorPointCloud()
    • 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 camera
        rectifiedToColor - 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 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