-
Notifications
You must be signed in to change notification settings - Fork 8
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
Lower memory usage #1
Comments
(Sorry for responding to an older thread.) A clever trick I've used in the past is to put all the information in a single string, sortable hash, or even in distinct binary or decimal ranges in the order we'd like lexicographically sorted. Then, Note that Anyways, thanks for this implementation. I will work on my own. I'll put a link to your repository as credit for the assistance. (I'd fork but I'll probably rewrite the history, which misses the point of forking. I'm still deciding.) |
@vitorsr |
@vitorsr I have a library for this and it uses essentially what you say, however it is slightly more complex than that, but yeah, it works. With the additional fact that numpy now uses radix sort, it is quite a bit faster. See https://github.com/coderforlife/histmatch. |
@coderforlife |
I was actually searching for the asymptotic memory usage of lexsort (I think the search was simply lexsort memory usage) and this issue was the first search result! I didn't even search for exact histogram equalization, just found this one randomly. The link didn't work since it was private since it includes some thing I am working on publishing a paper about. However, at this point the paper is being submitted very soon so not much of a risk. |
Using
numpy.lexsort()
results in very high memory usage. If an image is too big, this can result in a signal 9 abort.If someone really needs this implementation for production, than this issue has to be addressed.
Pull requests are welcome.
The text was updated successfully, but these errors were encountered: