Ask Your Question

Output view full of translated image

asked 2018-12-18 08:01:01 -0500

Hello. I want to translate an image and I want to have full view of the output. To be more precise, I want to translate this image description

to this image description

How can this be done in opencv?

Thank you in advance

edit retag flag offensive close merge delete


this is also a good tutorial how to translate and rotate images correctly

VxW gravatar imageVxW ( 2018-12-18 10:15:43 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-12-18 08:11:12 -0500

berak gravatar image

updated 2018-12-18 08:12:10 -0500

just add a border:

Mat src = ...
Mat dst;
copyMakeBorder(src, dst ,0, 10, 50, 0, BORDER_CONSTANT, Scalar::all(255));
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-12-18 08:01:01 -0500

Seen: 203 times

Last updated: Dec 18 '18