O'Reilly logo

Learning OpenCV 3 Application Development by Samyak Datta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image cropping -- basics

For now, we have rotated each face image so that the eyes are horizontally aligned. In this section, we will introduce the next step in the alignment pipeline. We are going to talk about an operation that is very common and ubiquitous with images-cropping. Each one of you, at some point in time, must have used the image cropping feature in one or the other image processing software (Paint, Photoshop, and so on). We are going to show how cropping works in OpenCV.

The cropping operation that we define here is for rectangular image regions. Before we dive into the details, let's try to think for ourselves how such an operation might be defined within the framework of whatever we know about OpenCV. Let's say that you are given ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required