public class LensDistortionOps
extends java.lang.Object
| Constructor and Description |
|---|
LensDistortionOps() |
| Modifier and Type | Method and Description |
|---|---|
static boofcv.struct.distort.PointTransform_F32 |
allInside(IntrinsicParameters param,
IntrinsicParameters paramAdj)
Adjusts the view such that each pixel has a correspondence to the original image while maximizing the
view area.
|
static georegression.struct.shapes.RectangleLength2D_F32 |
boundBoxInside(int srcWidth,
int srcHeight,
boofcv.struct.distort.PixelTransform_F32 transform)
Finds the maximum area axis-aligned rectangle contained inside the transformed image which
does not include any pixels outside the sources border.
|
static boofcv.struct.distort.PointTransform_F32 |
fullView(IntrinsicParameters param,
IntrinsicParameters paramAdj)
Transforms the view such that the entire original image is visible after lens distortion has been removed.
|
static <T extends boofcv.struct.image.ImageBase> |
removeDistortion(boolean allInside,
boofcv.core.image.border.BorderType borderType,
IntrinsicParameters param,
IntrinsicParameters paramAdj,
boofcv.struct.image.ImageType<T> imageType)
Creates an
ImageDistort class which will remove the lens distortion. |
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
|
static boofcv.struct.distort.PointTransform_F64 |
transformNormToRadial_F64(IntrinsicParameters param)
Converts normalized image coordinates into distorted pixel coordinates.
|
static boofcv.struct.distort.PointTransform_F32 |
transformPixelToRadial_F32(IntrinsicParameters param)
Transform from undistorted pixel coordinates to distorted with radial pixel coordinates
|
static boofcv.struct.distort.PointTransform_F64 |
transformRadialToNorm_F64(IntrinsicParameters param)
Removes radial distortion from the image in pixel coordinates and converts it into normalized image coordinates
|
static boofcv.struct.distort.PointTransform_F64 |
transformRadialToPixel_F64(IntrinsicParameters param)
Removes radial distortion from the pixel coordinate.
|
public static <T extends boofcv.struct.image.ImageBase> boofcv.alg.distort.ImageDistort<T,T> removeDistortion(boolean allInside,
boofcv.core.image.border.BorderType borderType,
IntrinsicParameters param,
IntrinsicParameters paramAdj,
boofcv.struct.image.ImageType<T> imageType)
Creates an ImageDistort class which will remove the lens distortion. The user
can select how the view is adjusted.
If BorderType.VALUE then pixels outside the image will be filled in with a value of 0. For viewing purposes it is recommended that BorderType.VALUE be used and BorderType.EXTENDED in computer vision applications. VALUE creates harsh edges which can cause false positives when detecting features, which EXTENDED minimizes.
allInside - If true then the undistorted image will be filled with valid pixels.
If false then the undistorted image will contain the entire original image.borderType - Specifies how the image border is handled. Null means borders are ignored.param - Original intrinsic parameters.paramAdj - (output) Intrinsic parameters which reflect the undistorted image. Can be null.imageType - Type of image it will undistortpublic static boofcv.struct.distort.PointTransform_F32 fullView(IntrinsicParameters param, IntrinsicParameters paramAdj)
Transforms the view such that the entire original image is visible after lens distortion has been removed.
The appropriate PointTransform_F32 is returned and a new set of intrinsic camera parameters for
the "virtual" camera that is associated with the returned transformed.
The original image coordinate system is maintained even if the intrinsic parameter flipY is true.
param - Intrinsic camera parameters.paramAdj - If not null, the new camera parameters are stored here.public static boofcv.struct.distort.PointTransform_F32 allInside(IntrinsicParameters param, IntrinsicParameters paramAdj)
Adjusts the view such that each pixel has a correspondence to the original image while maximizing the view area. In other words no black regions which can cause problems for some image processing algorithms.
The original image coordinate system is maintained even if the intrinsic parameter flipY is true.
param - Intrinsic camera parameters.paramAdj - If not null, the new camera parameters are stored here.public static boofcv.struct.distort.PointTransform_F64 transformRadialToNorm_F64(IntrinsicParameters param)
param - Intrinsic camera parameterspublic static boofcv.struct.distort.PointTransform_F64 transformRadialToPixel_F64(IntrinsicParameters param)
param - Intrinsic camera parameterspublic static boofcv.struct.distort.PointTransform_F64 transformNormToRadial_F64(IntrinsicParameters param)
param - Intrinsic camera parameterspublic static boofcv.struct.distort.PointTransform_F32 transformPixelToRadial_F32(IntrinsicParameters param)
Transform from undistorted pixel coordinates to distorted with radial pixel coordinates
NOTE: The original image coordinate system is maintained even if the intrinsic parameter flipY is true.
param - Intrinsic camera parameterspublic static georegression.struct.shapes.RectangleLength2D_F32 boundBoxInside(int srcWidth,
int srcHeight,
boofcv.struct.distort.PixelTransform_F32 transform)
srcWidth - Width of the source imagesrcHeight - Height of the source imagetransform - Transform being applied to the imagepublic static void roundInside(georegression.struct.shapes.RectangleLength2D_F32 bound)