

In general, you’ll want to preserve the images’ aspect ratio when resizing - especially if these images are presented as output to the user.

They have been resized by ignoring the ratio of the width to the height of the image. And on the right, we have two images that have been distorted by not preserving the aspect ratio. Ignoring the aspect ratio can lead to resized images that look compressed and distorted:įigure 1: Ignoring the aspect ratio of an image can lead to resized images that look distorted, squished, and crunched.

When resizing an image, it’s important to keep in mind the aspect ratio - which is the ratio of an image’s width to its height. You can start by choosing your own datasets or using our PyimageSearch’s assorted library of useful datasets.īring data in any of 40+ formats to Roboflow, train using any state-of-the-art model architectures, deploy across multiple platforms (API, NVIDIA, browser, iOS, etc), and connect to applications or 3rd party tools. Sign up or Log in to your Roboflow account to access state of the art dataset libaries and revolutionize your computer vision pipeline.
#Image resize aspect ratio calculator free
Roboflow has free tools for each stage of the computer vision pipeline that will streamline your workflows and supercharge your productivity. This prepares us to handle images of different sizes in real-world applications. Scaling, or simply resizing, is the process of increasing or decreasing the size of an image in terms of width and height.Ī dataset with diverse image sizes and dimensions is beneficial in understanding the function and effects of the cv2.resize function in OpenCV.
