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 gradient calculations for RGB images #156

Closed
theotherphil opened this issue Feb 13, 2017 · 1 comment
Closed

Support gradient calculations for RGB images #156

theotherphil opened this issue Feb 13, 2017 · 1 comment

Comments

@theotherphil
Copy link
Contributor

See https://mht.technology/post/content-aware-resize/

filter3x3 already supports this, so we'd just need to decide how to combine the per-channel magnitudes. It's not obvious what the correct approach is here.

@theotherphil
Copy link
Contributor Author

theotherphil commented Feb 18, 2017

Some notes on approaches to defining gradients for colour images: http://ai.stanford.edu/~ruzon/compass/color.html

I think we shouldn't bother trying to do anything clever. Instead, we should just provide a method which computes per-channel gradients and applies a user-provided function to combine them, with two standard options provided:

CombineChannelGradients {
Max, // Use max of per-channel gradients
Mean, // Use mean of per-channel gradients
}

From some quick googling these both appear to be reasonably common.

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

1 participant