Skip to content

4. Sub Function Descriptions: imageRectifier

Jenna Brown edited this page Jul 1, 2020 · 3 revisions
  • imageRectifier

    • Description:

    This function performs image rectifications given the associated extrinsics, intrinsics, distorted image, and xyz points. The function utilizes xyz2DistUV to find corresponding UVd values to the input grid and pulls the rgb pixel intensity for each value. If the teachingMode flag is =1, the function will plot corresponding steps (xyz-->UVd transformation) as well as rectified output. If a multi-camera rectification is desired, I, intrinsics, and extrinsics can be input as cell values for each camera. The function will then call on cameraSeamBlend to merge the values.

    • Input:

    Note k can be 1:K, where K is the number of cameras. Input order between I, Intrinsics, and Extrinsics must match.

    Variable Size Description
    I{k} NNxMMx3 Distorted Image that pixel values will be taken from for rectification. Image should have been captured when entered intrinsics and extrinsics are valid. NN is the pixel height of the image and MM is the pixel width.
    Intrinsics{k} [1x11] Intrinsics Vector Formatted as in A_formatIntrinsics.
    Extrinsics{k} [1x6] 1x6 Vector representing [ x y z azimuth tilt swing] of the camera in world coordinates. Position values should be in the same units as xyz points to be converted and azimuth, tilt, and swing should be in radians. Extrinsics for all K cameras should be in same coordinate systems.
    X,Y,Z Variables, NxM or 1xP Vector or Grid of X,Y, and Z world coordinates to rectify. Note this is not a cell entry. All K cameras will be rectified to the same grid.
    teachingMode [1x1] Flag to indicate whether intermediate steps and output will be plotted (Figure 5).
    • Output:

    Variable Size Description
    Ir Variable,NxMx3 or Px1x3 Image intensities for xyz points. Dimensions depend if input entered as a grid or vector. For both, an additional dimension with size 3 is added for r, g, and b intensities. Output will be a uint8 format.
    • Required Core Sub-Functions:

      • xyz2DistUV
      • intrinsicsExtrinsics2P
      • distortUV
      • rectificationPlotter
      • cameraSeamBlend
Clone this wiki locally