Reputation: 144
I am trying the alpha blending with two images both have alpha channel in OpenCV.
double r, g, b, a; //source image colors
double Rd, Gd, Bd, Ad; //destination image colors
....
double result_r = r∗a + Rd*(1−a);
double result_g = g∗a + Gd*(1−a);
double result_b = b∗a + Bd*(1−a);
double result_a = a∗a + Ad*(1−a);
It works fine if the destination image is opaque. But I need transparent Images on both source and destination. Are there any other calculation methods or functions of OpenCV?
Regards
Upvotes: 0
Views: 967