•  


GitHub - OpenDroneMap/dem2mesh: Quickly generate 2.5D meshes from elevation models.
Skip to content

OpenDroneMap/dem2mesh

Folders and files

Name Name
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dem2mesh

Fast generation of 2.5D meshes from elevation models.

image

image

Quickstart

docker run -it --rm -v /path-your-data:/data kladess/dem2mesh dem2mesh -rtc -verbose -inputFile /data/dem.tif -outputFile /data/mesh.ply

Dependencies

GDAL and OpenMP are the only dependencies. To install it run:

sudo apt-get install -y libgdal-dev libomp-dev

Building

mkdir build 
&&
 cd
 build
cmake ..
make

Running

./dem2mesh -rtc -verbose -inputFile dem.tif -outputFile mesh.ply

?? The DEM should use a coordinate reference system (CRS) that has matching horizontal and vertical units (for example, UTM). If you are getting stretched or deformed results, double check your CRS and use gdalwarp to reproject the raster DEM. https://www.gdal.org/gdalwarp.html

Options

Flag Description Required
-inputFile Path to DEM raster datasource (GDAL compatible) ?
-outputFile Path to PLY mesh output ?
-maxVertexCount Target number of vertices for the output mesh. This number is not always guaranteed to be reached. Defaults to 100000
-maxTileLength Max length of a tile. Smaller values take longer to process but reduce memory usage by splitting the meshing process into tiles. Defaults to 1000 .
-aggressiveness Value between 1 and 10 that specifies how "aggressive" the mesh simplification process should be at each iteration. Higher values simplify the mesh more aggressively but can decrease the fidelity of the mesh. Defaults to 5 .
-bandNum Raster band # to use. Defaults to 1 .
-maxConcurrency Maximum number of threads to use. Defaults to all CPUs available.
-edgeSwapThreshold Dot product threshold (between 0-1) to perform edge collapses. Performing edge collapses can violate the 2.5D constraints, but leads to better triangles for vertical structures. Defaults to disabled .
-rtc Use Relative To Center (RTC) X/Y coordinates in the output PLY mesh. This can be useful since most 3D visualization software use floating coordinate precision to represent vertices and using absolute coordinates might lead to jittering artifacts.
-verbose Print verbose output.

FAQ

The main difference is the meshing approach and output type. Tin-terrain uses a greedy approach, dem2mesh uses a gridding + simplification approach. Tin-terrain can output to quantized-mesh format (useful for displaying in Cesium), dem2mesh does not.

The meshing approach changes the way triangles are placed in the mesh. Greedy approaches tend to generate areas with large triangles in flat parts of the mesh, which is something we wanted to avoid in dem2mesh. The gridding approach generates more evenly sized and distributed triangles. Good sized triangles are important in OpenDroneMap for generating good orthophotos during the texturing step.

Credits

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본