odm_orthophoto float32 support

pull/1082/head
Piero Toffanin 2020-03-09 15:48:24 +00:00
rodzic e4e874e0e1
commit ea6092fdec
5 zmienionych plików z 19 dodań i 4 usunięć

Wyświetl plik

@ -129,7 +129,7 @@ endforeach()
externalproject_add(mve
GIT_REPOSITORY https://github.com/OpenDroneMap/mve.git
GIT_TAG 098
GIT_TAG 099
UPDATE_COMMAND ""
SOURCE_DIR ${SB_SOURCE_DIR}/elibs/mve
CONFIGURE_COMMAND ""

Wyświetl plik

@ -9,7 +9,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}/${_proj_name}
GIT_REPOSITORY https://github.com/OpenDroneMap/mvs-texturing
GIT_TAG master
GIT_TAG 099
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------

Wyświetl plik

@ -9,7 +9,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/
GIT_TAG 098
GIT_TAG 099
#--Update/Patch step----------
UPDATE_COMMAND git submodule update --init --recursive
#--Configure step-------------

Wyświetl plik

@ -246,7 +246,9 @@ void OdmOrthoPhoto::saveTIFF(const std::string &filename, GDALDataType dataType)
}
// Alpha
if (dataType == GDT_UInt16){
if (dataType == GDT_Float32){
finalizeAlphaBand<float>();
}else if (dataType == GDT_UInt16){
finalizeAlphaBand<uint16_t>();
}else if (dataType == GDT_Byte){
finalizeAlphaBand<uint8_t>();
@ -504,6 +506,10 @@ void OdmOrthoPhoto::createOrthoPhoto()
log_ << "Texture depth: 16bit\n";
initBands<uint16_t>(texture.channels());
if (primary) initAlphaBand<uint16_t>();
}else if (textureDepth == CV_32F){
log_ << "Texture depth: 32bit (float)\n";
initBands<float>(texture.channels());
if (primary) initAlphaBand<float>();
}else{
std::cerr << "Unsupported bit depth value: " << textureDepth;
exit(1);
@ -537,6 +543,8 @@ void OdmOrthoPhoto::createOrthoPhoto()
drawTexturedTriangle<uint8_t>(texture, polygon, meshCloud, uvs, faceIndex+faceOff);
}else if (textureDepth == CV_16U){
drawTexturedTriangle<uint16_t>(texture, polygon, meshCloud, uvs, faceIndex+faceOff);
}else if (textureDepth == CV_32F){
drawTexturedTriangle<float>(texture, polygon, meshCloud, uvs, faceIndex+faceOff);
}
}
faceOff += faces.size();
@ -555,6 +563,8 @@ void OdmOrthoPhoto::createOrthoPhoto()
saveTIFF(outputFile_, GDT_Byte);
}else if (textureDepth == CV_16U){
saveTIFF(outputFile_, GDT_UInt16);
}else if (textureDepth == CV_32F){
saveTIFF(outputFile_, GDT_Float32);
}else{
std::cerr << "Unsupported bit depth value: " << textureDepth;
exit(1);

Wyświetl plik

@ -645,5 +645,10 @@ def config():
except exceptions.NodeConnectionError as e:
log.ODM_ERROR("Cluster node seems to be offline: %s" % str(e))
sys.exit(1)
if args.radiometric_calibration != "none" and not args.texturing_skip_global_seam_leveling:
log.ODM_WARNING("--radiometric-calibration is set, disabling texturing global seam leveling")
args.texturing_skip_global_seam_leveling = True
return args