include
Mat img1 = imread(“1.png”,0);
Mat img2 = imread(“2.png”,0);
double img_scaler[4] = {1.0,0.5,0.25,0.125};
vector<Mat> pyr1;
for(int i =0; i < 4; i++)
{
Mat temp;
resize(img1,temp,Size(0,0),img_scaler[i],img_scaler[i],1);
pyr1.push_back(temp);
}