-
Notifications
You must be signed in to change notification settings - Fork 54
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
Histogram equalization for color images #28
Histogram equalization for color images #28
Conversation
Move all extra utilities to a new module. Add comments.
I've finally managed to make the histogram equalization work "in-place", without copying channels around. I should have marked this as draft when I started, in case you started reviewing it and I still made some changes, sorry about that. One thing to be aware of are the Equalizing the histogram for the L channel happens in a similar way, but in range [0..100], so vector length is 101. Please let me know if you have any suggestions or concerns, thanks! |
After running `cargo audit`, it turns out `imageproc` crate has a known vulnerability: https://rustsec.org/advisories/RUSTSEC-2020-0023 Also, we're no longer using anything from this crate. If we need something in the future, keep an eye on this pull request that seems to solve the issue by swapping the vulnerable dependency in imageproc with another crate: image-rs/imageproc#417 Details: ``` $cargo audit error: Vulnerable crates found! ID: RUSTSEC-2020-0023 Crate: rulinalg Version: 0.4.2 Date: 2020-02-11 URL: https://rustsec.org/advisories/RUSTSEC-2020-0023 Title: Lifetime boundary for `raw_slice` and `raw_slice_mut` are incorrect Solution: No safe upgrade is available! Dependency tree: rulinalg 0.4.2 └── imageproc 0.21.0 └── noaa-apt 1.2.0 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK the way it is, these are some suggestions that I will do if I find time
Very nice work. Sorry for taking so long. I will be very busy at least another week |
No worries! I've addressed all the issues, thanks for taking the time to look at this! |
Looks good! |
This changes the logic of the processing for color images when histogram equalization is selected:
Everything else should remain the same.
I'm converting the image to Lab, equalizing the histogram for the L value [0..100], and then converting back to RGBA.
Here is the difference between telemetry / histogram with false color
Large image warning: 6MB