Skip to content

Commit bb98bb1

Browse files
authored
Merge pull request #2018 from alicevision/fix/exportImages
[utils] Fix `exportImages` parallelization
2 parents 80229d2 + b061952 commit bb98bb1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/software/utils/main_exportImages.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ bool process(const sfmData::SfMData & input,
315315
// for exposure correction
316316
const double medianCameraExposure = input.getMedianCameraExposureSetting().getExposure();
317317

318-
for (int posImage = rangeStart; posImage < rangeEnd; posImage++)
318+
for (int posImage = 0; posImage < countElements; posImage++)
319319
{
320320
auto viewsIt = input.getViews().begin();
321321
std::advance(viewsIt, posImage);
@@ -345,7 +345,8 @@ bool process(const sfmData::SfMData & input,
345345
std::string outFileName = namingFunction(view);
346346
outputView.getImage().setImagePath(outFileName);
347347

348-
if (posImage < rangeStart && posImage >= rangeEnd)
348+
//Real processing is ignored if we are not in the chunk
349+
if (posImage < rangeStart || posImage >= rangeEnd)
349350
{
350351
continue;
351352
}

0 commit comments

Comments
 (0)