Package boofcv.alg.distort
Class MultiCameraToEquirectangular<T extends ImageBase<T>>
java.lang.Object
boofcv.alg.distort.MultiCameraToEquirectangular<T>
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 Summary
ConstructorDescriptionMultiCameraToEquirectangular
(ImageDistort<T, T> distort, int equiWidth, int equiHeight, ImageType<T> imageType) Configuration constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCamera
(Se3_F32 cameraToCommon, LensDistortionWideFOV factory, int width, int height) Adds a camera and attempts to compute the mask from the provided distortion model.void
addCamera
(Se3_F32 cameraToCommon, LensDistortionWideFOV factory, GrayU8 camMask) Adds a camera and attempts to compute the mask from the provided distortion model.getMask
(int which) Returns the mask for a specific camerafloat
void
Provides recent images from all the cameras (should be time and lighting synchronized) and renders them into an equirectangular image.void
setMaskToleranceAngle
(float maskToleranceAngle) Specify the tolerance that the circle normal angle must be invertible in radians
-
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 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 Details
-
addCamera
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
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
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
-
getMask
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
-