Skip to content

Commit

Permalink
add TiePtPrep
Browse files Browse the repository at this point in the history
  • Loading branch information
LulinZhang committed Jun 5, 2022
1 parent 2e169f6 commit 797e98d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CBinaires/mm3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ extern int CoReg_GlobalR3D_main(int argc, char ** argv);
extern int PileImgs_main(int argc, char ** argv);
extern int GetOrthoHom_main(int argc, char ** argv);
extern int TransmitHelmert_main(int argc, char ** argv);
extern int TiePtPrep_main(int argc, char ** argv);


extern int ReechHomol_main(int argc, char ** argv);
Expand Down Expand Up @@ -1054,6 +1055,7 @@ const std::vector<cMMCom> & TestLibAvailableCommands()
aRes.push_back(cMMCom("PileImgs", PileImgs_main, "Pile images on an average plane in a pseudo orthophoto style"));
aRes.push_back(cMMCom("GetOrthoHom", GetOrthoHom_main, "project tie points on image pairs onto orthophotos"));
aRes.push_back(cMMCom("TransmitHelmert", TransmitHelmert_main, "Input 2 sets of 3D Helmert transformation parameters (A->C and B->C), output transimtted 3D Helmert transformation parameters (A->B)"));
aRes.push_back(cMMCom("TiePtPrep", TiePtPrep_main, "Explaination: Add weight to inter-epoch tie points, and merge them with intra-epoch tie points"));


aRes.push_back(cMMCom("Script",CPP_YannScript, "Fonction de script pour les tests "));
Expand Down
49 changes: 49 additions & 0 deletions src/uti_phgrm/TiePHistorical/cInterEp_TiePtAddWeight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,52 @@ int TiePtAddWeight_main(int argc,char ** argv)

return EXIT_SUCCESS;
}


int TiePtPrep_main(int argc,char ** argv)
{
std::string aImgList;

std::string aInterSH = "";
std::string aIntraSH = "";
std::string aOutSH = "";

int nWeight = 1;

bool aExe = false;

ElInitArgMain
(
argc,argv,
LArgMain() << EAMC(aImgList,"multi-epoch images(Dir+Pattern, or txt file of image list)"),
LArgMain()
<< EAM(aInterSH,"InterSH",true,"Input inter-epoch homologue extenion for NB/NT mode, Def=none")
<< EAM(nWeight,"W", true, "Weight to be added")
<< EAM(aIntraSH,"IntraSH",true,"Input intra-epoch homologue extenion for NB/NT mode, Def=none")
<< EAM(aOutSH,"OutSH",true,"Output Homologue extenion for NB/NT mode, Def=_Merged")
<< EAM(aExe,"Exe",true,"Execute, Def=false")
);

std::string aComm;

std::string aWei = ToString(nWeight);

aComm = MMBinFile(MM3DStr) + "TestLib TiePtAddWeight " + aWei + " InSH="+aInterSH;
cout<<aComm<<endl;
if(aExe == true)
System(aComm);

aComm = MMBinFile(MM3DStr) + "HomolFilterMasq \"" + aImgList + "\" PostIn="+aInterSH+"-W"+aWei + " PostOut="+aInterSH+"-W"+aWei+"-dat ANM=1 ExpTxt=1 ExpTxtOut=0";
cout<<aComm<<endl;
if(aExe == true)
System(aComm);

aComm = MMBinFile(MM3DStr) + "MergeHomol \"Homol" + aIntraSH + "|Homol"+aInterSH+"-W"+aWei+"-dat\" Homol" + aOutSH;
cout<<aComm<<endl;
if(aExe == true)
System(aComm);

return EXIT_SUCCESS;
}


0 comments on commit 797e98d

Please sign in to comment.