O'Reilly logo

Mastering openFrameworks: Creative Coding Demystified by Denis Perevalov

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

Geometrical transformations of images

Here we consider the different kinds of geometrical transformations that change the position of the image's pixel. OpenCV does operations such as image resizing and warping using interpolation that suppress the aliasing effect. Hence, using OpenCV operations is more preferable than custom pixel-by-pixel implementation, except when you implement your own transformation algorithm with antialiasing (which can be tricky), or maybe when you need the aliasing effect. The following is a list of geometrical transformations that are applicable to ofxCv images:

  • The resize( w, h ) function changes the image size to w × h pixels. For example:
    image2 = image;
    image2.resize( image2.width * 0.5, image2.height * 0.5 );

    This ...

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