Affine Transformations & Perspective transformations

Source: Internet
Author: User
Tags cos sin

The image processing mainly involves two kinds of geometric transformations: affine transformation and perspective transformation.

Sec1. Affine transformations
Affine transformations describe the transformation operations under two-dimensional coordinates, including: translation (translation), rotation (Rotation), scaling (scale), flip (flip), Error-cutting (Shear), each of which can be represented as a matrix form. In particular, the image after affine transformation, the original line and parallel lines, affine transformation is still straight lines and parallel lines.

Translation Transformation
[X′y′]=[1001txty][xy] \left[\begin{matrix} x ' \\y ' \end{matrix}\right] = \left[\begin{ Matrix} 1&0&t_x \ 0&1&t_y \ \end{matrix}\right] \left[\begin{matrix} x \\y \end{matrix}\right]
Rotation transform (counterclockwise rotation around Origin Θ\theta)
[X′y′]=[cos (θ) sin (θ) −sin (θ) cos (θ)][xy] \left[\begin{matrix} x ' \ \ y ' \end{ Matrix}\right] = \left[\begin{matrix} cos (\theta) &-sin (\theta) \ sin (\theta) &cos (\theta) \ \end{matrix}\ Right] \left[\begin{matrix} x \\y \end{matrix}\right]
Zoom transform
[X′y′]=[sx00sy][xy] \left[\begin{ Matrix} x ' \\y ' \end{matrix}\right] = \left[\begin{matrix} s_x&0 \ 0&s_y \\\end{matrix}\right] \left[\begin{ Matrix} x \ y \end{matrix}\right]
Flip Transform (take x-axis rollover transformation as an example)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.