Package boofcv.alg.geo
Class RectifyDistortImageOps
java.lang.Object
boofcv.alg.geo.RectifyDistortImageOps
Operations related to rectifying stereo image pairs. Provides functions for 1) creating rectification calculation algorithms, 2) rectification transforms, and 3) image distortion for rectification.
Definition of transformed coordinate systems:
- Pixel
- Original image coordinates in pixels.
- Rect
- Rectified image coordinates in pixels. Lens distortion has been removed.
- RectNorm
- Rectified image coordinates in normalized coordinates.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Applies a mask which indicates which pixels had mappings to the unrectified image.static void
Applies a mask which indicates which pixels had mappings to the unrectified image.static <T extends ImageBase<T>>
ImageDistort<T,T> rectifyImage
(CameraPinholeBrown param, FMatrixRMaj rectify, BorderType borderType, ImageType<T> imageType) Creates anImageDistort
for rectifying an image given its radial distortion and rectification matrix.static <T extends ImageGray<T>>
ImageDistort<T,T> rectifyImage
(FMatrixRMaj rectify, BorderType borderType, Class<T> imageType) Creates anImageDistort
for rectifying an image given its rectification matrix.
-
Constructor Details
-
RectifyDistortImageOps
public RectifyDistortImageOps()
-
-
Method Details
-
rectifyImage
public static <T extends ImageGray<T>> ImageDistort<T,T> rectifyImage(FMatrixRMaj rectify, BorderType borderType, Class<T> imageType) Creates anImageDistort
for rectifying an image given its rectification matrix. Lens distortion is assumed to have been previously removed.- Parameters:
rectify
- Transform for rectifying the image.imageType
- Type of single band image the transform is to be applied to.- Returns:
- ImageDistort for rectifying the image.
-
rectifyImage
public static <T extends ImageBase<T>> ImageDistort<T,T> rectifyImage(CameraPinholeBrown param, FMatrixRMaj rectify, BorderType borderType, ImageType<T> imageType) Creates anImageDistort
for rectifying an image given its radial distortion and rectification matrix.- Parameters:
param
- Intrinsic parameters.rectify
- Transform for rectifying the image.imageType
- Type of single band image the transform is to be applied to.- Returns:
- ImageDistort for rectifying the image.
-
applyMask
Applies a mask which indicates which pixels had mappings to the unrectified image. Pixels which were outside of the original image will be set to 255. The border is extended because the sharp edge in the rectified image can cause in incorrect match between image features.- Parameters:
disparity
- (Input) disparitymask
- (Input) mask. 1 = mapping to unrectified. 0 = no mappingradius
- How much the border is extended by
-
applyMask
Applies a mask which indicates which pixels had mappings to the unrectified image. Pixels which were outside of the original image will be set to 255. The border is extended because the sharp edge can confuse disparity algorithms.- Parameters:
disparity
- (Input) disparitymask
- (Input) mask. 1 = mapping to unrectified. 0 = no mappingradius
- How much the border is extended by
-