Ask Your Question

Revision history [back]

you need to expand borders of your input image after loading it.

like the line below ( c++ )

copyMakeBorder(img, img, img.cols / 2, img.cols / 2, img.rows / 2, img.rows / 2, BORDER_REPLICATE);