Skip to content

whuwuteng/EuroSDR_UAV_Micmac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EuroSDR Multi-Platform Photogrammetry Dataset

Introduction

This dataset is a public dataset from ISPRS website, there is a conference paper introduce this dataset. All data and information can be found in the download document.

Writing this document is to indicate how to use Micmac to process the aerial dataset. If you want to know the comparison between Micmac and other commercial software, you can refer to this document, this report and this paper.

Notice

In the experiment, the ground control point(GCP) file is in DHDN, maybe is in DHHN92 according to the data year, not in WGS84 UTM ellipsoidal. You can use the coordinate converter to check it, the coordinate of Dortmund is known, an example of coordinate converting(G01) is shown :

image show
An exmaple of the converter

Then you can know that the value of DHDN is smaller, so the name of GCP file is not correct, i.e. Friedensplatz_GCP_DHDN and Friedensplatz_GCP_ellipsoidal.

As the DHDN is not a Euclidean coordinate space in a large region, so we can not assure that the result is correct using the GCPs in DHDN coordinate reference framework.

Micmac pipeline

Prepare for process

Because the images do not contain the camera information, so the camera should be defined before processing, the name is MicMac-LocalChantierDescripteur.xml.

Match Tie points

You an match all the image, i.e NxN, N is the image number.

#! /bin/bash

mm3d Tapioca ".*tif" -1

Otherwise, if you can know which image pair you match, you can also define the match pairs to save the time. Thanks for the GPS/IMU, the initial camera position can be obtained. A xml file is created to define the pairs. The the match command line is:

#! /bin/bash

mm3d Tapioca File MesCouples.xml -1

Initial Orientation

Because the camera calibration is given, in the image orientation, the intrinsic parameters do not need to be calculated. Before calculating the initial orientation, the camera intrinsic file should be given. The the initial orientation can be calculated.

#! /bin/bash

#put the intrinsic file into Ori-Calib directory
mm3d Tapas "Figee" ".*tif" InCal=Ori-Calib

Ground control points

This dataset provide the ground control points(GCP) and the 2D measurements of the GCPs. But the files are in Pix4D format. These files should be converted into Micmac format.

Convert the GCP file to Micmac format :

#! /bin/bash

python3 create_gcp.py --gcp 3D_objectspace.csv --xml gcp_tp-3D.xml

Convert the 2D measurements to Micmac format :

#! /bin/bash

python3 gcp_Pix4D_to_micmac.py --txt imagepoints.csv --xml gcp_tp-3D-S2D.xml --ext '.tif'

Bundle adjustment compensation

After obtaining the GCP points, the initial orientation can be obtained :

#! /bin/bash

GCPBascule ".*tif" "Ori-Figee" RTL-Bascule gcp_tp-3D.xml gcp_tp-3D-S2D.xml

The similarity transformation is not good enough for the final result, a bundle adjustment step is needed.

#! /bin/bash

Campari ".*tif" Ori-RTL-Bascule Compense-Figee GCP=[gcp_tp-3D-S3D.xml,0.05,gcp_tp-3D-S2D.xml,0.5] 

Then the final result is obtain, the rotation matrix is same with the computer vision, the the element orientation parameter is the camera position.

GCP check

In the experiment, the 2D measurements do not have a good precision. there is a tool to see the GCP precision, after running the command line, a text file is show the result.

#! /bin/bash

mm3d BAR ".*tif" Ori-Figee gcp_tp-3D.xml gcp_tp-3D-S2D.xml

So if you want to use Micmac to measure the points, there is a tool to do it.

#! /bin/bash

mm3d SaisieAppuisPredic ".*tif" Ori-RTL-Bascule gcp_tp-3D.xml gcp_tp-3D.xml ForceGray=false 

By the way, the precision of the GCP is also unknown, we can split the GCP into control points and check points.

#! /bin/bash

DATA_DIR="/home/tengwu/Penta-Cam-Centre"

python3 gcp_Pix4D_to_micmac_selected.py --gcp3d ${DATA_DIR}/3DPoints/3D_objectspace_area.csv --gcp2d ${DATA_DIR}/gcp_2d.txt --list ${DATA_DIR}/control.txt --ext '.tif' --control3d_xml ${DATA_DIR}/gcp_tp-3D.xml --control2d_xml ${DATA_DIR}/gcp_tp-3D-S2D.xml --check3d_xml ${DATA_DIR}/gcp_tp-3D_check.xml --check2d_xml ${DATA_DIR}/gcp_tp-3D-S2D_check.xml 

After running the Campari, there is a tool to see the precision of the check points.

#! /bin/bash

mm3d GCPCtrl ".*tif" Ori-Compense-Figee gcp_tp-3D_check.xml gcp_tp-3D-S2D_check.xml

Feature matching point

After bundle adjustment, in the result, the 2D feature points and 3D points are not include. In order to use the feature matching information, first you need to track the feature matching result:

#! /bin/bash

mm3d TestLib ConvNewFH ".*tif" "" Bin=0 ExpTxt=0 

After tracking the point, there is a file name "PMul.txt" file in the folder Homol. After generating the feature points, then you need to convert to xml format:

#! /bin/bash

python3 match_track_to_micmac.py --txt PMul.txt --xml PMul.xml

After transforming the feature point, if you want to do the triangulation, you can use the command:

#! /bin/bash
mm3d TestLib PseudoIntersect  ".*tif"  Ori-Compense-Figee PMul.xml

After running the command, you can obtain three file: "3DCoords.txt", "3DCoords.txt.ply" and "3DCoords.xml".

Attention, these steps actually are included in command mm3d AperiCloud.

TODO

  • Five cameras process
  • LiDAR process

Acknowledge

If you think you have any problem, contact [Teng Wu]whuwuteng@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages