Package boofcv.alg.distort
Class LensDistortionOps_F32
java.lang.Object
boofcv.alg.distort.LensDistortionOps_F32
@Generated("boofcv.alg.distort.LensDistortionOps_F64")
public class LensDistortionOps_F32
extends Object
Operations related to manipulating lens distortion in images
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RectangleLength2D_F32boundBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, Point2D_F32 work) Ensures that the entire box will be insidestatic RectangleLength2D_F32centerBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, Point2D_F32 work) Attempts to center the box inside.static voidroundInside(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>
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.
-
Constructor Details
-
LensDistortionOps_F32
public LensDistortionOps_F32()
-
-
Method Details
-
transformChangeModel
public static <O extends CameraPinhole,D extends CameraPinhole> Point2Transform2_F32 transformChangeModel(AdjustmentType type, O paramOriginal, D paramDesired, boolean desiredToOriginal, @Nullable 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 RectangleLength2D_F32 boundBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, 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 RectangleLength2D_F32 centerBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, 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
Adjust bound to ensure the entire image is contained inside, otherwise there might be single pixel wide black regions
-