Skip to content

Commit be6d75c

Browse files
committed
2 parents fc45d0b + ec576e9 commit be6d75c

40 files changed

+748
-373
lines changed

Diff for: appveyor.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ before_build:
44
- mkdir build
55
- cd build
66
- cmake .. -DWITH_QT5=OFF -DCMAKE_BUILD_TYPE=Release
7+
8+
build_script:
79
- cmake --build . --target INSTALL --config Release
810
- cd ..
911

Diff for: include/general/arg_main.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,12 @@ class LArgMain
402402

403403
template <class Type> LArgMain & operator << (const ElArgMain<Type> & v)
404404
{
405-
if (v.IsActif())
405+
if (v.IsActif())
406406
_larg.push_back(v.dup());
407407
return * this;
408408
}
409409
~LArgMain();
410+
LArgMain & operator << (const LArgMain & v);
410411

411412
int Size() const;
412413

Diff for: include/general/error.h

+2
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class ElEM // Elise Erreur Message
210210
extern bool TheExitOnBrkp;
211211
extern bool TheExitOnNan;
212212
extern bool TheExitOnWarn;
213+
extern bool TheGoonOnWarn;
213214
extern bool TheMajickFile;
214215
extern int TheNbIterProcess;
215216

@@ -319,6 +320,7 @@ class cElWarning
319320
static cElWarning AppuisMultipleDefined;
320321
static cElWarning OnzeParamSigneIncoh;
321322
static cElWarning ToleranceSurPoseLibre;
323+
static cElWarning EigenValueInCholeski;
322324

323325
static void ShowWarns(const std::string & aFile);
324326
private :

Diff for: include/general/photogram.h

+3
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,7 @@ class cMirePolygonEtal
28282828
bool IsNegatif() const;
28292829
cMirePolygonEtal();
28302830
static const cMirePolygonEtal & IgnMireN6();
2831+
static const cMirePolygonEtal & ENSGMireN6();
28312832
static const cMirePolygonEtal & MtdMire9();
28322833
static const cMirePolygonEtal & IGNMire7();
28332834
static const cMirePolygonEtal & IGNMire5();
@@ -2845,6 +2846,7 @@ class cMirePolygonEtal
28452846
private :
28462847

28472848
static const double TheIgnN6[6];
2849+
static const double TheENSG6[6];
28482850
static const double TheMTD9[6];
28492851
static const double TheIGNDiams7[7];
28502852
static const double TheIGNDiams5[5];
@@ -2855,6 +2857,7 @@ class cMirePolygonEtal
28552857
static const double TheDiamMTClous1[1];
28562858

28572859
static cMirePolygonEtal TheNewIGN6;
2860+
static cMirePolygonEtal TheNewENSG6;
28582861
static cMirePolygonEtal TheMTDMire9;
28592862
static cMirePolygonEtal TheIGNMire7;
28602863
static cMirePolygonEtal TheIGNMire5;

Diff for: src/CBinaires/mm3d.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ int CPP_CmpDenseMap(int argc,char** argv);
220220
int CPP_FermDenseMap(int argc,char** argv);
221221
int ScalePat_main(int argc,char** argv);
222222
int CPP_MakeMapEvolOfT(int argc,char ** argv);
223+
int CPP_PolynOfImage(int argc,char ** argv);
223224

224225

225226
const std::vector<cMMCom> & getAvailableCommands()
@@ -317,6 +318,7 @@ const std::vector<cMMCom> & getAvailableCommands()
317318

318319

319320
aRes.push_back(cMMCom("StackFlatField",EstimFlatField_main,"Basic Flat Field estimation by image stacking"));
321+
aRes.push_back(cMMCom("PolynOfImage",CPP_PolynOfImage,"Approximate image by polynom"));
320322
aRes.push_back(cMMCom("Impaint",Impainting_main,"Basic Impainting"));
321323
aRes.push_back(cMMCom("Gri2Bin",Gri2Bin_main," Do some stuff"));
322324
aRes.push_back(cMMCom("MakeGrid",MakeGrid_main," Generate orientations in a grid format"));

