-
-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PERF: Using stl stable_sort instead of a custom class and sort
The algorithm requires a stable sort of image indexes based on pixel intensity. The paper recommends counting sort but that has its own problems when using bigger than 8 bit pixel types or floats - i.e. need additional scans of the data to figure out range etc. The original implementation of this class used a structure with both position and brightness. This version abandons that structure and uses an offset array only, saving some RAM and simplifying the code. There's an opportunity to activate stl parallel sorting in the future.
- Loading branch information
1 parent
e8025ad
commit ee355d7
Showing
2 changed files
with
26 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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