Geometric transformations

We will now start with some of the most important geometric transformations and then learn about color spaces and how they are converted to each other along with some of the widely used non-geometric (or miscellaneous) transformations. So, here they are:

  • resize: This function can be used to resize an image. Here's an example of how it's used:
        // Resize to half the size of input image 
        resize(inMat, outMat, 
        Size(), // an empty Size 
        0.5, // width scale factor 
        0.5, // height scale factor 
        INTER_LANCZOS4); // set the interpolation mode to Lanczos 
 
        // Resize to 320x240, with default interpolation mode 
        resize(inMat, outMat, Size(320,240)); 
  • warpAffine: This function can be used to perform an affine transformation. You ...

Get Computer Vision with OpenCV 3 and Qt5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.