# Revision history [back]

### Make Border and sum

I want to create a border around an image, but only on the bottom and the right, with zeros with the purpose of doing a DFT. I have this piece of code:

cv::Mat computeDFT(cv::Mat image, int optimal_rows, int optimal_cols) {

std::cout << image.rows << " " << image.cols << " " << image.type() << " " << cv::sum(image) << std::endl;

cv::copyMakeBorder(image, padded, 0, optimal_rows - image.rows, 0, optimal_cols - image.cols, cv::BORDER_CONSTANT, cv::Scalar(0));


65 65 6 [1, 0, 0, 0]