Skip to content

Commit

Permalink
Panorama was using too much memory for no reason
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Jun 9, 2023
1 parent 5e8388f commit 45372bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/software/pipeline/main_panoramaCompositing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ size_t getCompositingOptimalScale(int width, int height)
* Ideally, should be gaussianFilterSize = 1 + 2 * gaussianFilterRadius with:
* const size_t gaussianFilterRadius = 2;
*/
const int gaussianFilterSize = 1;
const int gaussianFilterSize = 5;

//Avoid negative values on scale
if (minsize < gaussianFilterSize)
Expand Down Expand Up @@ -163,6 +163,10 @@ bool processImage(const PanoramaMap& panoramaMap, const sfmData::SfMData& sfmDat
panoramaBoundingBox = referenceBoundingBox.divide(panoramaMap.getScale())
.dilate(panoramaMap.getBorderSize())
.multiply(panoramaMap.getScale());

panoramaBoundingBox.clampTop();
panoramaBoundingBox.clampBottom(panoramaMap.getHeight());

compositer = std::unique_ptr<Compositer>(
new LaplacianCompositer(panoramaBoundingBox.width, panoramaBoundingBox.height, panoramaMap.getScale()));
}
Expand Down

0 comments on commit 45372bb

Please sign in to comment.