Class MultiCameraToEquirectangular<T extends ImageBase<T>>

java.lang.Object
boofcv.alg.distort.MultiCameraToEquirectangular<T>

public class MultiCameraToEquirectangular<T extends ImageBase<T>>
extends Object
Fuses information from multiple camera to create a single equirectangular image. Each image is rendered independently and added to the output image, but weighted by the mask. The mask describes the region of pixels in the equirectangular image which it represents.
  • Constructor Details

    • MultiCameraToEquirectangular

      public MultiCameraToEquirectangular​(ImageDistort<T,​T> distort, int equiWidth, int equiHeight, ImageType<T> imageType)
      Configuration constructor
      Parameters:
      distort - Used to apply image distortion from different input images
      equiWidth - Width of output equirectangular image
      equiHeight - Height of output equirectangular image
      imageType - Type of image it processes and outputs. Must be floating point. Hmm why isn't this fixed?
  • Method Details

    • addCamera

      public void addCamera​(Se3_F32 cameraToCommon, LensDistortionWideFOV factory, int width, int height)
      Adds a camera and attempts to compute the mask from the provided distortion model. if a pixel is rendered outside the bounds in the input image then it is masked out. If the forwards/backwards transform is too different then it is masked out.
      Parameters:
      cameraToCommon - Rigid body transform from this camera to the common frame the equirectangular image is in
      factory - Distortion model
      width - Input image width
      height - Input image height
    • addCamera

      public void addCamera​(Se3_F32 cameraToCommon, LensDistortionWideFOV factory, GrayU8 camMask)
      Adds a camera and attempts to compute the mask from the provided distortion model. if a pixel is rendered outside the bounds in the input image then it is masked out. If the forwards/backwards transform is too different then it is masked out.
      Parameters:
      cameraToCommon - Rigid body transform from this camera to the common frame the equirectangular image is in
      factory - Distortion model
      camMask - Binary mask with invalid pixels marked as not zero. Pixels are in camera image frame.
    • render

      public void render​(List<T> cameraImages)
      Provides recent images from all the cameras (should be time and lighting synchronized) and renders them into an equirectangular image. The images must be in the same order that the cameras were added.
      Parameters:
      cameraImages - List of camera images
    • getRenderedImage

      public T getRenderedImage()
    • getMask

      public GrayF32 getMask​(int which)
      Returns the mask for a specific camera
      Parameters:
      which - index of the camera
      Returns:
      Mask image. pixel values from 0 to 1
    • getMaskToleranceAngle

      public float getMaskToleranceAngle()
    • setMaskToleranceAngle

      public void setMaskToleranceAngle​(float maskToleranceAngle)
      Specify the tolerance that the circle normal angle must be invertible in radians
      Parameters:
      maskToleranceAngle - tolerance in radians