email: hmz5180@psu.edu
- run Colmap, get the data file and point cloud (sparse and dense).
- fit a dominant plane in the point cloud and compute the parameters of plane in the world coordinate.
- read/display 3D object .
- design a coordinate in the dominant that we 'd like to place the object
- build the object local coordinate
- place the 3D object on the designed position in the dominant plane by computing transformation matrix between object coordinate and world coordinate.
Lower Matlab version with pcread() and pcshow() will be okay and Computer Vision Package is essential.
- -- dominant_plane_finding.m (running script)
- -- RANSAC_PlaneFitting.m (function to find a dominant plane)
- -- compute_plane_parameter.m (function to compute the plane parameters after RANSAC)
- -- build_object_coordinate.m (function to build a object local object and origin in the dominant plane)
- -- transform_3Dobject.m (function to compute the transformation matrix between object local coordinate and the designed coordinate in the dominant plane)
- --- Data/fused.ply (Dense Point Cloud)
- --- Data/camera.txt
- --- Data/images.txt
- --- Data/points3D.txt (Sparse Point Cloud)
Directory: './3Dmodel' (download from https://www.turbosquid.com/Search/3D-Models/free?page_num=7)
- --- chicken_01.obj : 3d model
- --- chicken_01.jpg: texturemap
- --- readObj.m : Read 3D model .obj file
- --- display_obj.m : to display the object
- read camera internal and external parameters from Colmap running result.
- compute camera pose (orientation + location) from the external parameter.
- display poses of each camera on a 3D figure.
- project the 3D object vertices from world coordinate to camera coordinate.
- use Z-buffer concept to fill each face of the 3D object, together with the corresponding image taken by each camera.
- -- camera_projecting.m (running script)
- -- loadCameraParas.m (function to read camera internal and external parameters)
- -- Projection.m (function to do projection of a 3D object by a specific camera parameter)
- -- WorldToImage.m (function to do projection of a single point from world coordinate to a 2D camera coordinate)
- --- Data/camera.txt
- --- Data/images.txt
- --- Data/dataset/xxx.jpeg (Original images taken by the same camera in different poses)



