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 function to blend two images with alpha channels. #522

Merged
merged 3 commits into from
Oct 1, 2018

Conversation

malban
Copy link

@malban malban commented Sep 10, 2018

No description provided.

@danthony06
Copy link
Contributor

Might be nice if the code in swri_image_util used this functionality.

https://github.com/swri-robotics/marti_common/blob/master/swri_image_util/src/blend_images_util.cpp

@malban
Copy link
Author

malban commented Sep 10, 2018

@danthony06 They seem to do slightly different things. Though I suppose you could create two alpha channels based on the logic in blend_images_util and then call this function.

The base image would have an alpha channel with (1.0 - alpha) for all pixels. The top image would have an alpha channel of alpha for all pixels in the mask and 0.0 elsewhere.

Right?

@danthony06
Copy link
Contributor

Yes, I think that would do it.

@malban malban merged commit ce768b9 into swri-robotics:master Oct 1, 2018
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.

None yet

2 participants