Documentation of 'boofcv.alg.geo.RectifyImageOps' Java class
RectifyImageOps
boofcv.alg.geo

Class RectifyImageOps



  • public class RectifyImageOps
    extends java.lang.Object

    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 Detail

      • RectifyImageOps

        public RectifyImageOps()
    • Method Detail

      • createCalibrated

        public static RectifyCalibrated createCalibrated()

        Rectification for calibrated stereo pairs. Two stereo camera care considered calibrated if their baseline is known.

        After the rectification has been found it might still need to be adjusted for maximum viewing area. See fullViewLeft and allInsideLeft for adjusting the rectification.

        Returns:
        RectifyCalibrated
      • fullViewLeft

        public static void fullViewLeft(IntrinsicParameters paramLeft,
                                        org.ejml.data.DenseMatrix64F rectifyLeft,
                                        org.ejml.data.DenseMatrix64F rectifyRight,
                                        org.ejml.data.DenseMatrix64F rectifyK)

        Adjust the rectification such that the entire original left image can be seen. For use with calibrated stereo images having a known baseline. Due to lens distortions it is possible for large parts of the rectified image to have no overlap with the original and will appear to be black. This can cause issues when processing the image

        WARNING: There are pathological conditions where this will fail. If the new rotated image view and a pixel are parallel it will require infinite area.

        Parameters:
        paramLeft - Intrinsic parameters for left camera. Not modified.
        rectifyLeft - Rectification matrix for left image. Input and Output. Modified.
        rectifyRight - Rectification matrix for right image. Input and Output. Modified.
        rectifyK - Rectification calibration matrix. Input and Output. Modified.
      • fullViewLeft

        public static void fullViewLeft(int imageWidth,
                                        int imageHeight,
                                        org.ejml.data.DenseMatrix64F rectifyLeft,
                                        org.ejml.data.DenseMatrix64F rectifyRight)

        Adjust the rectification such that the entire original left image can be seen. For use with uncalibrated stereo images with unknown baseline.

        Input rectification matrices are overwritten with adjusted values on output.

        Parameters:
        imageWidth - Width of left image.
        imageHeight - Height of left image.
        rectifyLeft - Rectification matrix for left image. Input and Output. Modified.
        rectifyRight - Rectification matrix for right image. Input and Output. Modified.
      • allInsideLeft

        public static void allInsideLeft(IntrinsicParameters paramLeft,
                                         org.ejml.data.DenseMatrix64F rectifyLeft,
                                         org.ejml.data.DenseMatrix64F rectifyRight,
                                         org.ejml.data.DenseMatrix64F rectifyK)

        Adjust the rectification such that only pixels which overlap the original left image can be seen. For use with calibrated stereo images having a known baseline. Image processing is easier since only the "true" image pixels are visible, but information along the image border has been discarded. The rectification matrices are overwritten with adjusted values on output.

        Parameters:
        paramLeft - Intrinsic parameters for left camera. Not modified.
        rectifyLeft - Rectification matrix for left image. Input and Output. Modified.
        rectifyRight - Rectification matrix for right image. Input and Output. Modified.
        rectifyK - Rectification calibration matrix. Input and Output. Modified.
      • allInsideLeft

        public static void allInsideLeft(int imageWidth,
                                         int imageHeight,
                                         org.ejml.data.DenseMatrix64F rectifyLeft,
                                         org.ejml.data.DenseMatrix64F rectifyRight)

        Adjust the rectification such that only pixels which overlap the original left image can be seen. For use with uncalibrated images with unknown baselines. Image processing is easier since only the "true" image pixels are visible, but information along the image border has been discarded. The rectification matrices are overwritten with adjusted values on output.

        Parameters:
        imageWidth - Width of left image.
        imageHeight - Height of left image.
        rectifyLeft - Rectification matrix for left image. Input and Output. Modified.
        rectifyRight - Rectification matrix for right image. Input and Output. Modified.
      • transformRectToPixel_F32

        public static PointTransform_F32 transformRectToPixel_F32(IntrinsicParameters param,
                                                                  org.ejml.data.DenseMatrix64F rectify)

        Creates a transform that goes from rectified to original distorted pixel coordinates. Rectification includes removal of lens distortion. Used for rendering rectified images.

        Parameters:
        param - Intrinsic parameters.
        rectify - Transform for rectifying the image.
        Returns:
        Transform from rectified to unrectified pixels
      • transformRectToPixel_F64

        public static PointTransform_F64 transformRectToPixel_F64(IntrinsicParameters param,
                                                                  org.ejml.data.DenseMatrix64F rectify)

        Creates a transform that goes from rectified to original distorted pixel coordinates. Rectification includes removal of lens distortion. Used for rendering rectified images.

        Parameters:
        param - Intrinsic parameters.
        rectify - Transform for rectifying the image.
        Returns:
        Transform from rectified to unrectified pixels
      • transformPixelToRect_F32

        public static PointTransform_F32 transformPixelToRect_F32(IntrinsicParameters param,
                                                                  org.ejml.data.DenseMatrix64F rectify)

        Creates a transform that applies rectification to unrectified distorted pixels.

        Parameters:
        param - Intrinsic parameters. Not modified.
        rectify - Transform for rectifying the image. Not modified.
        Returns:
        Transform from unrectified to rectified pixels
      • transformPixelToRect_F64

        public static PointTransform_F64 transformPixelToRect_F64(IntrinsicParameters param,
                                                                  org.ejml.data.DenseMatrix64F rectify)

        Creates a transform that applies rectification to unrectified distorted pixels.

        Parameters:
        param - Intrinsic parameters. Not modified.
        rectify - Transform for rectifying the image. Not modified.
        Returns:
        Transform from distorted pixel to rectified pixels
      • transformPixelToRectNorm_F64

        public static PointTransform_F64 transformPixelToRectNorm_F64(IntrinsicParameters param,
                                                                      org.ejml.data.DenseMatrix64F rectify,
                                                                      org.ejml.data.DenseMatrix64F rectifyK)

        Creates a transform that applies rectification to unrectified distorted pixels and outputs normalized pixel coordinates.

        Parameters:
        param - Intrinsic parameters.
        rectify - Transform for rectifying the image.
        rectifyK - Camera calibration matrix after rectification
        Returns:
        Transform from unrectified to rectified normalized pixels
      • rectifyImage

        public static <T extends ImageGrayImageDistort<T,T> rectifyImage(org.ejml.data.DenseMatrix64F rectify,
                                                                           BorderType borderType,
                                                                           java.lang.Class<T> imageType)
        Creates an ImageDistort 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 ImageBaseImageDistort<T,T> rectifyImage(IntrinsicParameters param,
                                                                           org.ejml.data.DenseMatrix64F rectify,
                                                                           BorderType borderType,
                                                                           ImageType<T> imageType)
        Creates an ImageDistort 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.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.