In this tutorial, I’ll walk you through how one can scale and rotate a contour based on OpenCV Python API

Follow along, if you want to understand what’s the simple idea behind the implementation.

Why?

Why would one want to scale or rotate a contour of objects in an image? For me, I had a very similar problem as this StackOverflow question.

I had to scale down the output of an Image Segmentation deep learning model for a specific class, to tightly fit the object of that class. Basically a post processing step for my deep learning model.

I am not…

NVS Abhilash

I work as a Data Scientist at Genpact. I am a deep learning enthusiast and always looking for opportunities to work on exciting projects and learn from others.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store