Skip to content

Conversation

@originlake
Copy link
Contributor

@originlake originlake commented Jul 3, 2023

In undistortion, computing camera mapping is the most expensive part, but it's only related to the camera model and image size, hence for each camera model and size, it only needs to be calculated once, and all the undistortion can use the same camera mapping.

This PR introduces a simple thread/process safe LRU cache wrapper to cache the camera mapping results so future undistortion can reuse it. This should greatly speed up the undistortion stage.

(The cmakelists.txt and similarity_model.cc changes are used to fix a bug when building c extensions in debug mode, **undefined symbol**)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants