Skip to content

Commit

Permalink
Check cam vertex validity
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Jan 10, 2025
1 parent 2b944e2 commit b706510
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/aliceVision/fuseCut/GraphFiller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,18 @@ void GraphFiller::rayMarchingGraphEmpty(int vertexIndex,

assert(cam >= 0);
assert(cam < _mp.ncams);

if (_camsVertexes[cam] < 0)
{
return;
}

// Initialisation
GeometryIntersection geometry(vertexIndex); // Starting on global vertex index
Point3d intersectPt = originPt;
// toTheCam
const double pointCamDistance = (_mp.CArr[cam] - originPt).size();



TetrahedronsRayMarching marching(_tetrahedralization, vertexIndex, _camsVertexes[cam], false);

Facet lastIntersectedFacet;
Expand Down Expand Up @@ -200,6 +203,14 @@ void GraphFiller::rayMarchingGraphFull(int vertexIndex,
float fullWeight,
double nPixelSizeBehind)
{
assert(cam >= 0);
assert(cam < _mp.ncams);

if (_camsVertexes[cam] < 0)
{
return;
}

const int maxint = std::numeric_limits<int>::max();
const Point3d& originPt = _verticesCoords[vertexIndex];
const double pixSize = _verticesAttr[vertexIndex].pixSize;
Expand Down Expand Up @@ -295,7 +306,11 @@ void GraphFiller::forceTedgesByGradientIJCV(float nPixelSizeBehind)
GeometryIntersection geometry(vertexIndex); // Starting on global vertex index
Point3d intersectPt = originPt;
// toTheCam


if (_camsVertexes[cam] < 0)
{
continue;
}

TetrahedronsRayMarching marching(_tetrahedralization, vertexIndex, _camsVertexes[cam], false);

Expand Down

0 comments on commit b706510

Please sign in to comment.