Skip to content

Commit

Permalink
added tawny function
Browse files Browse the repository at this point in the history
  • Loading branch information
Erika committed Sep 19, 2024
1 parent 1729f94 commit d4a6ce0
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions relight-pano/panobuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,21 +624,26 @@ void PanoBuilder::malt_ortho(){


void PanoBuilder::tawny(){
//prende l'input dalla sottodirectory Ortho Lights?
//prende l'input dalla sottodirectory Ortho Couleur
QDir currentDir = cd("photogrammetry");

if (!currentDir.exists()) {
throw QString("Directory photogrammetry does not exist: ") + currentDir.absolutePath();

QDir orthoCouleur(currentDir.filePath("Ortho-Couleur"));
if (!orthoCouleur.exists()) {
throw QString("orthoCouleur directory does not exist in current directory: ") + orthoCouleur.absolutePath();

}
cout << qPrintable(orthoCouleur.absolutePath()) << endl;

QStringList jpgFiles = currentDir.entryList(QStringList() << "plane_0_*.jpg", QDir::Files);
if (jpgFiles.isEmpty()) {
throw QString("No JPEG images found in photogrammetry directory");
QStringList tifFiles = orthoCouleur.entryList(QStringList() << "Ort_plane_*_Face_*.tif", QDir::Files);
if (tifFiles.isEmpty()) {
throw QString("No tif images found in photogrammetry directory ") + orthoCouleur.absolutePath();
}


QString program = mm3d_path;
QStringList arguments;
arguments << "Tawny" << "Ortho-Light" << "RadiomEgal=0" << "Out=plane_0.tif";
arguments << "Tawny" << "Ortho-Couleur" << "RadiomEgal=0" << "Out=Orthophotomosaic_NewRadiom.tif";

QString command = program + " " + arguments.join(" ");
cout << "Print command: " << qPrintable(command) << endl;
Expand Down

0 comments on commit d4a6ce0

Please sign in to comment.