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

Is there any Adaptive Linear Stretching algorithms exists and worth adding to the package? #62

Open
babaq opened this issue Aug 4, 2023 · 1 comment

Comments

@babaq
Copy link

babaq commented Aug 4, 2023

I have recently faced a problem that needs adaptive linear stretching. Basically, the image has different value range at different regions, applying linear stretching globally would not be able to enhance the local contrast.

I assume there should be algorithms similar to the Contrast Limited Adaptive Histogram Equalization that can enhance local contrast. but my naive implementation (split images to regions and apply linear stretching locally) have significant edges artifacts.

if already established methods exists, it would be great help for situation I faced.

@zygmuntszpak
Copy link
Member

Hi,

I'd be surprised if what you outlined has not been published before but I'm not aware of a specific paper to reference. I think the only thing missing from your naive implementation is the bilinear interpolation of a pixel's 'new contrast' based on the linear stretching of the 'neighboring blocks'. This bilinear interpolation is also what is needed to prevent the CLAHE algorithm from giving rise to significant edge artifacts.

So I think all the ingredients for a solution are there. We just need to splice together the bilinear block interpolation from CLAHE, and the linear stretching for each block.

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

No branches or pull requests

2 participants