kopia lustrzana https://github.com/OpenDroneMap/ODM
save georeferenced point cloud in little endian mode; fix geomodel texture files name; remove tmp change
rodzic
e17c57dba5
commit
39f6c347be
|
|
@ -25,9 +25,9 @@ check_version(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $2 =~ ^[0-9]+$ ]] ; then
|
if [[ $2 =~ ^[0-9]+$ ]] ; then
|
||||||
processes=2
|
processes=$2
|
||||||
else
|
else
|
||||||
processes=2
|
processes=$(nproc)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ensure_prereqs() {
|
ensure_prereqs() {
|
||||||
|
|
|
||||||
|
|
@ -90,10 +90,12 @@ class ODMMvsTexStage(types.ODM_Stage):
|
||||||
if (r['nadir']):
|
if (r['nadir']):
|
||||||
nadir = '--nadir_mode'
|
nadir = '--nadir_mode'
|
||||||
|
|
||||||
|
|
||||||
# mvstex definitions
|
# mvstex definitions
|
||||||
|
# mtl and texture files would be the same between topo and proj geomodel, so create with the final name
|
||||||
kwargs = {
|
kwargs = {
|
||||||
'bin': context.mvstex_path,
|
'bin': context.mvstex_path,
|
||||||
'out_dir': os.path.join(r['out_dir'], tree.odm_textured_model_obj_topo.split('.obj')[0]),
|
'out_dir': os.path.join(r['out_dir'], 'odm_textured_model_geo'),
|
||||||
'model': r['model'],
|
'model': r['model'],
|
||||||
'dataTerm': 'gmi',
|
'dataTerm': 'gmi',
|
||||||
'outlierRemovalType': 'gauss_clamping',
|
'outlierRemovalType': 'gauss_clamping',
|
||||||
|
|
@ -124,6 +126,9 @@ class ODMMvsTexStage(types.ODM_Stage):
|
||||||
'{nadirMode} '
|
'{nadirMode} '
|
||||||
'{labelingFile} '
|
'{labelingFile} '
|
||||||
'{maxTextureSize} '.format(**kwargs))
|
'{maxTextureSize} '.format(**kwargs))
|
||||||
|
|
||||||
|
# update the obj file name to topo for further conversion
|
||||||
|
shutil.move(os.path.join(r['out_dir'], tree.odm_textured_model_obj), odm_textured_model_obj)
|
||||||
|
|
||||||
if r['primary'] and (not r['nadir'] or args.skip_3dmodel):
|
if r['primary'] and (not r['nadir'] or args.skip_3dmodel):
|
||||||
# GlTF?
|
# GlTF?
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,10 @@ class ODMGeoreferencingStage(types.ODM_Stage):
|
||||||
reconstruction.georef.utm_east_offset,
|
reconstruction.georef.utm_east_offset,
|
||||||
reconstruction.georef.utm_north_offset
|
reconstruction.georef.utm_north_offset
|
||||||
)
|
)
|
||||||
pipeline = pdal.Writer.ply(tree.filtered_point_cloud).pipeline(arr)
|
pipeline = pdal.Writer.ply(
|
||||||
|
filename = tree.filtered_point_cloud,
|
||||||
|
storage_mode = "little endian",
|
||||||
|
).pipeline(arr)
|
||||||
pipeline.execute()
|
pipeline.execute()
|
||||||
else:
|
else:
|
||||||
shutil.copy(tree.filtered_point_cloud_topo, tree.filtered_point_cloud)
|
shutil.copy(tree.filtered_point_cloud_topo, tree.filtered_point_cloud)
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue