
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.
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.