header file --------------------
class Blending
{
public:
Blending(void)
{
alpha = beta = key = defaultvalue = 0;
}
static void Blend(int, void*);
int Blended();
//int imageinput();
double alpha, beta;
int key;
int defaultvalue;
};
cpp and main file----------
int maximumvalue = 100;
int defaultvalue = 50;
void Blending::Blend(int, void*)
{
Blending blean;
blean.alpha = (double)blean.defaultvalue / 100;
addWeighted(img, blean.alpha,img2, 1.0 - blean.alpha, 0, des);
imshow("Blendimage", des);
}
int main()
{
Blending::Blend(defaultvalue, 0);
createTrackbar("Blend", "Blendimage", &defaultvalue,maximumvalue,Blending::Blend);
waitKey(0);
}
when i run the code everything works well but the images in the windows does not blend, any help