Package com.irurueta.ar.calibration
Class Distortion
java.lang.Object
com.irurueta.ar.calibration.Distortion
- Direct Known Subclasses:
RadialDistortion
This class accounts for any possible distortion that might occur on 2D
points. This might occur for instance when using cameras that produce
additional distortion (such as radial distortion) not modelled in the general
camera model.
This class is abstract, specific implementations for each kind of supported
distortion exists.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Indicates whether this instance can distort points.abstract boolean
Indicates whether this instance can un-distort points.com.irurueta.geometry.Point2D
distort
(com.irurueta.geometry.Point2D undistortedPoint) Distorts provided 2D point.abstract void
distort
(com.irurueta.geometry.Point2D undistortedPoint, com.irurueta.geometry.Point2D distortedPoint) Distorts provided 2D point and stores result into provided distorted point.List<com.irurueta.geometry.Point2D>
Distorts provided 2D points.void
distort
(List<com.irurueta.geometry.Point2D> undistortedPoints, List<com.irurueta.geometry.Point2D> distortedPoints) Distorts provided 2D points and stores them into provided distorted points list.abstract DistortionKind
getKind()
Returns kind of distortion.com.irurueta.geometry.Point2D
undistort
(com.irurueta.geometry.Point2D distortedPoint) Un-distorts provided 2D point.abstract void
undistort
(com.irurueta.geometry.Point2D distortedPoint, com.irurueta.geometry.Point2D undistortedPoint) Un-distorts provided 2D point and stores result into provided undistorted point.List<com.irurueta.geometry.Point2D>
Un-distorts provided 2D points.void
undistort
(List<com.irurueta.geometry.Point2D> distortedPoints, List<com.irurueta.geometry.Point2D> undistortedPoints) Un-distorts provided 2D points and stores them into provided undistorted points list.
-
Constructor Details
-
Distortion
public Distortion()
-
-
Method Details
-
distort
public com.irurueta.geometry.Point2D distort(com.irurueta.geometry.Point2D undistortedPoint) throws com.irurueta.geometry.NotSupportedException, DistortionException Distorts provided 2D point.- Parameters:
undistortedPoint
- undistorted point to be distorted.- Returns:
- distorted point.
- Throws:
com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support distorting points.DistortionException
- raised if distortion computation failed.
-
distort
public List<com.irurueta.geometry.Point2D> distort(List<com.irurueta.geometry.Point2D> undistortedPoints) throws com.irurueta.geometry.NotSupportedException, DistortionException Distorts provided 2D points.- Parameters:
undistortedPoints
- list of undistorted points to be distorted.- Returns:
- distorted points.
- Throws:
com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support distorting points.DistortionException
- raised if distortion computation failed.
-
distort
public void distort(List<com.irurueta.geometry.Point2D> undistortedPoints, List<com.irurueta.geometry.Point2D> distortedPoints) throws com.irurueta.geometry.NotSupportedException, DistortionException Distorts provided 2D points and stores them into provided distorted points list.- Parameters:
undistortedPoints
- list of undistorted points to be distorted.distortedPoints
- distorted points where result is stored.- Throws:
IllegalArgumentException
- if both lists don't have the same size.com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support distorting points.DistortionException
- raised if distortion computation failed.
-
undistort
public com.irurueta.geometry.Point2D undistort(com.irurueta.geometry.Point2D distortedPoint) throws com.irurueta.geometry.NotSupportedException, DistortionException Un-distorts provided 2D point.- Parameters:
distortedPoint
- distorted point to be undistorted- Returns:
- undistorted point.
- Throws:
com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support un-distorting points.DistortionException
- raised if un-distortion computation failed.
-
undistort
public List<com.irurueta.geometry.Point2D> undistort(List<com.irurueta.geometry.Point2D> distortedPoints) throws com.irurueta.geometry.NotSupportedException, DistortionException Un-distorts provided 2D points.- Parameters:
distortedPoints
- list of distorted points to be undistorted- Returns:
- undistorted points.
- Throws:
com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support un-distorting points.DistortionException
- raised if un-distortion computation failed.
-
undistort
public void undistort(List<com.irurueta.geometry.Point2D> distortedPoints, List<com.irurueta.geometry.Point2D> undistortedPoints) throws com.irurueta.geometry.NotSupportedException, DistortionException Un-distorts provided 2D points and stores them into provided undistorted points list.- Parameters:
distortedPoints
- list of distorted points to be undistorted.undistortedPoints
- undistorted points where result is stored.- Throws:
IllegalArgumentException
- if both lists don't have the same size.com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support un-distorting points.DistortionException
- raised if un-distortion computation failed.
-
distort
public abstract void distort(com.irurueta.geometry.Point2D undistortedPoint, com.irurueta.geometry.Point2D distortedPoint) throws com.irurueta.geometry.NotSupportedException, DistortionException Distorts provided 2D point and stores result into provided distorted point.- Parameters:
undistortedPoint
- undistorted point to be undistorted.distortedPoint
- distorted point where result is stored.- Throws:
com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support distorting points.DistortionException
- raised if distortion computation failed.
-
undistort
public abstract void undistort(com.irurueta.geometry.Point2D distortedPoint, com.irurueta.geometry.Point2D undistortedPoint) throws com.irurueta.geometry.NotSupportedException, DistortionException Un-distorts provided 2D point and stores result into provided undistorted point.- Parameters:
distortedPoint
- distorted point to be undistorted.undistortedPoint
- undistorted point where result is stored.- Throws:
com.irurueta.geometry.NotSupportedException
- raised if distortion implementation does not support un-distorting points.DistortionException
- raised if un-distortion computation failed.
-
canDistort
public abstract boolean canDistort()Indicates whether this instance can distort points.- Returns:
- true if points can be distorted, false otherwise.
-
canUndistort
public abstract boolean canUndistort()Indicates whether this instance can un-distort points.- Returns:
- true if points can be undistorted, false otherwise.
-
getKind
Returns kind of distortion.- Returns:
- kind of distortion.
-