First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered May 27 '13

rics gravatar image

You can use the [copyMakeBorder](http://docs.opencv.org/modules/imgproc/doc/filtering.html#void copyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, const Scalar& value) function. Border size can be set independently in each direction. Border type can be BORDER_CONSTANT with a black border value scalar.