header file---------
class Blending
{
public:
static void Blend(int, void*);
int Blended();
//int imageinput();
double alpha, beta;
int key;
int defaultvalue;
};
cpp file ----------
Mat img2;
double alpha, beta;
int key;
int maximumvalue = 100;
int defaultvalue = maximumvalue / 2;
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()
{
createTrackbar("Blend", "Blendimage", &defaultvalue,maximumvalue,Blending::Blend);
}
blend is a static function and when i use the object of the class to access the variable of the class i get an uninitialized variable error any help... the variable are non-static variable