Introduction

This repo aims to generate the 3D point cloud from two 2D images. All processes includes Tie Point Finding, Rectification, Dense Matching and Point Cloud Generating.

Result

CASE1: Aerial Image

  1. Source

    Left Right
    Aerial_Source_l Aerial_Source_r
  2. Result

    • SGBM_CloudPoint

Theory

Please see Pinhole Camera Model PPT

Scripts

  • TiePoints.py: Use SIFT, ORB and SURF to find the sparse matching point (same point in real world) from 2 images.

    python TiePoints.py
    
    • TP_00
    • TP_01
    • TP_02
    • TP_10
    • TP_11
    • TP_12
    • TP_20
    • TP_21
    • TP_22
    • TP_unFiltered
    • TP_Filtered
  • Rectification.py: Rectify the image for application of SGBM reduce the searching dimension from two dimensions to one dimension.)

    python Rectification.py
    
    • Rectification_EpipolarLine
    • Rectification_Rectification
    • Rectification_Add
  • SGBM_opencv.py: OpenCV version SGBM.

    python SGBM_opencv.py
    
    • SGBM_TP
    • SGBM_Rectification
    • SGBM_TP_Rectification
    • SGBM_Disparity
    • SGBM_CloudPoint
  • AeroTriangulation.py: Conversion between 2D image pixels into 3D object points.

    python AeroTriangulation.py
    
  • AeroTriangulation_tf.py: This is used for calibrate the relational extrinsic parameters of stereo camera. But its recommended to use the chessboard to calibrate the extrinsic parameters of stereo camera.

    python AeroTriangulation_tf.py
    
    • AereoTriangulation
  • io_aereo_params.py: This is used for get the saved aereo parameters (OPK, L_XYZ, DMC_ROWS_LABEL, DMC_COLS_LABEL, DMC_FOCAL_LENGTH, DMC_PIXEL_SIZE, XOFFSET, YOFFSET)

  • temp_refine_resolution.py: This is used to lower the resolution of original images in order to push the images on to the gitlab.

  • SGBM.py: This is jit implementation of SGBM which can be used to learn SGBM, but its efficiency is not terrible. currently not working.