Diff for: src/EtalonnagePolygone/CPP_ConvertPolygone.cpp

+18-1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,22 @@ void GenerePolyTxtRect
263263

264264
int ConvertPolygone_main(int argc,char ** argv)
265265
{
266+
/*
267+
ConvertOnePolygone
268+
(
269+
Pt3dr(0,-1,0),
270+
"/home/mehdi/Test_Pointe_Auto/resultat_cor.txt",
271+
"/home/mehdi/Test_Pointe_Auto/resultat_cor.xml",
272+
"ENSG-New-6Cercles","ENSG-New-6Cercles",
273+
true,
274+
false,
275+
0,
276+
0,
277+
0,
278+
false
279+
);
280+
*/
281+
266282
/*
267283
{
268284
double aProfClou[2] = {4.5,9.0};
@@ -415,7 +431,7 @@ int ConvertPolygone_main(int argc,char ** argv)
415431
true
416432
);
417433
*/
418-
434+
/*
419435
ConvertOnePolygone
420436
(
421437
Pt3dr(0,0,1),
@@ -427,6 +443,7 @@ int ConvertPolygone_main(int argc,char ** argv)
427443
0,0,0,false,
428444
false
429445
);
446+
*/
430447
return 0;
431448

432449
}

Diff for: src/EtalonnagePolygone/lib/all_etal.h

+2
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ class cCibleRechImage
257257
cSetEqFormelles mSetSR5;
258258
cSetEqFormelles mSetMT0;
259259
cSetEqFormelles mSetMN6;
260+
cSetEqFormelles mSetME6;
260261

261262

262263
cSetEqFormelles* pSet;
@@ -270,6 +271,7 @@ class cCibleRechImage
270271
cEqEllipseImage * pEqElImSR5;
271272
cEqEllipseImage * pEqElImMT0;
272273
cEqEllipseImage * pEqElImN6;
274+
cEqEllipseImage * pEqElImE6;
273275
cEqEllipseImage * pEqElIm;
274276

275277
};

Diff for: src/EtalonnagePolygone/lib/cCibleRechImage.cpp

+15-5
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ cCibleRechImage::cCibleRechImage
8585
pWSynth (AllocW()),
8686
pWFFT (AllocW()),
8787
pWGlob (0),
88-
8988
mSetM7 (),
9089
mSetM6 (),
9190
mSetM5 (),
@@ -94,7 +93,7 @@ cCibleRechImage::cCibleRechImage
9493
mSetSR5 (),
9594
mSetMT0 (),
9695
mSetMN6 (),
97-
96+
mSetME6 (),
9897
pSet (0),
9998
mDefLarg (anEtal.Param().DefLarg()),
10099

@@ -107,6 +106,7 @@ cCibleRechImage::cCibleRechImage
107106
pEqElImSR5 (mSetSR5.NewEqElIm(cMirePolygonEtal::SofianeMireR5())),
108107
pEqElImMT0 (mSetMT0.NewEqElIm(cMirePolygonEtal::MT0())),
109108
pEqElImN6 (mSetMN6.NewEqElIm(cMirePolygonEtal::IgnMireN6())),
109+
pEqElImE6 (mSetME6.NewEqElIm(cMirePolygonEtal::ENSGMireN6())),
110110

111111
pEqElIm (0)
112112
{
@@ -125,6 +125,7 @@ cCibleRechImage::cCibleRechImage
125125
mSetSR5.SetClosed();
126126
mSetMT0.SetClosed();
127127
mSetMN6.SetClosed();
128+
mSetME6.SetClosed();
128129
}
129130

130131
void cCibleRechImage::ShowCible(Video_Win *pW,INT aCoul)
@@ -323,10 +324,19 @@ void cCibleRechImage::RechercheImage
323324
{
324325
pSet = & mSetMN6;
325326
pEqElIm = pEqElImN6;
326-
FPtsCorrel = 1.2;
327-
FPtsRaff = 1.1;
327+
FPtsCorrel = 1.2;
328+
FPtsRaff = 1.1;
329+
330+
std::cout << "BL " << pEqElIm->CurBlanc() << " N " << pEqElIm->CurNoir() << "\n";
331+
}
332+
else if (& aMire == & cMirePolygonEtal::ENSGMireN6())
333+
{
334+
pSet = & mSetME6;
335+
pEqElIm = pEqElImE6;
336+
FPtsCorrel = 1.2;
337+
FPtsRaff = 1.1;
328338

329-
std::cout << "BL " << pEqElIm->CurBlanc() << " N " << pEqElIm->CurNoir() << "\n";
339+
std::cout << "BL " << pEqElIm->CurBlanc() << " N " << pEqElIm->CurNoir() << "\n";
330340
}
331341
else
332342
{

Diff for: src/TpMMPD/Hugin.cpp

+67-23
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ Header-MicMac-eLiSe-25/06/2007*/
4040
#include "StdAfx.h"
4141
#include "schnaps.h"
4242

43-
template <typename T>
44-
std::string NumberToString ( T Number )
43+
template <typename T> string NumberToString(T Number)
4544
{
46-
std::ostringstream ss;
45+
ostringstream ss;
4746
ss << Number;
48-
return ss.str();
47+
return ss.str();
4948
}
50-
5149
//----------------------------------------------------------------------------
5250
struct Couple{
5351
std::string Img1;
@@ -183,6 +181,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
183181
int aProj=0;
184182
double aFov=50;
185183
bool aFilter=true;
184+
bool aClean=true;
186185

187186
ElInitArgMain
188187
(
@@ -194,6 +193,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
194193
<< EAM(aProj,"Proj",false,"Projection type (default: 0)")
195194
<< EAM(aFov,"FOV",false,"Horizontal field of view of images (default: 50)")
196195
<< EAM(aFilter,"FilterTP",true,"Use Schnaps to reduce tie points; Def=true")
196+
<< EAM(aClean,"Clean",true,"Clean indivudual images after stitching ; Def=true")
197197
);
198198

199199
// !!!!!!!! sort directories by name !!!!!!!
@@ -257,12 +257,12 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
257257

258258
for(unsigned int aV=0; aV<aLFiles.size(); aV++)
259259
{
260-
std::cout << "Copy images of groupe : " << aV << std::endl;
260+
std::cout << "Copy images of groupe " << aV+1 << " out of " << aLFiles.size() << " groups" << std::endl;
261261
int aCompt = 1;
262262
for(std::list<cElFilename>::iterator iT2 = aLFiles.at(aV).begin() ; iT2 != aLFiles.at(aV).end() ; iT2++)
263263
{
264264
std::cout << "---> Copy of file " << aCompt << " out of " << aLFiles.at(aV).size() << std::endl;
265-
ELISE_fp::CpFile((*iT2).m_path.str() + (*iT2).m_basename,aNameProcFolder); //copy only if no file !!!!
265+
ELISE_fp::CpFile((*iT2).m_path.str() + (*iT2).m_basename,aNameProcFolder); //to do : copy only if no file !!!!
266266
aCompt++;
267267
}
268268
}
@@ -274,16 +274,20 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
274274
ctPath aNWDir = getWorkingDirectory();
275275
std::cout << "aNWDir = " << aNWDir << std::endl;
276276
}
277+
278+
//vector of names of signe mosaic for each level
279+
std::vector<std::string> aVOM;
280+
281+
//lauch all the commands in //
282+
std::list<std::string> aListCom;
277283

278-
//pipeline to generate a pano for each level N
284+
//pipeline to generate a pano for each level N :
285+
//first tie points extraction using MicMac
279286
for(unsigned int aP=0; aP<aDirectories.size(); aP++)
280287
{
281-
std::cout << "debugggggg" << std::endl;
282288
std::string aPatL = GenPatFromLF(aLFiles.at(aP),false);
283-
std::cout << "debugggggg" << std::endl;
284289
//std::string aPatL2 = GenPatFromLF(aLFiles.at(aP+1),false);
285-
std::cout << "debugggggg" << std::endl;
286-
std::string aXmlOutFile = "NameCple_" + NumberToString(aP) + "_" + NumberToString(aP+1) + ".xml";
290+
std::string aXmlOutFile = "NameCple_" + NumberToString(aP) + ".xml";
287291
std::cout << "aXmlOutFile = " << aXmlOutFile << std::endl;
288292

289293
//generate a .xml file of all couples for level N & level N+1
@@ -332,7 +336,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
332336
std::string aPatLH = GenPatFromLF(aLFiles.at(aP),true);
333337
//std::string aPatL2H = GenPatFromLF(aLFiles.at(aP+1),true);
334338

335-
std::string aHNameProject = "Hugin_" + NumberToString(aP) + "_" + NumberToString(aP+1) + ".pto";
339+
std::string aHNameProject = "Hugin_" + NumberToString(aP) + ".pto";
336340
std::string aCom3 = "pto_gen -o"
337341
+ std::string(" ")
338342
+ aHNameProject
@@ -344,7 +348,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
344348
+ std::string(" ")
345349
+ "-f " + NumberToString(aFov);
346350
std::cout << "aCom3 = " << aCom3 << std::endl;
347-
system_call(aCom3.c_str());
351+
//~ system_call(aCom3.c_str());
348352

349353
//specify the variables to be optimized
350354
std::string aCom4 = "pto_var --opt=\"y, p, r, TrX, TrY, TrZ, Tpy, Tpp, v, a, b, c, d, e, g, t, Eev, Er, Eb, Vb, Vc, Vd, Vx, Vy, Ra, Rb, Rc, Rd, Re\""
@@ -353,7 +357,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
353357
+ std::string(" ")
354358
+ aHNameProject;
355359
std::cout << "aCom4 = " << aCom4 << std::endl;
356-
system_call(aCom4.c_str());
360+
//~ system_call(aCom4.c_str());
357361

358362
//include tie points from MicMac in the project file
359363
std::string aCom5 = MMDir()
@@ -368,7 +372,7 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
368372
+ std::string(" ")
369373
+ "HomolIn=_mini";
370374
std::cout << "aCom5 = " << aCom5 << std::endl;
371-
system_call(aCom5.c_str());
375+
//~ system_call(aCom5.c_str());
372376

373377
//lanch Hugin optimizer
374378
std::string aCom6 = "autooptimiser -a -l -s -m -v"
@@ -377,31 +381,71 @@ cOSPTPE_Appli::cOSPTPE_Appli(int argc,char ** argv)
377381
+ "-o " + StdPrefixGen(aHNameProject) + "_Homol.pto"
378382
+ std::string(" ") + StdPrefixGen(aHNameProject) + "_Homol.pto";
379383
std::cout << "aCom6 = " << aCom6 << std::endl;
380-
system_call(aCom6.c_str());
384+
//~ system_call(aCom6.c_str());
381385

382386
//pano configuration
383387
std::string aCom7 = "pano_modify -p " + NumberToString(aProj)
384388
+ std::string(" ") + "-o "
385389
+ StdPrefixGen(aHNameProject) + "_Homol.pto"
386390
+ std::string(" ") + StdPrefixGen(aHNameProject) + "_Homol.pto";
387391
std::cout << "aCom7 = " << aCom7 << std::endl;
388-
system_call(aCom7.c_str());
392+
//~ system_call(aCom7.c_str());
389393

390394
//generate individual images to be stiched
391-
std::string aCom8 = "nona -z LZW -r ldr -m TIFF_m -o ImgsIndiv_" + NumberToString(aP) + "_" + NumberToString(aP+1) + "_" + std::string(" ") + StdPrefixGen(aHNameProject) + "_Homol.pto";
395+
std::string aCom8 = "nona -z LZW -r ldr -m TIFF_m -o ImgsIndiv_" + NumberToString(aP) + "_" + std::string(" ") + StdPrefixGen(aHNameProject) + "_Homol.pto";
392396
std::cout << "aCom8 = " << aCom8 << std::endl;
393-
system_call(aCom8.c_str());
397+
//~ system_call(aCom8.c_str());
394398

395399
//assembly for level N & level N+1
396-
std::string aOutMosaic = "Mosaic_" + NumberToString(aP) + "_" + NumberToString(aP+1) + ".jpg";
397-
std::string aCom9 = "enblend --compression=90 ImgsIndiv_" + NumberToString(aP) + "_" + NumberToString(aP+1) + "*.*tif -o " + aOutMosaic;
400+
std::string aOutMosaic = "Mosaic_" + NumberToString(aP) + ".jpg";
401+
aVOM.push_back(aOutMosaic);
402+
std::string aCom9 = "enblend --compression=90 ImgsIndiv_" + NumberToString(aP) + "*.*tif -o " + aOutMosaic;
398403
std::cout << "aCom9 = " << aCom9 << std::endl;
399-
system_call(aCom9.c_str());
404+
//~ system_call(aCom9.c_str());
405+
406+
//merge all in one commande
407+
std::string aComM = aCom3
408+
+ std::string(" ") + "&&" + std::string(" ")
409+
+ aCom4
410+
+ std::string(" ") + "&&" + std::string(" ")
411+
+ aCom5
412+
+ std::string(" ") + "&&" + std::string(" ")
413+
+ aCom6
414+
+ std::string(" ") + "&&" + std::string(" ")
415+
+ aCom7
416+
+ std::string(" ") + "&&" + std::string(" ")
417+
+ aCom8
418+
+ std::string(" ") + "&&" + std::string(" ")
419+
+ aCom9;
420+
421+
std::cout << "aComM = " << aComM << std::endl;
422+
aListCom.push_back(aComM);
423+
}
424+
425+
cEl_GPAO::DoComInParal(aListCom,mDir);
426+
427+
if(aClean)
428+
{
429+
cInterfChantierNameManipulateur * aII = cInterfChantierNameManipulateur::BasicAlloc(mDir);
430+
std::string aFPII = "ImgsIndiv_*.*tif";
431+
const std::vector<std::string> * aSII = aII->Get(aFPII);
432+
std::vector<std::string> aVII = *aSII;
433+
std::cout << "aVII.size() = " << aVII.size() << std::endl;
434+
435+
for(unsigned int aC=0; aC<aVII.size(); aC++)
436+
{
437+
std::cout << "---> Deleting Image " << aC << " out of " << aVII.size() << " : " << aVII[aC] << std::endl;
438+
ELISE_fp::RmFileIfExist(aVII[aC]);
439+
}
400440
}
401441

402442
//same pipeline to generate a global panoramique from each individual (level N & level N+1 pano)
443+
for(unsigned int aL=0; aL<aVOM.size(); aL++)
403444
{
404445
//generate a .xml file of all individual panoramik
446+
//~ std::list<cElFilename> aLMN;
447+
//~ aLMN.push_back(
448+
//~ std::string aPatL = GenPatFromLF(aLMN,false);
405449

406450
//compute tie points for all individual panoramik
407451

Diff for: src/TpMMPD/TiePByMesh/TaskCorrel/cAppliTaskCorrel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void cAppliTaskCorrel::ExportXML(string aDirXML, Pt3dr clIni)
303303
//====this thing is eat RAM so much ======
304304
for (uint aKIi = 0; aKIi<mVImgs.size(); aKIi++)
305305
{
306-
if (aImg->Num() != aKIi)
306+
if (aImg->Num() != int(aKIi))
307307
aImg->Task().NameSec().push_back(mVImgs[aKIi]->Name());
308308
}
309309
//=========================================

Diff for: src/TpMMPD/TiePByMesh/TestGiang_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ int TestGiangNewHomol_Main(int argc,char ** argv)
513513
//cout<<"Cnf : "<<aKCnf<<" - Nb Imgs : "<<aCnf->NbIm()<<" - Nb Pts : "<<aCnf->NbPts()<<endl;
514514
std::vector<int> aVIdIm = aCnf->VIdIm();
515515

516-
for (uint aKPtCnf=0; aKPtCnf<aCnf->NbPts(); aKPtCnf++)
516+
for (uint aKPtCnf=0; aKPtCnf<uint(aCnf->NbPts()); aKPtCnf++)
517517
{
518518
vector<Pt2dr> aVPtInter;
519519
vector<CamStenope*> aVCamInter;

0 commit comments

Comments
 (0)