Cache unionfind structure across detect calls and lazy-initialize size array#434
Open
bouk wants to merge 1 commit into
Open
Cache unionfind structure across detect calls and lazy-initialize size array#434bouk wants to merge 1 commit into
bouk wants to merge 1 commit into
Conversation
Contributor
|
apriltag_demo segfaults if I pass in two images on the second image, with the first one having a smaller resolution (640x400, followed by 1280x951). Switching the order such that the first image has the larger resolution does not trigger a segfault. |
Contributor
Author
|
@Gold856 you're right, I inverted a condition. Fixed now and I added a regression test |
c4d82fb to
05bcde0
Compare
d185f23 to
57d5243
Compare
Collaborator
|
Can you rebase this and provide some details in the commit message what this change does and how it works? |
…e array This saves a potentially big allocation if multiple detections are performed after each other. For 6MP images this gives me a 1.33x increase in detection throughput.
57d5243 to
a155516
Compare
Contributor
Author
|
@christian-rauch I've rebased and added a little bit more detail in the commit |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For large images (3088x2064) this gives me an 1.33x(!) speedup.
Surprisingly only on Linux, on my macbook there's no difference