alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.91k stars 809 forks source link

[depthMap] DepthMapEstimator: Correctly limit the number of simultaneous RCs #1569

Closed cbentejac closed 9 months ago

cbentejac commented 9 months ago

Description

This PR fixes an issue in the Depth Maps that was highlighted following the merge of alicevision/Meshroom#2203 by correctly limiting the number of simultaneous RCs based on the maximum memory that is available for camera parameters and which is constant. If the number of RCs is too large compared to the available memory, it should be reduced.

Additionally, some code clean-up was performed (static casts instead of C-style casts, indentation harmonization, break-up of some lines that were too long).