Skip to content

Commit

Permalink
[fuseCut] DelaunayGraphCut: remove unused allPoints variable
Browse files Browse the repository at this point in the history
variable allPoints always true
  • Loading branch information
dsmtE committed Jul 16, 2020
1 parent d76b07e commit a599e5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/aliceVision/fuseCut/DelaunayGraphCut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ float DelaunayGraphCut::weightFcn(float nrc, bool labatutWeights, int /*ncams*/
return weight;
}

void DelaunayGraphCut::fillGraph(bool fixesSigma, float nPixelSizeBehind, bool allPoints,
void DelaunayGraphCut::fillGraph(bool fixesSigma, float nPixelSizeBehind,
bool labatutWeights, bool fillOut, float distFcnHeight) // fixesSigma=true nPixelSizeBehind=2*spaceSteps allPoints=1 behind=0 labatutWeights=0 fillOut=1 distFcnHeight=0
{
ALICEVISION_LOG_INFO("Computing s-t graph weights.");
Expand Down Expand Up @@ -1554,7 +1554,7 @@ void DelaunayGraphCut::fillGraph(bool fixesSigma, float nPixelSizeBehind, bool a
int vertexIndex = verticesRandIds[i];
const GC_vertexInfo& v = _verticesAttr[vertexIndex];

if(v.isReal() && (allPoints || v.isOnSurface) && (v.nrc > 0))
if(v.isReal() && (v.nrc > 0))
{
for(int c = 0; c < v.cams.size(); c++)
{
Expand All @@ -1567,7 +1567,7 @@ void DelaunayGraphCut::fillGraph(bool fixesSigma, float nPixelSizeBehind, bool a
int nstepsFront = 0;
int nstepsBehind = 0;
fillGraphPartPtRc(nstepsFront, nstepsBehind, vertexIndex, v.cams[c], weight, fixesSigma, nPixelSizeBehind,
allPoints, fillOut, distFcnHeight);
fillOut, distFcnHeight);

avStepsFront += nstepsFront;
aAvStepsFront += 1;
Expand All @@ -1589,7 +1589,7 @@ void DelaunayGraphCut::fillGraph(bool fixesSigma, float nPixelSizeBehind, bool a
}

void DelaunayGraphCut::fillGraphPartPtRc(int& out_nstepsFront, int& out_nstepsBehind, int vertexIndex, int cam,
float weight, bool fixesSigma, float nPixelSizeBehind, bool allPoints,
float weight, bool fixesSigma, float nPixelSizeBehind,
bool fillOut, float distFcnHeight) // fixesSigma=true nPixelSizeBehind=2*spaceSteps allPoints=1 behind=0 fillOut=1 distFcnHeight=0
{
out_nstepsFront = 0;
Expand Down Expand Up @@ -1684,7 +1684,7 @@ void DelaunayGraphCut::fillGraphPartPtRc(int& out_nstepsFront, int& out_nstepsBe

Point3d p = originPt; // HAS TO BE HERE !!!

bool ok = (facet.cellIndex != GEO::NO_CELL) && allPoints;
bool ok = (facet.cellIndex != GEO::NO_CELL);
while(ok)
{
GC_cellInfo& c = _cellsAttr[facet.cellIndex];
Expand All @@ -1703,7 +1703,7 @@ void DelaunayGraphCut::fillGraphPartPtRc(int& out_nstepsFront, int& out_nstepsBe
// False here mean farest
const bool nearestFarest = false;
if(!rayCellIntersection(mp->CArr[cam], p, facet, outFacet, nearestFarest, intersectPt) ||
((originPt - p).size() >= maxDist) || (!allPoints))
((originPt - p).size() >= maxDist))
{
ok = false;
}
Expand Down Expand Up @@ -2459,7 +2459,7 @@ void DelaunayGraphCut::reconstructExpetiments(const StaticVector<int>& cams, con

ALICEVISION_LOG_INFO("Jancosek CVPR 2011 method ( forceTEdgeDelta*100 = " << static_cast<int>(delta * 100.0f) << "):");

fillGraph(false, sigma, true, false, true, distFcnHeight);
fillGraph(false, sigma, false, true, distFcnHeight);

addToInfiniteSw((float)maxint);

Expand Down Expand Up @@ -2487,7 +2487,7 @@ void DelaunayGraphCut::reconstructExpetiments(const StaticVector<int>& cams, con
ALICEVISION_LOG_INFO("Jancosek IJCV method ( forceTEdgeDelta*100 = " << static_cast<int>(forceTEdgeDelta * 100.0f) << " ): ");

// compute weights on edge between tetrahedra
fillGraph(false, sigma, true, false, true, distFcnHeight);
fillGraph(false, sigma, false, true, distFcnHeight);

addToInfiniteSw((float)maxint);

Expand All @@ -2511,7 +2511,7 @@ void DelaunayGraphCut::reconstructExpetiments(const StaticVector<int>& cams, con
if(labatutCFG09)
{
ALICEVISION_LOG_INFO("Labatut CFG 2009 method:");
fillGraph(false, sigma, true, true, true, distFcnHeight);
fillGraph(false, sigma, true, true, distFcnHeight);

if(saveTemporaryBinFiles)
saveDhInfo(folderName + "delaunayTriangulationInfoInit.bin");
Expand Down
4 changes: 2 additions & 2 deletions src/aliceVision/fuseCut/DelaunayGraphCut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ class DelaunayGraphCut

float weightFcn(float nrc, bool labatutWeights, int ncams);

virtual void fillGraph(bool fixesSigma, float nPixelSizeBehind, bool allPoints, bool labatutWeights,
virtual void fillGraph(bool fixesSigma, float nPixelSizeBehind, bool labatutWeights,
bool fillOut, float distFcnHeight = 0.0f);
void fillGraphPartPtRc(int& out_nstepsFront, int& out_nstepsBehind, int vertexIndex, int cam, float weight,
bool fixesSigma, float nPixelSizeBehind, bool allPoint, bool fillOut,
bool fixesSigma, float nPixelSizeBehind, bool fillOut,
float distFcnHeight);

void forceTedgesByGradientCVPR11(bool fixesSigma, float nPixelSizeBehind);
Expand Down

0 comments on commit a599e5e

Please sign in to comment.