1

I want to resize images but keep the aspect ratio with them (and also the white background).I'm working with Python and OpenCV. For example, I want my image like this to become like this

  • 1
    Possible duplicate of [Resize an image without distortion OpenCV](https://stackoverflow.com/questions/44650888/resize-an-image-without-distortion-opencv) – Sam Craig May 24 '18 at 18:04
  • you do not keep the aspect ratio of your image. Do you want to add a border or do you want to resize until the maximum size with original aspect ratio is reached and add border afterwards to fit the target size? – Micka May 25 '18 at 17:53

1 Answers1

0

You should go for 'making borders for images' section in this link padding Implement white border with hit and trial and you will get your desired aspect ratio

Axecalever
  • 69
  • 5