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

Add contrast Normalization #46

Open
Charles-Schleich opened this issue Oct 6, 2021 · 3 comments
Open

Add contrast Normalization #46

Charles-Schleich opened this issue Oct 6, 2021 · 3 comments

Comments

@Charles-Schleich
Copy link

Ive begun to implement a contrast normalization function, based on the README's wikipedia entry wiki

I figure the imageproc crate is the right place to put it.

I will update the README when i am done.

@vadixidav
Copy link
Member

You can either add it to imageproc (not maintained by us) or to ndarray-vision (maintained by us). imageproc is more mature, so that's a great place to add it.

@Charles-Schleich
Copy link
Author

Great stuff,
I don't mind putting the code in 2 places but then maintaining it might become a mission.

I've implemented the linear and non-linear versions of the function for a image::Luma input, I need to write some decent tests.

Does it make sense that a the normalization operation should also be implemented on a image::Rgb /image::Bgr image as well ?
i.e. one set of max/min input, but normalize each channel independently.
Is this something useful / needed for colour images ?

@xd009642
Copy link
Member

xd009642 commented Oct 7, 2021

Well implementing on each channel could be analogous to doing transformations on the colour curves on an image in things like gimp/photoshop I think... Not something I've seen useful in computer vision but for creative things sure. Maybe for other formats like HSV or YCrCb where there's a channel for brightness/gamma normalising that and not the others has more use.

Also as ndarray-vision exposes ndarray directly there might already be functionality in ndarray or some other crates in it's ecosystem to do that - I'm not sure. But we do have histogram equalisation for contrast enhancement, maybe we already have some of the component parts (I'd have to check)

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

3 participants