Package boofcv.alg.distort.spherical
Class MultiCameraToEquirectangular<T extends boofcv.struct.image.ImageBase<T>>
- java.lang.Object
-
- boofcv.alg.distort.spherical.MultiCameraToEquirectangular<T>
-
public class MultiCameraToEquirectangular<T extends boofcv.struct.image.ImageBase<T>> extends java.lang.ObjectFuses 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 Summary
Constructors Constructor Description MultiCameraToEquirectangular(boofcv.alg.distort.ImageDistort<T,T> distort, int equiWidth, int equiHeight, boofcv.struct.image.ImageType<T> imageType)Configuration constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCamera(georegression.struct.se.Se3_F32 cameraToCommon, LensDistortionWideFOV factory, int width, int height)Adds a camera and attempts to compute the mask from the provided distortion model.voidaddCamera(georegression.struct.se.Se3_F32 cameraToCommon, LensDistortionWideFOV factory, boofcv.struct.image.GrayU8 camMask)Adds a camera and attempts to compute the mask from the provided distortion model.boofcv.struct.image.GrayF32getMask(int which)Returns the mask for a specific camerafloatgetMaskToleranceAngle()TgetRenderedImage()voidrender(java.util.List<T> cameraImages)Provides recent images from all the cameras (should be time and lighting synchronized) and renders them into an equirectangular image.voidsetMaskToleranceAngle(float maskToleranceAngle)Specify the tolerance that the circle normal angle must be invertible in radians
-
-
-
Constructor Detail
-
MultiCameraToEquirectangular
public MultiCameraToEquirectangular(boofcv.alg.distort.ImageDistort<T,T> distort, int equiWidth, int equiHeight, boofcv.struct.image.ImageType<T> imageType)
Configuration constructor- Parameters:
distort- Used to apply image distortion from different input imagesequiWidth- Width of output equirectangular imageequiHeight- Height of output equirectangular imageimageType- Type of image it processes and outputs. Must be floating point. Hmm why isn't this fixed?
-
-
Method Detail
-
addCamera
public void addCamera(georegression.struct.se.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 infactory- Distortion modelwidth- Input image widthheight- Input image height
-
addCamera
public void addCamera(georegression.struct.se.Se3_F32 cameraToCommon, LensDistortionWideFOV factory, boofcv.struct.image.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 infactory- Distortion modelcamMask- Binary mask with invalid pixels marked as not zero. Pixels are in camera image frame.
-
render
public void render(java.util.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 boofcv.struct.image.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
-
-