# Why ExposureCompensator gives black image as result?

I am trying to use ExposureCompensator class. I am trying to paste a small image to a bigger image but before pasting it i want to balance brightness of two images. When i run the code smallImage will return as a black image.

PS: Also if i use ExposureCompensator::GAIN_BLOCK it gives an error, Integer division by zero.

    int num_images = 2;
int img_idx = 1;

//left and top corner position of small image
int left = 300;
int top = 400;
vector<Point> corners(num_images);
vector<Mat> images_warped(num_images);

images_warped.push_back(bigImage);
images_warped.push_back(smallImage);

corners.push_back(Point(0, 0));
corners.push_back(Point(left, top));

//created two white Mats as masks