Package boofcv.alg.distort
Class LensDistortionOps_F32
- java.lang.Object
-
- boofcv.alg.distort.LensDistortionOps_F32
-
public class LensDistortionOps_F32 extends java.lang.ObjectOperations related to manipulating lens distortion in images
-
-
Constructor Summary
Constructors Constructor Description LensDistortionOps_F32()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static georegression.struct.shapes.RectangleLength2D_F32boundBoxInside(int srcWidth, int srcHeight, boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform, georegression.struct.point.Point2D_F32 work)Ensures that the entire box will be insidestatic georegression.struct.shapes.RectangleLength2D_F32centerBoxInside(int srcWidth, int srcHeight, boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform, georegression.struct.point.Point2D_F32 work)Attempts to center the box inside.static voidroundInside(georegression.struct.shapes.RectangleLength2D_F32 bound)Adjust bound to ensure the entire image is contained inside, otherwise there might be single pixel wide black regionsstatic <O extends CameraPinhole,D extends CameraPinhole>
boofcv.struct.distort.Point2Transform2_F32transformChangeModel(AdjustmentType type, O paramOriginal, D paramDesired, boolean desiredToOriginal, D paramMod)Creates aPoint2Transform2_F32for converting pixels from original camera model into a new synthetic model.
-
-
-
Method Detail
-
transformChangeModel
public static <O extends CameraPinhole,D extends CameraPinhole> boofcv.struct.distort.Point2Transform2_F32 transformChangeModel(AdjustmentType type, O paramOriginal, D paramDesired, boolean desiredToOriginal, D paramMod)
Creates aPoint2Transform2_F32for converting pixels from original camera model into a new synthetic model. The scaling of the image can be adjusted to ensure certain visibility requirements.- Parameters:
type- The type of adjustment it will apply to the transformparamOriginal- Camera model for the current imageparamDesired- Desired camera model for the distorted imagedesiredToOriginal- If true then the transform's input is assumed to be pixels in the desired image and the output will be in original image, if false then the reverse transform is returned.paramMod- The modified camera model to meet the requested visibility requirements. Null if you don't want it.- Returns:
- The requested transform
-
boundBoxInside
public static georegression.struct.shapes.RectangleLength2D_F32 boundBoxInside(int srcWidth, int srcHeight, boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform, georegression.struct.point.Point2D_F32 work)Ensures that the entire box will be inside- Parameters:
srcWidth- Width of the source imagesrcHeight- Height of the source imagetransform- Transform being applied to the image- Returns:
- Bounding box
-
centerBoxInside
public static georegression.struct.shapes.RectangleLength2D_F32 centerBoxInside(int srcWidth, int srcHeight, boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform, georegression.struct.point.Point2D_F32 work)Attempts to center the box inside. It will be approximately fitted too.- Parameters:
srcWidth- Width of the source imagesrcHeight- Height of the source imagetransform- Transform being applied to the image- Returns:
- Bounding box
-
roundInside
public static void roundInside(georegression.struct.shapes.RectangleLength2D_F32 bound)
Adjust bound to ensure the entire image is contained inside, otherwise there might be single pixel wide black regions
-
-