Skip to content
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

Merged
merged 6 commits into from
Apr 8, 2019

Conversation

cvere
Copy link
Contributor

@cvere cvere commented Mar 19, 2019

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 of
2*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.

cvere added 2 commits March 18, 2019 18:31
Contribution to multiple textures per image. It limits the number of images reloads from files.
Around 3x speedup on a dataset of 250 images.
@cvere cvere requested a review from fabiencastan March 19, 2019 14:12
{
accuImage.img[xyoffset] = accuImage.img[xyoffset-texParams.textureSide];
}
accuImage.imgCount[xyoffset] += 1;
Copy link
Member

@fabiencastan fabiencastan Mar 21, 2019

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].

Copy link
Member

@fabiencastan fabiencastan left a 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,
Copy link
Contributor

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.

cvere and others added 3 commits April 5, 2019 18:56
…into dev_textureFusionPerImage

Conflicts:
	src/aliceVision/mesh/Texturing.cpp
Create the texture padding with only two passes of the image instead of
2*padding
@fabiencastan fabiencastan merged commit a048404 into develop Apr 8, 2019
@fabiencastan fabiencastan deleted the dev_textureFusionPerImage branch April 8, 2019 11:53
@fabiencastan fabiencastan added this to the 2019.2 milestone Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants