-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How to add transpranet background overlay on image (IplImage) #306
Comments
Do you have some code in C/C++ that does what you want? |
Hi, I think something like this : http://jepsonsblog.blogspot.com.ar/2012/10/overlay-transparent-image-in-opencv.html |
Sure, what issues are you having doing the same in Java? |
for(int c = 0; opacity > 0 && c < output.channels(); ++c)
{
unsigned char foregroundPx =
foreground.data[fY * foreground.step + fX * foreground.channels() + c];
unsigned char backgroundPx =
background.data[y * background.step + x * background.channels() + c];
output.data[y*output.step + output.channels()*x + c] =
backgroundPx * (1.-opacity) + foregroundPx * opacity;
} so far I could't translate those lines to test the function in java |
You might want to try to use indexers: http://bytedeco.org/news/2014/12/23/third-release/ |
FYI, this is going to be much easier done using |
Hi
@saudet , I try to add an overlay on iplimage, but I find overlay's background are black...
Any idea on how to solve this?
The text was updated successfully, but these errors were encountered: