diff --git a/appveyor.yml b/appveyor.yml index 7220eeafec..7ea72c30bb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,8 @@ before_build: - mkdir build - cd build - cmake .. -DWITH_QT5=OFF -DCMAKE_BUILD_TYPE=Release + +build_script: - cmake --build . --target INSTALL --config Release - cd .. diff --git a/include/general/arg_main.h b/include/general/arg_main.h index 00ec5b68d4..ad9365096a 100644 --- a/include/general/arg_main.h +++ b/include/general/arg_main.h @@ -402,11 +402,12 @@ class LArgMain template LArgMain & operator << (const ElArgMain & v) { - if (v.IsActif()) + if (v.IsActif()) _larg.push_back(v.dup()); return * this; } ~LArgMain(); + LArgMain & operator << (const LArgMain & v); int Size() const; diff --git a/include/general/error.h b/include/general/error.h index f29da96e5f..5e86e2ddb9 100644 --- a/include/general/error.h +++ b/include/general/error.h @@ -210,6 +210,7 @@ class ElEM // Elise Erreur Message extern bool TheExitOnBrkp; extern bool TheExitOnNan; extern bool TheExitOnWarn; +extern bool TheGoonOnWarn; extern bool TheMajickFile; extern int TheNbIterProcess; @@ -319,6 +320,7 @@ class cElWarning static cElWarning AppuisMultipleDefined; static cElWarning OnzeParamSigneIncoh; static cElWarning ToleranceSurPoseLibre; + static cElWarning EigenValueInCholeski; static void ShowWarns(const std::string & aFile); private : diff --git a/include/general/photogram.h b/include/general/photogram.h index 09e5f3b05c..8c67dedc3a 100644 --- a/include/general/photogram.h +++ b/include/general/photogram.h @@ -2828,6 +2828,7 @@ class cMirePolygonEtal bool IsNegatif() const; cMirePolygonEtal(); static const cMirePolygonEtal & IgnMireN6(); + static const cMirePolygonEtal & ENSGMireN6(); static const cMirePolygonEtal & MtdMire9(); static const cMirePolygonEtal & IGNMire7(); static const cMirePolygonEtal & IGNMire5(); @@ -2845,6 +2846,7 @@ class cMirePolygonEtal private : static const double TheIgnN6[6]; + static const double TheENSG6[6]; static const double TheMTD9[6]; static const double TheIGNDiams7[7]; static const double TheIGNDiams5[5]; @@ -2855,6 +2857,7 @@ class cMirePolygonEtal static const double TheDiamMTClous1[1]; static cMirePolygonEtal TheNewIGN6; + static cMirePolygonEtal TheNewENSG6; static cMirePolygonEtal TheMTDMire9; static cMirePolygonEtal TheIGNMire7; static cMirePolygonEtal TheIGNMire5; diff --git a/src/CBinaires/mm3d.cpp b/src/CBinaires/mm3d.cpp index 3259cef7c9..5884c04bf6 100644 --- a/src/CBinaires/mm3d.cpp +++ b/src/CBinaires/mm3d.cpp @@ -220,6 +220,7 @@ int CPP_CmpDenseMap(int argc,char** argv); int CPP_FermDenseMap(int argc,char** argv); int ScalePat_main(int argc,char** argv); int CPP_MakeMapEvolOfT(int argc,char ** argv); +int CPP_PolynOfImage(int argc,char ** argv); const std::vector & getAvailableCommands() @@ -317,6 +318,7 @@ const std::vector & getAvailableCommands() aRes.push_back(cMMCom("StackFlatField",EstimFlatField_main,"Basic Flat Field estimation by image stacking")); + aRes.push_back(cMMCom("PolynOfImage",CPP_PolynOfImage,"Approximate image by polynom")); aRes.push_back(cMMCom("Impaint",Impainting_main,"Basic Impainting")); aRes.push_back(cMMCom("Gri2Bin",Gri2Bin_main," Do some stuff")); aRes.push_back(cMMCom("MakeGrid",MakeGrid_main," Generate orientations in a grid format")); diff --git a/src/EtalonnagePolygone/CPP_ConvertPolygone.cpp b/src/EtalonnagePolygone/CPP_ConvertPolygone.cpp index 9291cd7f1a..89bd78d18c 100644 --- a/src/EtalonnagePolygone/CPP_ConvertPolygone.cpp +++ b/src/EtalonnagePolygone/CPP_ConvertPolygone.cpp @@ -263,6 +263,22 @@ void GenerePolyTxtRect int ConvertPolygone_main(int argc,char ** argv) { + /* + ConvertOnePolygone + ( + Pt3dr(0,-1,0), + "/home/mehdi/Test_Pointe_Auto/resultat_cor.txt", + "/home/mehdi/Test_Pointe_Auto/resultat_cor.xml", + "ENSG-New-6Cercles","ENSG-New-6Cercles", + true, + false, + 0, + 0, + 0, + false + ); + */ + /* { double aProfClou[2] = {4.5,9.0}; @@ -415,7 +431,7 @@ int ConvertPolygone_main(int argc,char ** argv) true ); */ - +/* ConvertOnePolygone ( Pt3dr(0,0,1), @@ -427,6 +443,7 @@ int ConvertPolygone_main(int argc,char ** argv) 0,0,0,false, false ); + */ return 0; } diff --git a/src/EtalonnagePolygone/lib/all_etal.h b/src/EtalonnagePolygone/lib/all_etal.h index 95a93ec7cc..c2e2f665b1 100644 --- a/src/EtalonnagePolygone/lib/all_etal.h +++ b/src/EtalonnagePolygone/lib/all_etal.h @@ -257,6 +257,7 @@ class cCibleRechImage cSetEqFormelles mSetSR5; cSetEqFormelles mSetMT0; cSetEqFormelles mSetMN6; + cSetEqFormelles mSetME6; cSetEqFormelles* pSet; @@ -270,6 +271,7 @@ class cCibleRechImage cEqEllipseImage * pEqElImSR5; cEqEllipseImage * pEqElImMT0; cEqEllipseImage * pEqElImN6; + cEqEllipseImage * pEqElImE6; cEqEllipseImage * pEqElIm; }; diff --git a/src/EtalonnagePolygone/lib/cCibleRechImage.cpp b/src/EtalonnagePolygone/lib/cCibleRechImage.cpp index 83681c93c4..f32496d14a 100644 --- a/src/EtalonnagePolygone/lib/cCibleRechImage.cpp +++ b/src/EtalonnagePolygone/lib/cCibleRechImage.cpp @@ -85,7 +85,6 @@ cCibleRechImage::cCibleRechImage pWSynth (AllocW()), pWFFT (AllocW()), pWGlob (0), - mSetM7 (), mSetM6 (), mSetM5 (), @@ -94,7 +93,7 @@ cCibleRechImage::cCibleRechImage mSetSR5 (), mSetMT0 (), mSetMN6 (), - + mSetME6 (), pSet (0), mDefLarg (anEtal.Param().DefLarg()), @@ -107,6 +106,7 @@ cCibleRechImage::cCibleRechImage pEqElImSR5 (mSetSR5.NewEqElIm(cMirePolygonEtal::SofianeMireR5())), pEqElImMT0 (mSetMT0.NewEqElIm(cMirePolygonEtal::MT0())), pEqElImN6 (mSetMN6.NewEqElIm(cMirePolygonEtal::IgnMireN6())), + pEqElImE6 (mSetME6.NewEqElIm(cMirePolygonEtal::ENSGMireN6())), pEqElIm (0) { @@ -125,6 +125,7 @@ cCibleRechImage::cCibleRechImage mSetSR5.SetClosed(); mSetMT0.SetClosed(); mSetMN6.SetClosed(); + mSetME6.SetClosed(); } void cCibleRechImage::ShowCible(Video_Win *pW,INT aCoul) @@ -323,10 +324,19 @@ void cCibleRechImage::RechercheImage { pSet = & mSetMN6; pEqElIm = pEqElImN6; - FPtsCorrel = 1.2; - FPtsRaff = 1.1; + FPtsCorrel = 1.2; + FPtsRaff = 1.1; + + std::cout << "BL " << pEqElIm->CurBlanc() << " N " << pEqElIm->CurNoir() << "\n"; + } + else if (& aMire == & cMirePolygonEtal::ENSGMireN6()) + { + pSet = & mSetME6; + pEqElIm = pEqElImE6; + FPtsCorrel = 1.2; + FPtsRaff = 1.1; -std::cout << "BL " << pEqElIm->CurBlanc() << " N " << pEqElIm->CurNoir() << "\n"; + std::cout << "BL " << pEqElIm->CurBlanc() << " N " << pEqElIm->CurNoir() << "\n"; } else { diff --git a/src/TpMMPD/Hugin.cpp b/src/TpMMPD/Hugin.cpp index 626eb39b22..a7cf7fdc7e 100644 --- a/src/TpMMPD/Hugin.cpp +++ b/src/TpMMPD/Hugin.cpp @@ -40,14 +40,12 @@ Header-MicMac-eLiSe-25/06/2007*/ #include "StdAfx.h" #include "schnaps.h" -template -std::string NumberToString ( T Number ) +template string NumberToString(T Number) { - std::ostringstream ss; + ostringstream ss; ss << Number; - return ss.str(); + return ss.str(); } - //---------------------------------------------------------------------------- struct Couple{ std::string Img1; @@ -183,6 +181,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv) int aProj=0; double aFov=50; bool aFilter=true; + bool aClean=true; ElInitArgMain ( @@ -194,6 +193,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv) << EAM(aProj,"Proj",false,"Projection type (default: 0)") << EAM(aFov,"FOV",false,"Horizontal field of view of images (default: 50)") << EAM(aFilter,"FilterTP",true,"Use Schnaps to reduce tie points; Def=true") + << EAM(aClean,"Clean",true,"Clean indivudual images after stitching ; Def=true") ); // !!!!!!!! sort directories by name !!!!!!! @@ -257,12 +257,12 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv) for(unsigned int aV=0; aV::iterator iT2 = aLFiles.at(aV).begin() ; iT2 != aLFiles.at(aV).end() ; iT2++) { std::cout << "---> Copy of file " << aCompt << " out of " << aLFiles.at(aV).size() << std::endl; - ELISE_fp::CpFile((*iT2).m_path.str() + (*iT2).m_basename,aNameProcFolder); //copy only if no file !!!! + ELISE_fp::CpFile((*iT2).m_path.str() + (*iT2).m_basename,aNameProcFolder); //to do : copy only if no file !!!! aCompt++; } } @@ -274,16 +274,20 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv) ctPath aNWDir = getWorkingDirectory(); std::cout << "aNWDir = " << aNWDir << std::endl; } + + //vector of names of signe mosaic for each level + std::vector aVOM; + + //lauch all the commands in // + std::list aListCom; - //pipeline to generate a pano for each level N + //pipeline to generate a pano for each level N : + //first tie points extraction using MicMac for(unsigned int aP=0; aP * aSII = aII->Get(aFPII); + std::vector aVII = *aSII; + std::cout << "aVII.size() = " << aVII.size() << std::endl; + + for(unsigned int aC=0; aC Deleting Image " << aC << " out of " << aVII.size() << " : " << aVII[aC] << std::endl; + ELISE_fp::RmFileIfExist(aVII[aC]); + } } //same pipeline to generate a global panoramique from each individual (level N & level N+1 pano) + for(unsigned int aL=0; aL aLMN; + //~ aLMN.push_back( + //~ std::string aPatL = GenPatFromLF(aLMN,false); //compute tie points for all individual panoramik diff --git a/src/TpMMPD/TiePByMesh/TaskCorrel/cAppliTaskCorrel.cpp b/src/TpMMPD/TiePByMesh/TaskCorrel/cAppliTaskCorrel.cpp index 62330b9125..72f9b387e2 100644 --- a/src/TpMMPD/TiePByMesh/TaskCorrel/cAppliTaskCorrel.cpp +++ b/src/TpMMPD/TiePByMesh/TaskCorrel/cAppliTaskCorrel.cpp @@ -303,7 +303,7 @@ void cAppliTaskCorrel::ExportXML(string aDirXML, Pt3dr clIni) //====this thing is eat RAM so much ====== for (uint aKIi = 0; aKIiNum() != aKIi) + if (aImg->Num() != int(aKIi)) aImg->Task().NameSec().push_back(mVImgs[aKIi]->Name()); } //========================================= diff --git a/src/TpMMPD/TiePByMesh/TestGiang_main.cpp b/src/TpMMPD/TiePByMesh/TestGiang_main.cpp index e5d1890ae1..ff3dfb46e8 100644 --- a/src/TpMMPD/TiePByMesh/TestGiang_main.cpp +++ b/src/TpMMPD/TiePByMesh/TestGiang_main.cpp @@ -513,7 +513,7 @@ int TestGiangNewHomol_Main(int argc,char ** argv) //cout<<"Cnf : "<NbIm()<<" - Nb Pts : "<NbPts()< aVIdIm = aCnf->VIdIm(); - for (uint aKPtCnf=0; aKPtCnfNbPts(); aKPtCnf++) + for (uint aKPtCnf=0; aKPtCnfNbPts()); aKPtCnf++) { vector aVPtInter; vector aVCamInter; diff --git a/src/optim/opt_mat_creuse.cpp b/src/optim/opt_mat_creuse.cpp index afc3def112..71381c8418 100644 --- a/src/optim/opt_mat_creuse.cpp +++ b/src/optim/opt_mat_creuse.cpp @@ -1816,7 +1816,14 @@ void cElMatCreuseBlocSym::CalculCholesky() if (TheExitOnWarn) ElEXIT(1,"aScal<=0 in Cholesky"); else - getchar(); + { + if (TheGoonOnWarn) + { + cElWarning::EigenValueInCholeski.AddWarn("Choleski",__LINE__,__FILE__); + } + else + getchar(); + } } First = false; // ELISE_ASSERT(false,"Cholesly Diag, Beg"); diff --git a/src/photogram/phgr_epip_cam.cpp b/src/photogram/phgr_epip_cam.cpp index a9c07ba192..d290e31646 100644 --- a/src/photogram/phgr_epip_cam.cpp +++ b/src/photogram/phgr_epip_cam.cpp @@ -596,7 +596,8 @@ template class cReechantEpi const CamStenope & aCamOut, Tiff_Im aTOut, Box2di aBoxOut, - Polynome2dReal * aPol + Polynome2dReal * aPol, + double aScale ); typedef TIm2D tTIm; private : @@ -619,11 +620,12 @@ template const CamStenope & aCamOut, Tiff_Im aTOut, Box2di aBoxOut, - Polynome2dReal * aPol + Polynome2dReal * aPol, + double aScale ) { - INT aRab = 10; + INT aRab = 10 + 2 * aScale; Pt2di aPRab(aRab,aRab); Box2di aBoxIn = R2I(GlobBoxCam(I2R(aBoxOut),aCamOut,aCamIn)); aBoxIn._p0 = Sup(Pt2di(0,0),aBoxIn._p0-aPRab); @@ -657,6 +659,16 @@ template } ELISE_COPY(rectangle(Pt2di(0,0),aSzIn),trans(aTIn.in_proj(),aBoxIn._p0),aOutInit); +/* + if (aScale != 1) + { + for (int aKC=0 ; aKC } cInterpolateurIm2D * aKern = 0; + cKernelInterpol1D * aK1D = 0; if (0) { aKern = new cInterpolBilineaire; } + else if (aScale!=1) + { + aK1D = cKernelInterpol1D::StdInterpCHC(1.0*aScale); + aKern = new cTabIM2D_FromIm2D(aK1D,100,false); + } else if (1) { aKern = new cTplCIKTabul(7,8,-0.5); @@ -737,6 +755,7 @@ template aTOut.out() ); delete aKern; + delete aK1D; } @@ -747,23 +766,31 @@ void ReechEpipGen const CamStenope & aCamOut, Tiff_Im aTOut, Box2di aBoxOut, - Polynome2dReal * aPol + Polynome2dReal * aPol, + double aScale ) { switch (aTOut.type_el()) { case GenIm::u_int1 : { - cReechantEpi aREE1(aCamIn,aTIn,aCamOut,aTOut,aBoxOut,aPol); + cReechantEpi aREE1(aCamIn,aTIn,aCamOut,aTOut,aBoxOut,aPol,aScale); } break; case GenIm::u_int2 : { - cReechantEpi aREE2(aCamIn,aTIn,aCamOut,aTOut,aBoxOut,aPol); + cReechantEpi aREE2(aCamIn,aTIn,aCamOut,aTOut,aBoxOut,aPol,aScale); + } + break; + + case GenIm::real4 : + { + cReechantEpi aREE2(aCamIn,aTIn,aCamOut,aTOut,aBoxOut,aPol,aScale); } break; + default : ELISE_ASSERT(false,"Numerical type not handled in cReechantEpi"); } @@ -780,7 +807,7 @@ int CreateBlockEpip_main(int argc,char ** argv) bool mSinCard=false; std::vector aVecPolCorrec; - double anAmplPol; + double anAmplPol,aScale; @@ -795,6 +822,7 @@ int CreateBlockEpip_main(int argc,char ** argv) LArgMain() << EAM(mSinCard,"SinCard",true,"Use sinus card for interp, def = false") << EAM(aVecPolCorrec,"PolCorr",true,"Coeff of pol correc") << EAM(anAmplPol,"AmplPol",true,"Ampl of Pol") + << EAM(aScale,"Scale",true,"Ampl of Pol") ); CamStenope * aCamOut = CamOrientGenFromFile(aNameCamOut,0); @@ -811,7 +839,7 @@ int CreateBlockEpip_main(int argc,char ** argv) } - ReechEpipGen(*aCamIn,aTIn,*aCamOut,aTOut,aBoxOut,aPolCor); + ReechEpipGen(*aCamIn,aTIn,*aCamOut,aTOut,aBoxOut,aPolCor,aScale); return 0; } @@ -1091,7 +1119,7 @@ void cCpleEpip::ImEpip(Tiff_Im aTIn,const std::string & aNameOriIn,bool Im1,bool if (! DoIm) return; - GenIm::type_el aTypeNOut = aTIn.type_el(); + GenIm::type_el aTypeNOut = (mScale==1.0) ? aTIn.type_el() : GenIm::real4 ; Tiff_Im aTOut ( aNameImOut.c_str(), @@ -1133,7 +1161,8 @@ void cCpleEpip::ImEpip(Tiff_Im aTIn,const std::string & aNameOriIn,bool Im1,bool + " " + aNameImOut + " " + mDir + aNameOriIn + " " + mDir + aNameOriOut - + " " + QUOTE(ToString(aBoxOut)); + + " " + QUOTE(ToString(aBoxOut)) + + " Scale=" + ToString(mScale) ; if (aPolyCor) { @@ -1146,7 +1175,7 @@ void cCpleEpip::ImEpip(Tiff_Im aTIn,const std::string & aNameOriIn,bool Im1,bool } else { - ReechEpipGen (aCamIn,aTIn,aCamOut,aTOut,aBoxOut,0); + ReechEpipGen (aCamIn,aTIn,aCamOut,aTOut,aBoxOut,0,mScale); } } if (InParal) diff --git a/src/photogram/phgr_polyg.cpp b/src/photogram/phgr_polyg.cpp index 92a2792e0c..84873a2e53 100644 --- a/src/photogram/phgr_polyg.cpp +++ b/src/photogram/phgr_polyg.cpp @@ -321,6 +321,11 @@ const cMirePolygonEtal & cMirePolygonEtal::IgnMireN6() return TheNewIGN6; } +const cMirePolygonEtal & cMirePolygonEtal::ENSGMireN6() +{ + return TheNewENSG6; +} + const cMirePolygonEtal & cMirePolygonEtal::MT0() { return TheMT0; @@ -344,9 +349,11 @@ const double cMirePolygonEtal::TheSofianeDiamR5[5] = {34,26,18,11,8}; const double cMirePolygonEtal::TheMT0Diams[1] = {52.0}; const double cMirePolygonEtal::TheDiamMTClous1[] = {}; +const double cMirePolygonEtal::TheENSG6[6] = {25.0,20.0,17.0,12.0,10.0,5.0}; // 28 16 9 5 1 +cMirePolygonEtal cMirePolygonEtal::TheNewENSG6("ENSG-New-6Cercles",TheENSG6,6); cMirePolygonEtal cMirePolygonEtal::TheNewIGN6("Ign-New-6Cercles",TheIgnN6,6); cMirePolygonEtal cMirePolygonEtal::TheMTDMire9("MTDMire9",TheMTD9,6); @@ -383,7 +390,10 @@ const cMirePolygonEtal & cMirePolygonEtal::GetFromName(const std::string & aName if ((aName == "MT0") || (aName == "Mtd0")) return TheMT0; - + + if (aName == "ENSG-New-6Cercles") + return TheNewENSG6; + if (aName == "Clous1") return TheMTClous1; std::cout << "UNKNOWN NAME =[" << aName << "]\n"; diff --git a/src/tiff/tiff_header.cpp b/src/tiff/tiff_header.cpp index 6568ab0069..c57b90511b 100644 --- a/src/tiff/tiff_header.cpp +++ b/src/tiff/tiff_header.cpp @@ -781,7 +781,7 @@ DATA_Tiff_Ifd::DATA_Tiff_Ifd else // (aIntBigTif==0) { - std::cout << "BIGTIF suspended momentally \n"; + if (MPD_MM()) std::cout << "BIGTIF suspended momentally \n"; // mUseFileTile = 0; // mBigTiff = aSzNCompr > aMaxSzFile; } diff --git a/src/uti_image/CPP_EstimFlatField.cpp b/src/uti_image/CPP_EstimFlatField.cpp index 7da70e5d3c..79b9d4ea9f 100644 --- a/src/uti_image/CPP_EstimFlatField.cpp +++ b/src/uti_image/CPP_EstimFlatField.cpp @@ -39,10 +39,6 @@ Header-MicMac-eLiSe-25/06/2007*/ #include "StdAfx.h" /* -Parametre de Tapas : - - - calibration In : en base de donnees ou deja existantes. - */ @@ -223,8 +219,82 @@ int EstimFlatField_main(int argc,char ** argv) } +/*****************************************************/ +/* */ +/* Polynomial Flat Field */ +/* */ +/*****************************************************/ + +class cAppliPolyImage +{ + public : + cAppliPolyImage(int,char **); + private : + +}; + +cAppliPolyImage::cAppliPolyImage(int argc,char ** argv) +{ + std::string aNameIn,aNameOut,aNameImRes; + int aDegre; + int aNbEch = 100; + + ElInitArgMain + ( + argc,argv, + LArgMain() << EAMC(aNameIn,"Flat Field Image", eSAM_IsPatFile) + << EAMC(aDegre,"Degre of Polynom"), + LArgMain() << EAM(aNameOut,"Out",true,"Name of output polynomial image") + << EAM(aNameImRes,"ImRes",true,"Image of residual") + ); + if (! EAMIsInit(&aNameOut)) + aNameOut = StdPrefix(aNameIn) + "-ApproxPol" +ToString(aDegre) + ".tif"; + + Im2D_REAL8 aImIn = Im2D_REAL8::FromFileStd(aNameIn); + Pt2di aSzIm = aImIn.sz(); + Box2dr aBoxIm(Pt2dr(0,0),Pt2dr(aSzIm)); + + std::vector aVPts; + std::vector aVVals; + for (int aKx=0 ; aKx<=aNbEch ; aKx++) + { + for (int aKy=0 ; aKy<=aNbEch ; aKy++) + { + double aSom[4]; + Pt2di aP0 = round_down(aBoxIm.FromCoordLoc (Pt2dr(aKx-0.5,aKy-0.5)/aNbEch)); + Pt2di aP1 = round_up (aBoxIm.FromCoordLoc (Pt2dr(aKx+0.5,aKy+0.5)/aNbEch)); + ELISE_COPY(rectangle(aP0,aP1),Virgule(aImIn.in_proj(),FX,FY,1.0),sigma(aSom,4)); + + aVVals.push_back(aSom[0]/aSom[3]); + aVPts.push_back(Pt2dr(aSom[1],aSom[2])/aSom[3]); + } + } + + Polynome2dReal aPol = LeasquarePol2DFit(aDegre,aVPts,aVVals,0); + + Im2D_REAL8 aImOut(aSzIm.x,aSzIm.y); + Pt2di aP; + for (aP.x=0 ; aP.x aVRes; std::vector aVG2C; + std::vector aVRes3D; for(unsigned int aP=0; aP aPGI3A = mAnamSA->InterDemiDroiteVisible(aSeg,0); // aTM.oset(aP,aNbSol>0); +if( MPD_MM()) std::cout << "IsInZoneUtile " << aPGI3A.IsInit() << "\n"; if (aPGI3A.IsInit() ) { Pt3dr aP3A = aPGI3A.Val(); diff --git a/src/uti_phgrm/NewOri/.cNewO_Appli.cpp.swp b/src/uti_phgrm/NewOri/.cNewO_Appli.cpp.swp deleted file mode 100644 index ac6556faaa..0000000000 Binary files a/src/uti_phgrm/NewOri/.cNewO_Appli.cpp.swp and /dev/null differ diff --git a/src/uti_phgrm/NewOri/NewOri.h b/src/uti_phgrm/NewOri/NewOri.h index 98f1f2815f..35a37f030a 100644 --- a/src/uti_phgrm/NewOri/NewOri.h +++ b/src/uti_phgrm/NewOri/NewOri.h @@ -91,6 +91,29 @@ ElPackHomologue PackReduit(const ElPackHomologue & aPack,int aNbInit,int aNbFin) ElPackHomologue PackReduit(const ElPackHomologue & aPack,int aNbFin); +class cCommonMartiniAppli +{ + public : + std::string mNameOriCalib; + std::string mPrefHom; + std::string mExtName; + std::string mNameModeNO; + std::string mInOri; + bool mAcceptUnSym; + bool mQuick; + bool mShow; + + LArgMain & ArgCMA(); + std::string ComParam(); + + cCommonMartiniAppli(); + + private : + cCommonMartiniAppli(const cCommonMartiniAppli &) ; // N.I. + LArgMain * mArg; +}; + + class cNewO_OneIm { public : @@ -150,6 +173,9 @@ class cNewO_OrInit2Im double ExactCost(const ElRotation3D & aRot,double aTetaMax) const; double PixExactCost(const ElRotation3D & aRot,double aTetaMax) const; const cXml_Ori2Im & XmlRes() const; + void DoExpMM(); + void DoExpMM(cNewO_OneIm *,const ElRotation3D &,const Pt3dr & aPMed); + private : diff --git a/src/uti_phgrm/NewOri/SolInitNewOri.h b/src/uti_phgrm/NewOri/SolInitNewOri.h index 5e01387242..9e17de7015 100644 --- a/src/uti_phgrm/NewOri/SolInitNewOri.h +++ b/src/uti_phgrm/NewOri/SolInitNewOri.h @@ -303,7 +303,7 @@ class cNO_CC_TripSom int mNumCC; }; -class cAppli_NewSolGolInit +class cAppli_NewSolGolInit : public cCommonMartiniAppli { public : cAppli_NewSolGolInit(int , char **); @@ -369,12 +369,8 @@ class cAppli_NewSolGolInit std::string mFullPat; - std::string mOriCalib; cElemAppliSetFile mEASF; cNewO_NameManager * mNM; - bool mQuick; - std::string mPrefHom; - std::string mExtName; bool mTest; bool mSimul; std::string mOriTest; @@ -427,8 +423,6 @@ class cAppli_NewSolGolInit bool mActiveRemoy; ElTimer mChrono; int mNbIterLast; - std::string mModeNO; - std::string mInOri; bool mHasInOri; }; diff --git a/src/uti_phgrm/NewOri/cNewO_Appli.cpp b/src/uti_phgrm/NewOri/cNewO_Appli.cpp index f316f264fb..2ccb2ab5fe 100644 --- a/src/uti_phgrm/NewOri/cNewO_Appli.cpp +++ b/src/uti_phgrm/NewOri/cNewO_Appli.cpp @@ -39,6 +39,54 @@ Header-MicMac-eLiSe-25/06/2007*/ #include "NewOri.h" + +LArgMain & cCommonMartiniAppli::ArgCMA() +{ + return *mArg; +} + +cCommonMartiniAppli::cCommonMartiniAppli() : + mNameOriCalib (""), + mPrefHom (""), + mExtName (""), + mNameModeNO (TheStdModeNewOri), + mInOri (""), + mAcceptUnSym (false), + mQuick (true), + mShow (false), + mArg (new LArgMain) +{ + (*mArg) + << EAM(mNameOriCalib,"OriCalib",true,"Orientation for calibration ", eSAM_IsExistDirOri) + << EAM(mPrefHom,"SH",true,"Prefix Homologue , Def=\"\"") // SH par homogeneite avec autre commandes + << EAM(mExtName,"ExtName",true,"User's added Prefix , Def=\"\"") // SH par homogeneite avec autre commandes + << EAM(mNameModeNO,"ModeNO",true,"Mode Def=Std") + << EAM(mInOri,"InOri",true,"Existing orientation if any") + << EAM(mAcceptUnSym,"AUS",true,"Accept non symetric homologous point;") + << EAM(mQuick,"Quick",true,"If true (default) do less test") + << EAM(mShow,"Show",true,"If true (non default) print (a lot of) messages") ; +} + +std::string cCommonMartiniAppli::ComParam() +{ + std::string aCom; + if (EAMIsInit(&mNameOriCalib)) aCom += aCom + " OriCalib=" + mNameOriCalib; + if (EAMIsInit(&mPrefHom)) aCom += " SH=" + mPrefHom; + if (EAMIsInit(&mExtName)) aCom += " ExtName=" + mExtName; + if (EAMIsInit(&mNameModeNO)) aCom += " ModeNO=" + mNameModeNO; + if (EAMIsInit(&mInOri)) aCom += " InOri=" + mInOri; + if (EAMIsInit(&mAcceptUnSym)) aCom += " AUS=" + ToString(mAcceptUnSym); + if (EAMIsInit(&mQuick)) aCom += " Quick=" + ToString(mQuick); + if (EAMIsInit(&mShow)) aCom += " Show=" + ToString(mShow); + + return aCom; +} + + + //============================================================== + //============================================================== + //============================================================== + const std::string TheStdModeNewOri = "Std"; eTypeModeNO ToTypeNO(const std::string & aStr) @@ -47,7 +95,7 @@ eTypeModeNO ToTypeNO(const std::string & aStr) } -class cAppli_Martini +class cAppli_Martini : public cCommonMartiniAppli { public : cAppli_Martini(int argc,char ** argv,bool Quick); @@ -56,15 +104,10 @@ class cAppli_Martini private : void StdCom(const std::string & aCom,const std::string & aPost=""); - std::string mNameOriCalib; std::string mPat; bool mExe; bool mQuick; - std::string mPrefHom; - std::string mExtName; - std::string mNameModeNO; eTypeModeNO mModeNO; - std::string mInOri; ElTimer aChrono; }; @@ -72,16 +115,9 @@ class cAppli_Martini void cAppli_Martini::StdCom(const std::string & aCom,const std::string & aPost) { std::string aFullCom = MM3dBinFile_quotes( "TestLib ") + aCom + " " + QUOTE(mPat); - if (EAMIsInit(&mNameOriCalib)) aFullCom = aFullCom + " OriCalib=" + mNameOriCalib; - aFullCom += " Quick=" + ToString(mQuick); - aFullCom = aFullCom + aPost; + aFullCom = aFullCom + ComParam(); - aFullCom = aFullCom + " PrefHom=" + mPrefHom; - aFullCom = aFullCom + " ExtName=" + mExtName; - aFullCom = aFullCom + " ModeNO=" + mNameModeNO; - if (mInOri != "") - aFullCom = aFullCom + " InOri=" + mInOri; if (mExe) @@ -154,25 +190,25 @@ void cAppli_Martini::DoAll() cAppli_Martini::cAppli_Martini(int argc,char ** argv,bool Quick) : - mExe (true), - mQuick (Quick), + mExe (true) +/* mPrefHom (""), mExtName (""), - mNameModeNO (TheStdModeNewOri) + mNameModeNO (TheStdModeNewOri), + mInOri ("") +*/ { ElInitArgMain ( argc,argv, LArgMain() << EAMC(mPat,"Image Pat", eSAM_IsPatFile), - LArgMain() << EAM(mNameOriCalib,"OriCalib",true,"Orientation for calibration ", eSAM_IsExistDirOri) + LArgMain() << EAM(mExe,"Exe",true,"Execute commands, def=true (if false, only print)") - << EAM(mPrefHom,"SH",true,"Prefix Homologue , Def=\"\"") // SH par homogeneite avec autre commandes - << EAM(mExtName,"ExtName",true,"User's added Prefix , Def=\"\"") // SH par homogeneite avec autre commandes - << EAM(mNameModeNO,"ModeNO",true,"Mode Def=Std") - << EAM(mInOri,"InOri",true,"Existing orientation if any") - // << EAM(mQuick,"Quick",true,"Quick version") + << ArgCMA() ); + if (!EAMIsInit(&mQuick)) mQuick = Quick; + mModeNO = ToTypeNO(mNameModeNO); // Force la creation des auto cal diff --git a/src/uti_phgrm/NewOri/cNewO_CpleIm.cpp b/src/uti_phgrm/NewOri/cNewO_CpleIm.cpp index f31c678be5..a34391da5c 100644 --- a/src/uti_phgrm/NewOri/cNewO_CpleIm.cpp +++ b/src/uti_phgrm/NewOri/cNewO_CpleIm.cpp @@ -268,7 +268,9 @@ cNewO_OrInit2Im::cNewO_OrInit2Im // std::cout << "SIIZZZ " << mXml.NbPts() << "\n"; if (mShow) + { std::cout << "NbPts " << mPackPStd.size() << " RED " << mPackStdRed.size() << "\n"; + } if (mXml.NbPts()<(mSelAllIm ? NbMinPts2Im_AllSel : NbMinPts2Im) ) { return; @@ -459,7 +461,7 @@ cNewO_OrInit2Im::cNewO_OrInit2Im aXCmp.HomWithR().ResiduHom() = aDist ; */ // if (ShowDetailHom) std::cout << "THom1= " << aChrono.uval() << "\n"; - // if (mShow) + // if (m Show) // std::cout << " #### Residu Homographie " << aDist *FocMoy() << " Recvrt=" << aRecHom << "\n"; cResMepRelCoplan aRMC = ElPackHomologue::MepRelCoplan(1.0,aHom,tPairPt(Pt2dr(0,0),Pt2dr(0,0))); @@ -578,6 +580,25 @@ const cXml_Ori2Im & cNewO_OrInit2Im::XmlRes() const } +void cNewO_OrInit2Im::DoExpMM(cNewO_OneIm * aI,const ElRotation3D & aRot,const Pt3dr & aPMed) +{ + CamStenope * aCS = aI->CS()->Dupl(); + aCS->SetOrientation(aRot); + + cOrientationConique aOC = aCS->ExportCalibGlob(aI->CS()->Sz(),aPMed.z,euclid(aPMed),0,true,"ExportMartini"); + MakeFileXML(aOC,mI1->NM().ICNM()->NameOriStenope("MartiniRel",aI->Name())); +} + + +void cNewO_OrInit2Im::DoExpMM() +{ + Pt3dr aPMed = mXml.Geom().Val().OrientAff().PMed1(); + + DoExpMM(mI1,ElRotation3D::Id,aPMed); + ElRotation3D aR2(mBestSol.tr(),mBestSol.Mat(),true); + DoExpMM(mI2,aR2.inv(),aPMed); +} + /*****************************************************************/ /* */ @@ -585,7 +606,7 @@ const cXml_Ori2Im & cNewO_OrInit2Im::XmlRes() const /* */ /*****************************************************************/ -class cNO_AppliOneCple +class cNO_AppliOneCple : public cCommonMartiniAppli { public : cNO_AppliOneCple(int argc,char **argv); @@ -593,33 +614,28 @@ class cNO_AppliOneCple cNewO_OrInit2Im * CpleIm(); std::string NameXmlOri2Im(bool Bin) const; ElRotation3D * OrientationRelFromExisting(std::string &); + bool ExpMM() const; private : cNO_AppliOneCple(const cNO_AppliOneCple &); // N.I. bool mGenOri; - bool mQuick; - std::string mPrefHom; - std::string mExtName; std::string mNameIm1; std::string mNameIm2; - std::string mNameOriCalib; cNewO_NameManager * mNM; cNewO_OneIm * mIm1; cNewO_OneIm * mIm2; std::vector mVI; std::string mNameOriTest; - bool mShow; bool mHPP; // Structure pour creer la representation explicite sous forme de points multiples tMergeLPackH mMergeStr; ElRotation3D * mTestSol; - ElRotation3D * mInOri; - std::string mNameModeNO; + ElRotation3D * mRotInOri; eTypeModeNO mModeNO; bool mIsTTK; // Test Tomasi Kanade bool mSelAllCple; // Test Tomasi Kanade - std::string mNameInOri; + bool mExpMM; // Do an export in MM mode }; std::string cNO_AppliOneCple::NameXmlOri2Im(bool Bin) const @@ -631,18 +647,14 @@ std::string cNO_AppliOneCple::NameXmlOri2Im(bool Bin) const + cNO_AppliOneCple::cNO_AppliOneCple(int argc,char **argv) : - mGenOri (true), - mQuick (false), - mPrefHom (""), - mExtName (""), - mShow (false), - mHPP (true), + mGenOri (true), + mHPP (true), mMergeStr (2,false), - mTestSol (0), - mInOri (0), - mNameModeNO (TheStdModeNewOri), - mNameInOri () + mTestSol (0), + mRotInOri (0), + mExpMM (false) { ElInitArgMain @@ -650,18 +662,13 @@ cNO_AppliOneCple::cNO_AppliOneCple(int argc,char **argv) : argc,argv, LArgMain() << EAMC(mNameIm1,"Name First Image", eSAM_IsExistFile) << EAMC(mNameIm2,"Name Second Image", eSAM_IsExistFile), - LArgMain() << EAM(mNameOriCalib,"OriCalib",true,"Orientation for calibration", eSAM_IsExistDirOri) - << EAM(mNameOriTest,"OriTest",true,"Orientation for test to a reference", eSAM_IsExistDirOri) - << EAM(mShow,"Show",true,"Show") - << EAM(mQuick,"Quick",true,"Quick option adapted for UAV or easy acquisition, def = true") - << EAM(mGenOri,"GenOri",true,"Generate Ori, Def=true, false for quick process to RedTieP") - << EAM(mPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(mExtName,"ExtName",true,"User's added Prefix, def=\"\"") + LArgMain() << EAM(mGenOri,"GenOri",true,"Generate Ori, Def=true, false for quick process to RedTieP") << EAM(mHPP,"HPP",true,"Homograhic Planar Patch") - << EAM(mNameModeNO,"ModeNO",true,"Mode New Ori") - << EAM(mNameInOri,"InOri",true,"Mode New Ori") + << EAM(mExpMM,"ExpMM",true,"Export in MicMac Std format the relative orientation") + << ArgCMA() ); + mModeNO = ToTypeNO(mNameModeNO); mIsTTK = (mModeNO==eModeNO_TTK); mSelAllCple = mIsTTK; @@ -693,8 +700,8 @@ cNO_AppliOneCple::cNO_AppliOneCple(int argc,char **argv) : mTestSol = OrientationRelFromExisting(mNameOriTest); - if (EAMIsInit(&mNameInOri)) - mInOri = OrientationRelFromExisting(mNameInOri); + if (EAMIsInit(&mInOri)) + mRotInOri = OrientationRelFromExisting(mInOri); /* if (EAMIsInit(&mNameOriTest)) { @@ -728,14 +735,19 @@ ElRotation3D * cNO_AppliOneCple::OrientationRelFromExisting(std::string & aName return new ElRotation3D(aRot); } +bool cNO_AppliOneCple::ExpMM() const +{ + return mExpMM; +} + + cNewO_OrInit2Im * cNO_AppliOneCple::CpleIm() { - return new cNewO_OrInit2Im(mGenOri,mQuick,mIm1,mIm2,&mMergeStr,mTestSol,mInOri,mShow,mHPP,mSelAllCple); + return new cNewO_OrInit2Im(mGenOri,mQuick,mIm1,mIm2,&mMergeStr,mTestSol,mRotInOri,mShow,mHPP,mSelAllCple); } void cNO_AppliOneCple::Show() { - // std::cout << "NbTiep " << .size() << "\n"; } extern void Bench_NewOri(); @@ -792,6 +804,9 @@ int TestNewOriImage_main(int argc,char ** argv) MakeFileXML(aXml,anAppli.NameXmlOri2Im(true)); MakeFileXML(aXml,anAppli.NameXmlOri2Im(false)); + if (anAppli.ExpMM()) + aCple->DoExpMM(); + return EXIT_SUCCESS; } @@ -805,28 +820,19 @@ int TestNewOriImage_main(int argc,char ** argv) int TestAllNewOriImage_main(int argc,char ** argv) { - std::string aPat,aNameOriCalib; - bool aQuick=true; + std::string aPat; bool aGenOri=true; - std::string aPrefHom; - std::string aExtName; - std::string aNameModeNO = TheStdModeNewOri; + cCommonMartiniAppli aCMA; std::string aNameIm1; std::string aPatGlob; - std::string aInOri; ElInitArgMain ( argc,argv, LArgMain() << EAMC(aPat,"Pattern"), - LArgMain() << EAM(aNameOriCalib,"OriCalib",true,"Orientation for calibration ") - << EAM(aQuick,"Quick",true,"Quick option, adapted to simple acquisition (def=false)") - << EAM(aGenOri,"GenOri",true,"Set false to accelarate pre process for RedTieP)") - << EAM(aPrefHom,"PrefHom",true,"Prefix Homologous") - << EAM(aExtName,"ExtName",true,"User's added Prefix") - << EAM(aNameModeNO,"ModeNO",true,"Mode New Ori") - << EAM(aInOri,"InOri",true,"Existing orientation if any") + LArgMain() << EAM(aGenOri,"GenOri",true,"Set false to accelarate pre process for RedTieP)") + << aCMA.ArgCMA() << EAM(aNameIm1,"NameIm1",true,"Name of Image1, internal purpose") << EAM(aPatGlob,"PatGlob",true,"Name of Image1, internal purpose") ); @@ -839,7 +845,7 @@ int TestAllNewOriImage_main(int argc,char ** argv) cElemAppliSetFile anEASF(aPat); const cInterfChantierNameManipulateur::tSet * aVIm = anEASF.SetIm(); std::string aDir = anEASF.mDir; - cNewO_NameManager * aNM = new cNewO_NameManager(aExtName,aPrefHom,aQuick,aDir,aNameOriCalib,"dat"); + cNewO_NameManager * aNM = new cNewO_NameManager(aCMA.mExtName,aCMA.mPrefHom,aCMA.mQuick,aDir,aCMA.mNameOriCalib,"dat"); cInterfChantierNameManipulateur* anICNM = anEASF.mICNM; if (!aModeIm1) @@ -856,6 +862,7 @@ int TestAllNewOriImage_main(int argc,char ** argv) aNM->NameXmlOri2Im(aName,aName,true); std::string aCom = GlobArcArgv + " NameIm1=" + aName + " PatGlob="+ QUOTE(anEASF.mPat); + aExePaq.AddCom(aCom); } // C'est le ~cExeParalByPaquets => qui va lance l'execution @@ -863,9 +870,9 @@ int TestAllNewOriImage_main(int argc,char ** argv) else { // Mode ou on execute vraiment pour une image - std::string aKeySub = "NKS-Set-HomolOfOneImage@"+ aPrefHom + "@dat@" + aNameIm1; + std::string aKeySub = "NKS-Set-HomolOfOneImage@"+ aCMA.mPrefHom + "@dat@" + aNameIm1; const cInterfChantierNameManipulateur::tSet * aVH = anICNM->Get(aKeySub); - std::string aKeyH = "NKS-Assoc-CplIm2Hom@"+ aPrefHom + "@dat"; + std::string aKeyH = "NKS-Assoc-CplIm2Hom@"+ aCMA.mPrefHom + "@dat"; cListOfName aLON; @@ -893,20 +900,15 @@ int TestAllNewOriImage_main(int argc,char ** argv) { std::string aNameH21 = aDir + anEASF.mICNM->Assoc1To2(aKeyH,aNameIm2,aNameIm1,true); // Lance la commande qui va vraiment faire le calcul - if (ELISE_fp::exist_file(aNameH21)) + if (ELISE_fp::exist_file(aNameH21) || aCMA.mAcceptUnSym) { std::string aCom = MM3dBinFile("TestLib NO_Ori2Im") + " " + aNameIm1 + " " + aNameIm2 + " "; - if (EAMIsInit(&aNameOriCalib)) - aCom = aCom + " OriCalib=" + aNameOriCalib; - aCom = aCom + " Quick=" + ToString(aQuick); aCom = aCom + " GenOri=" + ToString(aGenOri); - aCom = aCom + " PrefHom=" + aPrefHom; - aCom = aCom + " ExtName=" + aExtName; - aCom = aCom + " ModeNO=" + aNameModeNO; - aCom = aCom + " InOri=" + aInOri; - + aCom = aCom + aCMA.ComParam(); + if (aCMA.mShow) + std::cout << "COM2EXE=" << aCom << "\n"; + System(aCom); - } } if (ELISE_fp::exist_file(aNamOri)) diff --git a/src/uti_phgrm/NewOri/cNewO_GenTriplets.cpp b/src/uti_phgrm/NewOri/cNewO_GenTriplets.cpp index 084f6f6267..c67fff1fa4 100644 --- a/src/uti_phgrm/NewOri/cNewO_GenTriplets.cpp +++ b/src/uti_phgrm/NewOri/cNewO_GenTriplets.cpp @@ -690,7 +690,7 @@ cNewAppli_GenTriplet::cNewAppli_GenTriplet(int argc,char ** argv) argc,argv, LArgMain() << EAMC(mFullName,"Pattern", eSAM_IsPatFile), LArgMain() << EAM(mNameOriCalib,"OriCalib",true,"Orientation for calibration", eSAM_IsExistDirOri) - << EAM(mShow,"Show",true,"Show intermediary message") + << EAM(m Show,"Show",true,"Show intermediary message") << EAM(mNameTest1,"Test1",true,"Name of first test image", eSAM_IsExistFile) << EAM(mNameTest2,"Test2",true,"Name of second test image", eSAM_IsExistFile) << EAM(mNameTest3,"Test3",true,"Name of second test image", eSAM_IsExistFile) @@ -757,7 +757,7 @@ cNewAppli_GenTriplet::cNewAppli_GenTriplet(int argc,char ** argv) } } - if (((aKC%50)==0) && mShow) + if (((aKC%50)==0) && m Show) { std::cout << "AAAAAAAAAAAA " << aSetCple->size() - aKC << "\n"; } diff --git a/src/uti_phgrm/NewOri/cNewO_OldGenTriplets.cpp b/src/uti_phgrm/NewOri/cNewO_OldGenTriplets.cpp index 27b98c6239..e20016e868 100644 --- a/src/uti_phgrm/NewOri/cNewO_OldGenTriplets.cpp +++ b/src/uti_phgrm/NewOri/cNewO_OldGenTriplets.cpp @@ -228,7 +228,7 @@ class cResTriplet typedef cTplTriplet cTripletInt; -class cAppli_GenTriplet +class cAppli_GenTriplet : public cCommonMartiniAppli { public : cAppli_GenTriplet(int argc,char ** argv); @@ -272,12 +272,10 @@ class cAppli_GenTriplet tGrGT mGrT; tSubGrGT mSubAll; std::string mFullName; - std::string mNameOriCalib; cElemAppliSetFile mEASF; cNewO_NameManager * mNM; std::map mMapS; std::vector mVecAllSom; - //std::vector m; std::map mMapTriplets; cXml_TopoTriplet mTopoTriplets; @@ -295,7 +293,6 @@ class cAppli_GenTriplet tSomGT * mCurS1; tSomGT * mCurS2; tSomGT * mSomTest3; - bool mShow; bool mDebug; Pt2df mPInf; Pt2df mPSup; @@ -309,14 +306,9 @@ class cAppli_GenTriplet double mMulQuant; double mTimeMerge; double mTimeSelec; - bool mQuick; - std::string mPrefHom; - std::string mExtName; double mRamAllowed; int mKS0; - std::string mNameModeNO; eTypeModeNO mModeNO; - std::string mInOri; bool mSelAll; }; @@ -977,17 +969,17 @@ cAppli_GenTriplet::cAppli_GenTriplet(int argc,char ** argv) : mCurS1 (0), mCurS2 (0), mSomTest3 (0), - mShow (true), + // m Show (true), mDebug (false), mTimeMerge (0.0), mTimeSelec (0.0), - mQuick (true), - mPrefHom (""), - mExtName (""), + // mQuick (true), + // mPrefHom (""), + // mExtName (""), mRamAllowed (4e9), - mKS0 (0), - mNameModeNO (TheStdModeNewOri), - mInOri ("") + mKS0 (0) + // mNameModeNO (TheStdModeNewOri), + // mInOri ("") { ElTimer aChronoLoad; @@ -995,19 +987,14 @@ cAppli_GenTriplet::cAppli_GenTriplet(int argc,char ** argv) : ( argc,argv, LArgMain() << EAMC(mFullName,"Pattern", eSAM_IsPatFile), - LArgMain() << EAM(mNameOriCalib,"OriCalib",true,"Orientation for calibration", eSAM_IsExistDirOri) + LArgMain() << EAM(mShow,"Show",true,"Show intermediary message") << EAM(mNameTest1,"Test1",true,"Name of first test image", eSAM_IsExistFile) << EAM(mNameTest2,"Test2",true,"Name of second test image", eSAM_IsExistFile) << EAM(mNameTest3,"Test3",true,"Name of second test image", eSAM_IsExistFile) - << EAM(mQuick,"Quick",true,"Quick version", eSAM_IsBool) << EAM(mDebug,"Debug",true,"Debug .... tuning purpose .... Def=false", eSAM_IsBool) << EAM(mKS0,"KS0",true,"Tuning Def=0", eSAM_IsBool) - << EAM(mPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(mExtName,"ExtName",true,"User's added prefix, def=\"\"") - << EAM(mNameModeNO,"ModeNO",true,"Mode (Def=Std)") - << EAM(mInOri,"InOri",true,"Existing orientation if any") - + << ArgCMA() ); mModeNO = ToTypeNO(mNameModeNO); @@ -1037,8 +1024,6 @@ cAppli_GenTriplet::cAppli_GenTriplet(int argc,char ** argv) : mMapS[aName] = &aS; } - // const cInterfChantierNameManipulateur::tSet * aSetCple = mEASF.mICNM->Get("NKS-Set-CplIm2OriRel@"+mNameOriCalib+"@dmp"); - // std::string aKeyCple2I = "NKS-Assoc-CplIm2OriRel@"+mNameOriCalib+"@dmp"; const cInterfChantierNameManipulateur::tSet * aSetCple = mEASF.mICNM->Get(mNM->KeySetCpleOri()); std::string aKeyCple2I = mNM->KeyAssocCpleOri(); diff --git a/src/uti_phgrm/NewOri/cNewO_OptimTriplet.cpp b/src/uti_phgrm/NewOri/cNewO_OptimTriplet.cpp index 8f44cdbc06..b09c692c92 100644 --- a/src/uti_phgrm/NewOri/cNewO_OptimTriplet.cpp +++ b/src/uti_phgrm/NewOri/cNewO_OptimTriplet.cpp @@ -155,7 +155,7 @@ class cPairOfTriplet }; -class cAppliOptimTriplet +class cAppliOptimTriplet : public cCommonMartiniAppli { public : cAppliOptimTriplet(int argc,char ** argv,bool QuitExit); @@ -180,7 +180,7 @@ class cAppliOptimTriplet void TestTomasiKanade(); cAppliOptimTriplet(const cAppliOptimTriplet&); // N.I. - std::string mNameOriCalib; + // std::string mNameOriCalib; std::string mDir; cNewO_NameManager * mNM; std::vector mIms; @@ -204,9 +204,6 @@ class cAppliOptimTriplet int mNbMaxInit; bool mAotShow; bool mCalledBySerie; - bool mQuick; - std::string mPrefHom; - std::string mExtName; double mPds3; double mBestResidu; std::string mN1,mN2,mN3; @@ -216,11 +213,9 @@ class cAppliOptimTriplet cNewO_OneIm * mNoIm2; bool mBugTK; - std::string mNameModeNO; eTypeModeNO mModeNO; bool mModeTTK; bool mWithTTK; - std::string mInOri; bool mInOriOk; }; @@ -556,15 +551,11 @@ cAppliOptimTriplet::cAppliOptimTriplet(int argc,char ** argv,bool QuitExist) : // mNbMaxSel (StdDefNbMaxSel), mAotShow (false), mCalledBySerie (false), - mQuick (false), - mPrefHom (""), - mExtName (""), mQuitExist (QuitExist), m3S ("a","b","c"), mNoIm1 (0), mNoIm2 (0), mBugTK (false), - mNameModeNO (TheStdModeNewOri), mModeTTK (false), mWithTTK (true) { @@ -574,18 +565,14 @@ cAppliOptimTriplet::cAppliOptimTriplet(int argc,char ** argv,bool QuitExist) : LArgMain() << EAMC(mN1,"Image one", eSAM_IsExistFile) << EAMC(mN2,"Image two", eSAM_IsExistFile) << EAMC(mN3,"Image three", eSAM_IsExistFile), - LArgMain() << EAM(mNameOriCalib,"OriCalib",true,"Orientation for calibration ", eSAM_IsExistDirOri) + LArgMain() << EAM(mDir,"Dir",true,"Directory, Def=./ ",eSAM_IsDir) << EAM(mSzShow,"SzShow",true,"Sz of window to show the result in window (Def=none)") << EAM(mNbMaxSel,"NbPts",true,"Nb of selected points") << EAM(mAotShow,"Show",true,"Show Message") << EAM(mCalledBySerie,"CalledBySerie",true,"Called by non paral") - << EAM(mQuick,"Quick",true,"Quick version") - << EAM(mPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(mExtName,"ExtName",true,"User's added Prefix, def=\"\"") << EAM(mBugTK,"BugTK",true,"Debug Tomasi Kanade") - << EAM(mNameModeNO,"ModeNO",true,"Mode New Orient (Def=Std)") - << EAM(mInOri,"InOri",true,"Existing orientation (if any)") + << ArgCMA() ); mModeNO = ToTypeNO(mNameModeNO); @@ -611,6 +598,8 @@ cAppliOptimTriplet::cAppliOptimTriplet(int argc,char ** argv,bool QuitExist) : std::string aNameMin = (mN1mN2) ? mN1 : mN2; + + mNM = new cNewO_NameManager(mExtName,mPrefHom,mQuick,mDir,mNameOriCalib,"dat"); mNoIm1 = new cNewO_OneIm(*mNM,aNameMin); mNoIm2 = new cNewO_OneIm(*mNM,aNameMax); @@ -926,31 +915,23 @@ int CPP_OptimTriplet_main(int argc,char ** argv) int CPP_AllOptimTriplet_main(int argc,char ** argv) { ElTimer aChrono; - std::string aFullPat,aNameCalib; + std::string aFullPat; bool inParal=true; - bool Quick = false; - std::string aPrefHom=""; - std::string aExtName=""; bool Debug = false; - std::string aNameModeNO = TheStdModeNewOri; - std::string aInOri; bool aShow = false; int aNb0=0; + cCommonMartiniAppli aCMA; ElInitArgMain ( argc,argv, LArgMain() << EAMC(aFullPat,"Pattern"), - LArgMain() << EAM(aNameCalib,"OriCalib",true,"Orientation for calibration ", eSAM_IsExistDirOri) + LArgMain() << EAM(inParal,"Paral",true,"Execute in parallel ", eSAM_IsBool) - << EAM(Quick,"Quick",true,"Quick version", eSAM_IsBool) - << EAM(aPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(aExtName,"ExtName",true,"User's added Prefix, def=\"\"") << EAM(Debug,"Debug",true,"Debugging mode (tuning purpose)", eSAM_IsBool) - << EAM(aNameModeNO,"ModeNO",true,"Mode (Def=Std)") - << EAM(aInOri,"InOri",true,"Existing orientation if any") << EAM(aShow,"Show",true,"Print command of each triplet") << EAM(aNb0,"Nb0",true,"Num first pair to execute, tuning, Def=0") + << aCMA.ArgCMA() ); cElemAppliSetFile anEASF(aFullPat); @@ -960,7 +941,9 @@ int CPP_AllOptimTriplet_main(int argc,char ** argv) std::set aSetName(aVIm->begin(),aVIm->end()); std::string aDir = anEASF.mDir; - cNewO_NameManager * aNM = new cNewO_NameManager(aExtName,aPrefHom,Quick,aDir,aNameCalib,"dat"); + + cNewO_NameManager * aNM = new cNewO_NameManager(aCMA.mExtName,aCMA.mPrefHom,aCMA.mQuick,aDir,aCMA.mNameOriCalib,"dat"); + cSauvegardeNamedRel aLCpl = StdGetFromPCP(aNM->NameCpleOfTopoTriplet(true),SauvegardeNamedRel); std::list aLCom; @@ -977,14 +960,17 @@ int CPP_AllOptimTriplet_main(int argc,char ** argv) + " " + aN1 + " " + aN2 + " " + cAppliOptimTriplet::KeyCple; + aCom += aCMA.ComParam(); +/* if (EAMIsInit(&aNameCalib)) aCom += " OriCalib=" + aNameCalib; aCom += " Quick=" + ToString(Quick); - aCom += " PrefHom=" + aPrefHom; + aCom += " SH=" + aPrefHom; aCom += " ExtName=" + aExtName; aCom += " ModeNO=" + aNameModeNO; aCom += " InOri=" + aInOri; +*/ if (aShow) { diff --git a/src/uti_phgrm/NewOri/cNewO_PointsTriples.cpp b/src/uti_phgrm/NewOri/cNewO_PointsTriples.cpp index dabd850028..a6ec874278 100644 --- a/src/uti_phgrm/NewOri/cNewO_PointsTriples.cpp +++ b/src/uti_phgrm/NewOri/cNewO_PointsTriples.cpp @@ -223,7 +223,7 @@ void cNewO_NameManager::WriteCouple /*******************************************************************/ -class cAppli_GenPTripleOneImage +class cAppli_GenPTripleOneImage : public cCommonMartiniAppli { public : cAppli_GenPTripleOneImage(int argc,char ** argv); @@ -242,20 +242,14 @@ class cAppli_GenPTripleOneImage std::string mDir3P; std::string mDirSom; std::string mName; - std::string mOriCalib; std::vector mVCams; cNewO_OneIm* mCam; int mSeuilNbArc; // std::map std::vector > mVP1; std::vector > mVP2; - bool mQuick; - std::string mPrefHom; - std::string mExtName; bool mSkWhenExist; - std::string mNameModeNO; eTypeModeNO mModeNO; - std::string mInOri; }; class cCmpPtrIOnName @@ -268,25 +262,16 @@ static cCmpPtrIOnName TheCmpPtrIOnName; cAppli_GenPTripleOneImage::cAppli_GenPTripleOneImage(int argc,char ** argv) : mSeuilNbArc (1), // Change car : existe des cas a forte assymetrie + 2 genere des plantage lorsque + de triplets que de couples - mQuick (false), - mPrefHom (""), - mExtName (""), - mSkWhenExist (true), - mNameModeNO (TheStdModeNewOri), - mInOri ("") + mSkWhenExist (true) { ElInitArgMain ( argc,argv, LArgMain() << EAMC(mFullName,"Name of Image", eSAM_IsExistFile), - LArgMain() << EAM(mOriCalib,"OriCalib",true,"Calibration directory", eSAM_IsExistDirOri) - << EAM(mQuick,"Quick",true,"Quick version", eSAM_IsBool) + LArgMain() << EAM(mSkWhenExist,"SWE",true,"Skip when file alreay exist (Def=true, tuning purpose)", eSAM_IsBool) - << EAM(mPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(mExtName,"ExtName",true,"User's added Prefix, def=\"\"") - << EAM(mNameModeNO,"ModeNO",true,"Mode (Def=Std)") - << EAM(mInOri,"InOri",true,"Existing orientation if any") + << ArgCMA() ); mModeNO = ToTypeNO(mNameModeNO); @@ -294,7 +279,7 @@ cAppli_GenPTripleOneImage::cAppli_GenPTripleOneImage(int argc,char ** argv) : if (MMVisualMode) return; SplitDirAndFile(mDir,mName,mFullName); - mNM = new cNewO_NameManager(mExtName,mPrefHom,mQuick,mDir,mOriCalib,"dat"); + mNM = new cNewO_NameManager(mExtName,mPrefHom,mQuick,mDir,mNameOriCalib,"dat"); mDir3P = mNM->Dir3P(false); ELISE_ASSERT(ELISE_fp::IsDirectory(mDir3P),"Dir point triple"); @@ -569,33 +554,25 @@ int PreGenerateDuTriplet(int argc,char ** argv,const std::string & aComIm) { MMD_InitArgcArgv(argc,argv); - std::string aFullName,anOriCalib; - bool aQuick; + std::string aFullName; bool aSkWhenExist; - std::string aPrefHom=""; - std::string aExtName=""; - std::string aNameModeNO = TheStdModeNewOri; - std::string aInOri = ""; + cCommonMartiniAppli aCMA; ElInitArgMain ( argc,argv, LArgMain() << EAMC(aFullName,"Name of Image"), - LArgMain() << EAM(anOriCalib,"OriCalib",true,"Calibration directory ") - << EAM(aQuick,"Quick",true,"Quick version") + LArgMain() << EAM(aSkWhenExist,"SWE",true,"Skip when file alreay exist (Def=true, tuning purpose)", eSAM_IsBool) - << EAM(aPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(aExtName,"ExtName",true,"User's added Prefix, def=\"\"") - << EAM(aNameModeNO,"ModeNO",true,"Mode (Def=Std)") - << EAM(aInOri,"InOri",true,"Existing orientation if any") + << aCMA.ArgCMA() ); cElemAppliSetFile anEASF(aFullName); - if (!EAMIsInit(&anOriCalib)) + if (!EAMIsInit(&aCMA.mNameOriCalib)) { MakeXmlXifInfo(aFullName,anEASF.mICNM); } - cNewO_NameManager aNM(aExtName,aPrefHom,aQuick,anEASF.mDir,anOriCalib,"dat"); + cNewO_NameManager aNM(aCMA.mExtName,aCMA.mPrefHom,aCMA.mQuick,anEASF.mDir,aCMA.mNameOriCalib,"dat"); aNM.Dir3P(true); const cInterfChantierNameManipulateur::tSet * aSetIm = anEASF.SetIm(); @@ -606,15 +583,9 @@ int PreGenerateDuTriplet(int argc,char ** argv,const std::string & aComIm) { std::string aCom = MM3dBinFile_quotes( "TestLib ") + aComIm + " " + anEASF.mDir+(*aSetIm)[aKIm] ; - if (EAMIsInit(&anOriCalib)) aCom = aCom + " OriCalib=" + anOriCalib; - aCom += " Quick=" +ToString(aQuick); aCom += " SWE=" +ToString(aSkWhenExist); - aCom += " PrefHom=" +aPrefHom; - aCom += " ExtName=" +aExtName; - aCom += " ModeNO=" +aNameModeNO; - aCom += " InOri=" +aInOri; + aCom += aCMA.ComParam(); - // std::cout << "COM= " << aCom << "\n"; anEPbP.AddCom(aCom); } } diff --git a/src/uti_phgrm/NewOri/cNewO_SolGlobInit.cpp b/src/uti_phgrm/NewOri/cNewO_SolGlobInit.cpp index 5c1ebc9c74..48086fcb75 100644 --- a/src/uti_phgrm/NewOri/cNewO_SolGlobInit.cpp +++ b/src/uti_phgrm/NewOri/cNewO_SolGlobInit.cpp @@ -819,9 +819,6 @@ void cAppli_NewSolGolInit::InitRotOfArc(tArcNSI * anArc,bool Test) static cNO_CmpSomByGainBy3 TheCmp3; cAppli_NewSolGolInit::cAppli_NewSolGolInit(int argc, char ** argv) : - mQuick (true), - mPrefHom (""), - mExtName (""), mTest (true), mSimul (false), mWithOriTest(false), @@ -841,9 +838,7 @@ cAppli_NewSolGolInit::cAppli_NewSolGolInit(int argc, char ** argv) : mHeapSom (TheCmp3), mLastPdsMedRemoy (0.0), mActiveRemoy (true), - mNbIterLast (20), - mModeNO (TheStdModeNewOri), - mInOri ("") + mNbIterLast (20) { std::string aNameT1; std::string aNameT2; @@ -856,10 +851,7 @@ cAppli_NewSolGolInit::cAppli_NewSolGolInit(int argc, char ** argv) : ( argc,argv, LArgMain() << EAMC(mFullPat,"Pattern"), - LArgMain() << EAM(mOriCalib,"OriCalib",true,"Orientation for calibration ", eSAM_IsExistDirOri) - << EAM(mQuick,"Quick",true,"Quick version",eSAM_IsBool) - << EAM(mPrefHom,"PrefHom",true,"Prefix Homologous points, def=\"\"") - << EAM(mExtName,"ExtName",true,"User's added Prefix, def=\"\"") + LArgMain() << EAM(mTest,"Test",true,"Test for tuning",eSAM_IsBool) << EAM(aNameT1,"Test1",true,"Name of first test image",eSAM_IsBool) << EAM(aNameT2,"Test2",true,"Name of second test image",eSAM_IsBool) @@ -871,8 +863,7 @@ cAppli_NewSolGolInit::cAppli_NewSolGolInit(int argc, char ** argv) : << EAM(mIterLocEstimRot,"ILER",true,"Iter Estim Loc, Def=true, tuning purpose",eSAM_IsBool) << EAM(mActiveRemoy,"AR",true,"Active Remoy, Def=true, tuning purpose",eSAM_IsBool) << EAM(mNbIterLast,"NbIterLast",true,"Nb Iter in last step",eSAM_IsBool) - << EAM(mModeNO,"ModeNO",true,"Mode (Def=Std)") - << EAM(mInOri,"InOri",true,"Existing orientation if any") + << ArgCMA() ); cTplTriplet aKTest1(aNameT1,aNameT2,aNameT3); @@ -881,7 +872,7 @@ cAppli_NewSolGolInit::cAppli_NewSolGolInit(int argc, char ** argv) : mHasInOri = (EAMIsInit(&mInOri) && (mInOri!="")); mEASF.Init(mFullPat); - mNM = new cNewO_NameManager(mExtName,mPrefHom,mQuick,mEASF.mDir,mOriCalib,"dat"); + mNM = new cNewO_NameManager(mExtName,mPrefHom,mQuick,mEASF.mDir,mNameOriCalib,"dat"); const cInterfChantierNameManipulateur::tSet * aVIm = mEASF.SetIm(); if (EAMIsInit(&mOriTest)) diff --git a/src/uti_phgrm/TiepTri/CorrelTiepTri.cpp b/src/uti_phgrm/TiepTri/CorrelTiepTri.cpp index c44cb45e7a..2b0b20bf59 100644 --- a/src/uti_phgrm/TiepTri/CorrelTiepTri.cpp +++ b/src/uti_phgrm/TiepTri/CorrelTiepTri.cpp @@ -346,11 +346,12 @@ cResulRechCorrel TT_RechMaxCorrelMultiScaleBilin const Pt2dr & aP1, const tTImTiepTri & aIm2, const Pt2dr & aP2, - const int aSzW + const int aSzW, + double aStepFinal ) { - cTT_MaxLocCorrelBasique anOpt(eTMCBilinStep1,aIm1,aP1,aIm2,aP2,aSzW,1,0.01); + cTT_MaxLocCorrelBasique anOpt(eTMCBilinStep1,aIm1,aP1,aIm2,aP2,aSzW,1,aStepFinal); anOpt.optim(); return cResulRechCorrel(aP2+anOpt.param(),anOpt.m2Sol.ScoreFinal()); diff --git a/src/uti_phgrm/TiepTri/FiltrageSpatialTiePTri.cpp b/src/uti_phgrm/TiepTri/FiltrageSpatialTiePTri.cpp index 756d63f2cc..2fb5b89033 100644 --- a/src/uti_phgrm/TiepTri/FiltrageSpatialTiePTri.cpp +++ b/src/uti_phgrm/TiepTri/FiltrageSpatialTiePTri.cpp @@ -60,14 +60,16 @@ class cTpP_HeapCompare bool operator () (cResulMultiImRechCorrel * & aR1,cResulMultiImRechCorrel * & aR2) { - return aR1->Score() > aR2->Score(); + return aR1->Score() > aR2->Score(); // compare score correl global } + // est ce que objet 1 est meuilleur que 2 }; class cFuncPtOfRMICPtr -{ +{ // argument du qauad tri + // comment à partir un objet, je recuper sa pt2D public : - Pt2dr operator () (cResulMultiImRechCorrel * aRMIRC) {return Pt2dr(aRMIRC->PMaster().mPt);} + Pt2dr operator () (cResulMultiImRechCorrel * aRMIRC) {return Pt2dr(aRMIRC->PtMast());} }; @@ -94,25 +96,64 @@ std::vector cAppliTieTri::FiltrageSpatial double aGainCorrel ) { + double aSign= 1; +if (0) // (MPD__MM()) +{ + static bool First= true; + aSign = -1; + if (First) + { + std::cout << "cAppliTieTri::FiltrageSpatia SIGNNNNN\n"; + getchar(); + First= false; + } +} + + std::vector aResult; - static tQtTiepT * aQdt = 0; + static tQtTiepT * aQdt = 0; // le quad-tri static cFuncPtOfRMICPtr aFctr; if (aQdt==0) { - Pt2dr aSz= Pt2dr(mMasIm->Tif().sz()); + Pt2dr aSz= Pt2dr(mMasIm->Tif().sz()); // taille d'espace à recuperer les objets = taille d'image Pt2dr aRab(10,10); aQdt = new tQtTiepT(aFctr,Box2dr(-aRab,aSz+aRab),10,20.0); - } + /* + * Creer un nouveau Quad-tri. + * - Structure de Quad-Tri: + * + on peut prendre un ensemble de objet dans 1 espace dans 1 region defini rapidement. + * + La region peut defini comme un cercle autour 1 point rayon donne, 1 region autour 1 segment, 1 box... + * + Ici, notre espace est 1 image, objet est cResulMultiImRechCorrel* (result correl de chaque point), et le region avec l'objet defini dans l'espace par Pt2dr (coordonne de point) + * Defini un quad tri par typedef ElQT tQtTiepT; + * Ca veut dire il accept les objets type cResulMultiImRechCorrel *, + * recherche par Pt2dr, avec le method de recuperer Pt2dr à partir de cResulMultiImRechCorrel * est definie dans cFuncPtOfRMICPtr + * Creer un nouveau tQtTiepT : + * .) foncteur = cFuncPtOfRMICPtr aFctr => method de recuperer Pt2dr à partir de pointer cResulMultiImRechCorrel * + * .) Box2dr(-aRab,aSz+aRab) => une region = taille d'image + rab 10 pxl (pour rassurer?), qui contient tout mes objet + * .) NbObjMax = 10 => une seuile de bas pour commencer à decouper l'espace objet (en 4) + * .) SzMin = 20.0 => ? + + */ + } cTpP_HeapCompare aCmp; ElHeap aHeap(aCmp); + /* == Definir un structure donne type Heap == + * ElHeap aHeap(aCmp); + * .) Type objet cResulMultiImRechCorrel * + * .) cTpP_HeapCompare => comment heap evaluer objet + * .) cTpP_HeapParam => access au heap index dans l'objet + */ for (int aK=0; aK CalculScoreAgreg(EpsilAggr,PowAggreg); // Epsilon, power - aHeap.push(aVIn[aK]); - aQdt->insert(aVIn[aK]); + // calcul score global de correlation sur tout les coup image + // 1 pt Mas correl sur plsr pt 2nd + // => calcul 1 score glob, mis a jour le score glob dans cResulMultiImRechCorrel aussi + aVIn[aK]->CalculScoreAgreg(EpsilAggr,PowAggreg,aSign); // Epsilon, power + aHeap.push(aVIn[aK]); // mets l'objet dans heap + aQdt->insert(aVIn[aK]); // mets l'objet dans le Quad-Tri } cResulMultiImRechCorrel * aRM_1; @@ -121,53 +162,80 @@ std::vector cAppliTieTri::FiltrageSpatial Video_Win * aW = mMasIm->W(); while (aHeap.pop(aRM_1)) { + // pop à partir un heap => recuper la "meuilleur" point et l'enleve dans heap + // aRM_1 contient le point avec Score() meuilleur if (aW) { aW->draw_circle_loc(aFctr(aRM_1),aSeuilDist,aW->pdisc()(P8COL::cyan)); + // dessine un cercle sur Img Master, au pt master, rayon TT_DefSeuilDensiteResul = 50 } aResult.push_back(aRM_1); const std::vector & aVI_1 = aRM_1->VIndex(); int aNbI_1 = aVI_1.size(); const std::vector & aVC_1 = aRM_1->VRRC() ; - + /* + * aVI_1 = vector contient index de tout les pt correl dans aRM_1 + * aVC_1 = vector contient tout les pt correl (mPt, mScore) + */ // Mets a jour le score fonction du numero + cout<HeapIndexe()<<" "<PtMast()<<" Scr: "<Score()<<" Nb2nd : "< aSet; + // recuper tout les pts dans aSeuilDist (TT_DefSeuilDensiteResul = 50pxl) distance (region à filtrer) aQdt->RVoisins(aSet,aFctr(aRM_1),aSeuilDist); + cout<<" + QT NbVsin: "<::iterator itS=aSet.begin(); itS!=aSet.end() ; itS++) - { + { //== parcourir tout les point dans region à filtrer == cResulMultiImRechCorrel * aRM_2 = *itS; if (aRM_1==aRM_2) { aQdt->remove(aRM_2); + // enleve le point dans le Quad-Tri (on a pop out de heap, mais il exist encore dans le Quad-Tri) } else { const std::vector & aVI_2 = aRM_2->VIndex(); int aNbI_2 = aVI_2.size(); const std::vector & aVC_2 = aRM_2->VRRC() ; - - double aDist = euclid(aFctr(aRM_1)-aFctr(aRM_2)); + /* + * aVI_2 = vector contient index de tout les pt correl dans aRM_2 + * aVC_2 = vector contient tout les pt correl (mPt, mScore) + */ + cout<<" *) aRM_2 PtMas "" "<PtMast()<<" Scr: "<Score()<<" Nb2nd : "<NbSel(); for (int aK=0 ; aKSetSelec(aK,false); + aRM_2->SetSelec(aK,false); // déseletioner un pt } } int aNbSelEnd = aRM_2->NbSel(); if (aNbS0!=aNbSelEnd) { - aRM_2->CalculScoreAgreg(EpsilAggr,PowAggreg); // Epsilon, power + // ==== Si rentrer ici, ca veut dire aRM_2 est modifie ==== + aRM_2->CalculScoreAgreg(EpsilAggr,PowAggreg,aSign); // Epsilon, power + cout<<" *) aRM_2 Re Cal Score "<Score()<remove(aRM_2); @@ -177,6 +245,7 @@ std::vector cAppliTieTri::FiltrageSpatial else { aHeap.MAJ(aRM_2); + // mis à jour pour ne pas cassé la structure de heap } // if (aRM_2->NbSel() } diff --git a/src/uti_phgrm/TiepTri/TiepTri.cpp b/src/uti_phgrm/TiepTri/TiepTri.cpp index cd559ba8fd..573fab8029 100644 --- a/src/uti_phgrm/TiepTri/TiepTri.cpp +++ b/src/uti_phgrm/TiepTri/TiepTri.cpp @@ -55,7 +55,9 @@ cParamAppliTieTri::cParamAppliTieTri(): mFilFAST (true), mTT_SEUIL_SURF_TRI (TT_SEUIL_SURF_TRI_PIXEL), mTT_SEUIL_CORREL_1PIXSUR2 (TT_SEUIL_CORREL_1PIXSUR2), - mEtapeInteract (-1) + mEtapeInteract (-1), + mLastEtape (2), + mFlagFS ((1<<16) - 1) { } @@ -92,18 +94,20 @@ int TiepTri_Main(int argc,char ** argv) << EAM(UseABCorrel, "UseABCorrel",true,"Tuning use correl in mode A*v1+B=v2 ") << EAM(aParam.mEtapeInteract,"StepInt",true,"Step of Intection (apply when SzW is init)") + << EAM(aParam.mLastEtape, "LastStep",true,"Last step (tuning essentially)") << EAM(aParam.mNoTif, "NoTif",true,"Not an image TIF - read img in Tmp-MM-Dir") << EAM(aParam.mFilSpatial, "FilSpatial",true,"Use filter spatial ? (def = true)") << EAM(aParam.mFilFAST, "FilFAST",true,"Use FAST condition ? (def = true)") << EAM(aParam.mFilAC, "FilAC",true,"Use Autocorrelation condition ? (def = true)") << EAM(aParam.mTT_SEUIL_SURF_TRI, "surfTri",true,"Surface min to eliminate too small triangle (def = 100 unit)") << EAM(aParam.mTT_SEUIL_CORREL_1PIXSUR2, "correlBrut",true,"Threshold of correlation score 1pxl/2 (def = 0.7)") + << EAM(aParam.mFlagFS, "FFS",true,"Flag spatial filtering (tuning)") ); bool WithInteract = EAMIsInit(& aSzW); if (WithInteract && (!EAMIsInit(&aParam.mEtapeInteract))) - aParam.mEtapeInteract = 0; + aParam.mEtapeInteract = 1; if (! EAMIsInit(&aParam.mDoRaffImInit)) { diff --git a/src/uti_phgrm/TiepTri/TiepTri.h b/src/uti_phgrm/TiepTri/TiepTri.h index 31c23ed5cb..69d98ec62d 100644 --- a/src/uti_phgrm/TiepTri/TiepTri.h +++ b/src/uti_phgrm/TiepTri/TiepTri.h @@ -77,6 +77,8 @@ class cLinkImTT; #define TT_RatioFastFiltrSpatial 8 // Ratio par rapport a TT_DefSeuilDensiteResul, pour point I Fast #define TT_RatioCorrEntFiltrSpatial 4 // Ratio par rapport a TT_DefSeuilDensiteResul, pour point apres Corr Ent +#define TT_RatioCorrSupPix 2 // Ratio par rapport a TT_DefSeuilDensiteResul, pour point apres Corr Ent +#define TT_RatioCorrLSQ 1 // Ratio par rapport a TT_DefSeuilDensiteResul, pour point apres Corr Ent //(TT_DefSeuilDensiteResul/TT_RatioFastFiltrSpatial).^2 = rayon de filtrage spatial du point d'interet. // Cet seuil est appliquer pour filtrer les point d'interet juste apres la detection de point d'interet // Appliquer sur image maitraisse seulement @@ -147,6 +149,8 @@ class cParamAppliTieTri double mTT_SEUIL_SURF_TRI; double mTT_SEUIL_CORREL_1PIXSUR2; int mEtapeInteract; + int mLastEtape; // Inclusif !! + int mFlagFS; // FlagFitrage Spatial }; @@ -204,7 +208,7 @@ class cAppliTieTri : public cParamAppliTieTri const Pt2dr & PtsSelectTri() const; bool NumImageIsSelect(const int aNum) const; - void PutInGlobCoord(cResulMultiImRechCorrel & aRMIRC); + void PutInGlobCoord(cResulMultiImRechCorrel & aRMIRC,bool WithDecal,bool WithRedr); const std::string & KeyMasqIm() const; void SetMasqIm(const std::string & aKeyMasqIm); @@ -241,7 +245,8 @@ class cAppliTieTri : public cParamAppliTieTri tInterpolTiepTri * mInterpolBilin; std::vector mVCurMIRMC; - std::vector mVGlobMIRMC; + std::vector mGlobMRIRC; + // std::vector mVGlobMIRMC; int mNbTriLoaded; int mNbPts; @@ -375,6 +380,7 @@ class cImMasterTieTri : public cImTieTri bool LoadTri(const cXml_Triangle3DForTieP & ); cIntTieTriInterest GetPtsInteret(); + cResulMultiImRechCorrel * GetRMIRC(const std::vector & aVR); virtual bool IsMaster() const ; virtual tTImTiepTri & ImRedr(); const std::list & LIP() const; @@ -393,11 +399,15 @@ class cImSecTieTri : public cImTieTri bool LoadTri(const cXml_Triangle3DForTieP & ); cResulRechCorrel RechHomPtsInteretEntier(bool Interact,const cIntTieTriInterest & aP); - cResulRechCorrel RechHomPtsInteretBilin(bool Interact,const Pt2dr & aP0,const cResulRechCorrel & aCRC0); + cResulRechCorrel RechHomPtsInteretBilin(bool Interact,const cResulMultiImRechCorrel &aRMIC,int aKIm); + cResulRechCorrel RechHomPtsDense(bool Interact,const cResulMultiImRechCorrel &aRMIC,int aKIm); + + cResulRechCorrel RechHomPtsGen(bool Interact,int aNumEtape,const cResulMultiImRechCorrel &aRMIC,int aKIm); + + // cResulRechCorrel RechHomPtsInteretBilin(bool Interact,const Pt2dr & aP0,const cResulRechCorrel & aCRC0); // Enchaine RechHomPtsInteretEntier puis RechHomPtsInteretBilin - cResulRechCorrel RechHomPtsInteretEntierAndRefine(bool Interact,const cIntTieTriInterest & aP); + // cResulRechCorrel RechHomPtsInteretEntierAndRefine(bool Interact,const cIntTieTriInterest & aP); - cResulRechCorrel RechHomPtsDense(bool Interact,const Pt2di & aP0,const cResulRechCorrel & aPIn); virtual bool IsMaster() const ; virtual tTImTiepTri & ImRedr(); @@ -499,11 +509,12 @@ class cResulMultiImRechCorrel double Score() const ; const std::vector & VRRC() const ; std::vector & VRRC() ; - const cIntTieTriInterest & PMaster() const ; - cIntTieTriInterest & PMaster() ; + const cIntTieTriInterest & PIMaster() const ; + cIntTieTriInterest & PIMaster() ; + Pt2di PtMast() const ; const std::vector & VIndex() const ; void CalculScoreMin(); - void CalculScoreAgreg(double Epsilon,double pow); + void CalculScoreAgreg(double Epsilon,double pow,double aSign); int & HeapIndexe () ; const int & HeapIndexe () const ; @@ -529,6 +540,7 @@ class cResulMultiImRechCorrel int mNbSel; }; +/* class cOneTriMultiImRechCorrel { public : @@ -538,14 +550,15 @@ class cOneTriMultiImRechCorrel { } const std::vector& VMultiC() const {return mVMultiC;} - const int & KT() const {return mKT;} private : // cOneTriMultiImRechCorrel(const cOneTriMultiImRechCorrel &); // N.I. + const int & KT() const {return mKT;} int mKT; std::vector mVMultiC; }; +*/ @@ -597,7 +610,8 @@ cResulRechCorrel TT_RechMaxCorrelMultiScaleBilin const Pt2dr & aP1, const tTImTiepTri & aIm2, const Pt2dr & aP2, - const int aSzW + const int aSzW, + double aStepFinal ); cResulRechCorrel TT_MaxLocCorrelDS1R diff --git a/src/uti_phgrm/TiepTri/cAppliTieTri.cpp b/src/uti_phgrm/TiepTri/cAppliTieTri.cpp index 14db902e79..aac57ba193 100644 --- a/src/uti_phgrm/TiepTri/cAppliTieTri.cpp +++ b/src/uti_phgrm/TiepTri/cAppliTieTri.cpp @@ -117,6 +117,32 @@ cAppliTieTri::cAppliTieTri } +void StatCorrel(const std::vector & aVec, const std::string & aMes) +{ + //============= Statistic sur un vector result de correlation ============= + double aSomC = 0; + int aNbC = 0; + std::vector aVCor; + + for (int aKR = 0 ; aKR & aVRRC = aRMIRC->VRRC() ; + for (int aKIndIm=0 ; aKIndIm * aVIm = new vector(); cout<<" ++ ImMaster :"<NameIm()< > VPtsIms; //====== Parcour les PtsMul et rempli Hom classique + nouvelle structure==========// - - for (int aKT= 0; aKT< int(mVGlobMIRMC.size()) ; aKT++) { - cOneTriMultiImRechCorrel & aTMIRC = mVGlobMIRMC[aKT]; - const std::vector& aVMC = aTMIRC.VMultiC() ; - for (int aKP=0 ; aKP aNumIms; vector aPtsIms; //======================// - cResulMultiImRechCorrel & aRMIRC = *(aVMC[aKP]); - Pt2dr aPMaster (aRMIRC.PMaster().mPt); + cResulMultiImRechCorrel & aRMIRC = *(mGlobMRIRC[aKP]); + Pt2dr aPMaster (aRMIRC.PtMast()); const std::vector & aVInd = aRMIRC.VIndex(); int aNbIm = aVInd.size(); ELISE_ASSERT(aNbIm==int(aRMIRC.VRRC().size()),"Incoh size in cAppliTieTri::DoAllTri"); @@ -235,6 +266,7 @@ void cAppliTieTri::DoAllTri(const cXml_TriAngulationImMaster & aTriang) } +/* void cAppliTieTri::RechHomPtsDense(cResulMultiImRechCorrel & aRMIRC) { std::vector & aVRRC = aRMIRC.VRRC(); @@ -246,23 +278,29 @@ void cAppliTieTri::RechHomPtsDense(cResulMultiImRechCorrel & aRMIRC) int aKIm = aRMIRC.VIndex()[aKNumIm]; // aRRC = mImSecLoaded[aKIm]->RechHomPtsDense(aRMIRC.PMaster().mPt,aRRC); - aRRC = mImSec[aKIm]->RechHomPtsDense(false,aRMIRC.PMaster().mPt,aRRC); + aRRC = mImSec[aKIm]->RechHomPtsDense(false,aRMIRC.PtMast(),aRRC); } } +*/ -void cAppliTieTri::PutInGlobCoord(cResulMultiImRechCorrel & aRMIRC) +void cAppliTieTri::PutInGlobCoord(cResulMultiImRechCorrel & aRMIRC,bool WithDecal,bool WithRedr) { - aRMIRC.PMaster().mPt = aRMIRC.PMaster().mPt + mMasIm->Decal(); + + aRMIRC.PIMaster().mPt = aRMIRC.PtMast() + mMasIm->Decal(); std::vector & aVRRC = aRMIRC.VRRC(); + + for (int aKNumIm=0 ; aKNumImMas2Sec(aRRC.mPt); } - aRRC.mPt = aRRC.mPt + Pt2dr(mImSec[aKIm]->Decal()); + + if (WithDecal) + aRRC.mPt = aRRC.mPt + Pt2dr(mImSec[aKIm]->Decal()); } } @@ -332,32 +370,56 @@ void cAppliTieTri::DoOneTri(const cXml_Triangle3DForTieP & aTri,int aKT ) } mTimeCorInit += aChrono.uval(); } - mVCurMIRMC = FiltrageSpatial(mVCurMIRMC,mDistFiltr/TT_RatioCorrEntFiltrSpatial,0.1); + if (mFlagFS & 1) + mVCurMIRMC = FiltrageSpatial(mVCurMIRMC,mDistFiltr/TT_RatioCorrEntFiltrSpatial,0.1); // ================ Calcul des correlations sous pixellaire ====================== { - for (int aKp=0 ; aKpGetRMIRC(mVCurMIRMC) : mVCurMIRMC[aKp]; + //cResulMultiImRechCorrel * aRMIRC = mVCurMIRMC[aKp]; + + const std::vector & aVI = aRMIRC->VIndex() ; + std::vector & aVRRC = aRMIRC->VRRC() ; + for (int aKIndIm=0 ; aKIndImRechHomPtsDense(ModeInteractif,*aRMIRC,aKIndIm); + PutInGlobCoord(*aRMIRC,false,true); - - { - ElTimer aChrono; - for (int aKR = 0 ; aKR1/32 + std::cout << "DEBuuuuu " << aRRC1.mPt << " " << aVRRC[aKIndIm].mPt << "\n"; +} +*/ + cResulRechCorrel aRRC = + (aKEtape==1) ? + mImSec[aKIm]->RechHomPtsInteretBilin(ModeInteractif,*aRMIRC,aKIndIm) : + mImSec[aKIm]->RechHomPtsDense(ModeInteractif,*aRMIRC,aKIndIm) ; + if (! ModeInteractif) + aVRRC[aKIndIm] = aRRC; + } + if (! ModeInteractif) aKp++; + } + + // 1=> en geometrie redressee, 2 en geometrie initiale + + cResulMultiImRechCorrel::SuprUnSelect(mVCurMIRMC); + double aRatio = (aKEtape==1) ? TT_RatioCorrSupPix : TT_RatioCorrLSQ; + if (mFlagFS & (1<W()) { @@ -366,13 +428,16 @@ void cAppliTieTri::DoOneTri(const cXml_Triangle3DForTieP & aTri,int aKT ) for (int aKp=0 ; aKpbegin(),mSetIm->end(),back_inserter(aLN)); + std::copy(mVCurMIRMC.begin(),mVCurMIRMC.end(),std::back_inserter(mGlobMRIRC)); mVCurMIRMC.clear(); } @@ -386,41 +451,6 @@ class cCmpPtrRMIRC }; -void cAppliTieTri::FiltrageSpatialRMIRC(const double & aDist) -{ - double aSqDist = aDist *aDist; - cCmpPtrRMIRC aCmp; - std::sort(mVCurMIRMC.begin(),mVCurMIRMC.end(),aCmp); - std::vector aNewV; - - for (int aKR1=0 ;aKR1square_dist(*aR2) < aSqDist)) - { - mVCurMIRMC[aKR2] = 0; - delete aR2; - } - } - - if (mMasIm->W()) - { - // Video_Win * aW = mMasIm->W(); - //aW->draw_circle_loc(Pt2dr(aR1->PMaster().mPt),1,aW->pdisc()(P8COL::green)); //point selected after filtrage spatial - //aW->draw_circle_loc(Pt2dr(aR1->PMaster().mPt),aDist,aW->pdisc()(P8COL::yellow)); //filter spatial circle - } - - } - } - mVCurMIRMC = aNewV; -} void cAppliTieTri::SetSzW(Pt2di aSzW, int aZoom) { diff --git a/src/uti_phgrm/TiepTri/cImMasterTieTri.cpp b/src/uti_phgrm/TiepTri/cImMasterTieTri.cpp index 9bd5d714a3..6267595097 100644 --- a/src/uti_phgrm/TiepTri/cImMasterTieTri.cpp +++ b/src/uti_phgrm/TiepTri/cImMasterTieTri.cpp @@ -84,6 +84,29 @@ bool cImMasterTieTri::LoadTri(const cXml_Triangle3DForTieP & aTri) // Im2D_U_INT1 } +cResulMultiImRechCorrel * cImMasterTieTri::GetRMIRC(const std::vector & aVR) +{ + Clik aClik = mW->clik_in(); + cResulMultiImRechCorrel * aRes = 0; + double aDMin = 1e60; + for (int aK=0 ; aKPtMast()) -aClik._pt); + if (aD < aDMin) + { + aDMin = aD; + aRes = aVk; + } + } + mW->draw_circle_loc(Pt2dr(aRes->PtMast()),2.0,mW->pdisc()(P8COL::cyan)); + return aRes; +} + + + + + /*==== Sert en version interactive , retourne le point d'interet preseclectionne le plus pret d'un clique. diff --git a/src/uti_phgrm/TiepTri/cImSecTieTri.cpp b/src/uti_phgrm/TiepTri/cImSecTieTri.cpp index 0c2e4538cc..72fa20e9e5 100644 --- a/src/uti_phgrm/TiepTri/cImSecTieTri.cpp +++ b/src/uti_phgrm/TiepTri/cImSecTieTri.cpp @@ -268,20 +268,25 @@ cResulRechCorrel cImSecTieTri::RechHomPtsInteretEntier(bool Interact,const cIntT return aCRCMax; } -cResulRechCorrel cImSecTieTri::RechHomPtsInteretBilin(bool Interact,const Pt2dr & aP0,const cResulRechCorrel & aCRC0) +cResulRechCorrel cImSecTieTri::RechHomPtsInteretBilin(bool Interact,const cResulMultiImRechCorrel &aRMIC,int aKIm) { + Pt2dr aP0 = Pt2dr(aRMIC.PtMast()); + cResulRechCorrel aCRC0 = aRMIC.VRRC()[aKIm]; + + double aStep = 0.01; if (! aCRC0.IsInit()) return aCRC0; int aSzWE = mAppli.mSzWEnd; - cResulRechCorrel aRes =TT_RechMaxCorrelMultiScaleBilin (mMaster->mTImInit,Pt2dr(aP0),mTImReech,Pt2dr(aCRC0.mPt),aSzWE); // Correlation sub-pixel, interpol bilin basique (step=1, step RCorell=0.1) + // Correlation sub-pixel, interpol bilin basique (step=1, step RCorell=0.1) + cResulRechCorrel aRes =TT_RechMaxCorrelMultiScaleBilin (mMaster->mTImInit,Pt2dr(aP0),mTImReech,Pt2dr(aCRC0.mPt),aSzWE,aStep); //ER variable that is unused; commented-out to acoid warning //double aRecCarre=0; - if ( mAppli.mNumInterpolDense < 0) + if (0) // ( mAppli.mNumInterpolDense < 0) { Pt2dr aP0This = Pt2dr(Pt2di(aRes.mPt)); - cResulRechCorrel aResRecip = TT_RechMaxCorrelMultiScaleBilin(mTImReech,aP0This,mMaster->mTImInit,Pt2dr(aP0),aSzWE); + cResulRechCorrel aResRecip = TT_RechMaxCorrelMultiScaleBilin(mTImReech,aP0This,mMaster->mTImInit,Pt2dr(aP0),aSzWE,aStep); Pt2dr aDec1 = aRes.mPt - Pt2dr(aP0); Pt2dr aDec2 = Pt2dr(aP0This) - aResRecip.mPt ; @@ -327,6 +332,7 @@ cResulRechCorrel cImSecTieTri::RechHomPtsInteretBilin(bool Interact,const Pt2dr return aRes; } +/* cResulRechCorrel cImSecTieTri::RechHomPtsInteretEntierAndRefine(bool Interact,const cIntTieTriInterest & aPI) { cResulRechCorrel aRes = RechHomPtsInteretEntier(Interact,aPI); @@ -338,13 +344,19 @@ cResulRechCorrel cImSecTieTri::RechHomPtsInteretEntierAndRefine(bool Interact,co return aRes; } +*/ // On passe des coordonnees master au coordonnees secondaire -cResulRechCorrel cImSecTieTri::RechHomPtsDense(bool Interact,const Pt2di & aP0,const cResulRechCorrel & aPIn) +cResulRechCorrel cImSecTieTri::RechHomPtsDense(bool Interact,const cResulMultiImRechCorrel &aRMIC,int aKIm) { + + Pt2dr aP0 = Pt2dr(aRMIC.PtMast()); + cResulRechCorrel aPIn = aRMIC.VRRC()[aKIm]; + if ( mAppli.mNumInterpolDense < 0) { + if (Interact) std::cout << "AAAAAAaaaaaaaaaaaaaaaa\n"; cResulRechCorrel aRes2 = aPIn; aRes2.mPt = mAffMas2Sec(aRes2.mPt); return aRes2; diff --git a/src/uti_phgrm/TiepTri/cResulCorrelTieTri.cpp b/src/uti_phgrm/TiepTri/cResulCorrelTieTri.cpp index 10b36d1690..7a9d9c3a30 100644 --- a/src/uti_phgrm/TiepTri/cResulCorrelTieTri.cpp +++ b/src/uti_phgrm/TiepTri/cResulCorrelTieTri.cpp @@ -93,14 +93,21 @@ std::vector & cResulMultiImRechCorrel::VRRC() { return mVRRC; } -const cIntTieTriInterest & cResulMultiImRechCorrel::PMaster() const + +const cIntTieTriInterest & cResulMultiImRechCorrel::PIMaster() const { return mPMaster; } -cIntTieTriInterest & cResulMultiImRechCorrel::PMaster() +cIntTieTriInterest & cResulMultiImRechCorrel::PIMaster() { return mPMaster; } + +Pt2di cResulMultiImRechCorrel::PtMast() const +{ + return PIMaster().mPt; +} + const std::vector & cResulMultiImRechCorrel::VIndex() const { return mVIndex; @@ -109,7 +116,7 @@ const std::vector & cResulMultiImRechCorrel::VIndex() const int & cResulMultiImRechCorrel::HeapIndexe () {return mHeapIndexe;} const int & cResulMultiImRechCorrel::HeapIndexe () const {return mHeapIndexe;} -void cResulMultiImRechCorrel::CalculScoreAgreg(double Epsilon,double anExp) +void cResulMultiImRechCorrel::CalculScoreAgreg(double Epsilon,double anExp,double aSign) { mScore = 0.0; for (int aK=0 ; aK::const_iterator it=v._larg.begin() ; it!=v._larg.end() ; it++) + _larg.push_back((*it)->dup()); + + return *this; +} + + std::list ModifListe(const std::list & aList,const char * aNameType) { if (std::string(aNameType)==std::string("bool")) diff --git a/src/util/error.cpp b/src/util/error.cpp index a7ae4e172f..d64a7860a4 100644 --- a/src/util/error.cpp +++ b/src/util/error.cpp @@ -67,6 +67,7 @@ bool TheExitOnBrkp = false; // bool TheExitOnBrkp = false; bool TheExitOnNan = false; bool TheExitOnWarn = false; +bool TheGoonOnWarn = false; bool TheMajickFile = false; int TheNbIterProcess = 1; @@ -364,6 +365,7 @@ cElWarning cElWarning::OrhoLocOnlyXCste("For now RedrLocAnam only works with X=C cElWarning cElWarning::ToleranceSurPoseLibre("Tolerance inutile avec ePoseLibre"); cElWarning cElWarning::OnzeParamSigneIncoh("Point on two sides of cam after space ressection"); +cElWarning cElWarning::EigenValueInCholeski("Due to numerical instability, detected negative eigen value in leas square"); int cElWarning::mNbTot = 0; diff --git a/src/util/string_dyn.cpp b/src/util/string_dyn.cpp index 754a5993b9..a37133c789 100644 --- a/src/util/string_dyn.cpp +++ b/src/util/string_dyn.cpp @@ -553,11 +553,11 @@ std::string getBanniereMM3D() banniere += "** ** \n"; banniere += "** - Institut National de l'Information Geographique et Forestiere ** \n"; banniere += "** (IGN main funder since 2003) ** \n"; - banniere += "** - the french FUI Project \"Culture 3D Cloud\" ** \n"; - banniere += "** - the french ANR Project \"MONUMENTUM\" ** \n"; + banniere += "** - the french FUI Project \"Culture 3D Cloud\" (and MAP-CNRS) ** \n"; + banniere += "** - the french ANR Project \"MONUMENTUM\"(collaborating with MAP-CNRS)** \n"; banniere += "** ** \n"; banniere += "** Research also currently supported by : ** \n"; - banniere += "** - CNES (French Space Agency) - via TOSCA Committee ** \n"; + banniere += "** - CNES (French Space Agency) - via TOSCA Committee (and IPGP) ** \n"; banniere += "** - Compagnie Nationale du Rhone ** \n"; banniere += "** - Vinci-Construction-Terrassement ** \n"; banniere += "** - ERC Advanced Grant A.Kaeaeb \"ICEMASS\" (University of Oslo) ** \n";