opencv add padding

I was surprised that this function was so difficult to find.  I googled with the title of this post and did not find any real solution to what I was looking for.  I just want to add some pixels of padding to my image.  With this post I hope to make life a bit easier for ppl that are looking to do the same.

The function you are looking for is cv::copyMakeBorder :)

Advertisement

About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in opencv. Bookmark the permalink.

1 Response to opencv add padding

  1. arunirc says:

    Life became a LOT easier. I just hope this post manages to climb a bit higher on the Google search hits. Thanks anyways.
    Doing it by hand-coding kinda takes away the whole point of using an optimized library.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s