PyImageSearch / imutils

A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.
MIT License
4.54k stars 1.03k forks source link

Added borderValue parameter to rotate_bound(). #163

Open datawookie opened 5 years ago

datawookie commented 5 years ago

Hi!

This is such a useful package. I have been rotating images and wanted to have some control over the "extra space" revealed when the image is rotated. This is catered for by the borderValue parameter of the warpAffine() function.

This allows you to specify the "background colour" which is revealed when the image is rotated. By default this is black. Specifying borderValue=(255, 255, 255) will make this new portion of the image white.

Thanks, Andrew.

datawookie commented 5 years ago

Applied same change for rotate().

nkrot commented 4 years ago

this is indeed useful. @jrosebr1 , could you mind merging the pull request?

nellika commented 1 year ago

I find this still a useful addition :)

Toon-nooT commented 1 year ago

Yes, this would proof useful