Skip to content
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

support color histogram equalization #1203

Merged
merged 1 commit into from
Jan 21, 2024

Conversation

borongyuan
Copy link
Contributor

Add support for histogram equalization of color images. Color images are first converted to YCrCb color space, and histogram equalization is performed only on the Y channel.
Why use YCrCb instead of HSV or LAB?
They should have similar results. But according to OpenCV's color conversion documentation, the Y channel of BGR2YCrCb is calculated in the same way as BGR2GRAY. Therefore, it can ensure the same effect as converting to gray image first and then performing histogram equalization.

@matlabbe
Copy link
Member

LGTM!

@matlabbe matlabbe merged commit dcd5994 into introlab:master Jan 21, 2024
5 of 6 checks passed
@borongyuan borongyuan deleted the color-histogram-equalization branch January 22, 2024 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants