correct the size of buf which holds integral sum/sumsq
correct the size of buf which holds integral sum/sumsq

layer_dy is not initialized correctly, it results in a small height
of the buffer, and so memory write is out of range in cv::integral.

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv