-
-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mesh] texturing: performance optimization of image fusion #615
Conversation
Contribution to multiple textures per image. It limits the number of images reloads from files. Around 3x speedup on a dataset of 250 images.
src/aliceVision/mesh/Texturing.cpp
Outdated
{ | ||
accuImage.img[xyoffset] = accuImage.img[xyoffset-texParams.textureSide]; | ||
} | ||
accuImage.imgCount[xyoffset] += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should update imgCount
only if we set img[xyoffset]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix the dilate gutter.
size_t atlasID, mvsUtils::ImagesCache& imageCache, | ||
/// Generate texture files for the given sub-set of texture atlases | ||
void generateTexturesSubSet(const mvsUtils::MultiViewParams& mp, | ||
std::vector<size_t> atlasIDs, mvsUtils::ImagesCache& imageCache, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing &
for std::vector<size_t> atlasIDs
.
…into dev_textureFusionPerImage Conflicts: src/aliceVision/mesh/Texturing.cpp
Create the texture padding with only two passes of the image instead of 2*padding
Description
[X] Contribution to multiple textures per image. It limits the number of images reloads from files. Around 3x speedup on a dataset of 250 images.
[X] Texture padding speedup: Create the padding with only
2
loops over the texture instead of2*padding
loops. So the performance cost does not depend on the size of the padding anymore. 28% speedup on a small dataset of 12 images. Of course, the speedup be smaller on large datasets as the largest part of the processing will be the image contributions.