Reader small image

You're reading from  iOS Application Development with OpenCV 3

Product typeBook
Published inJun 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781785289491
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Joseph Howse
Joseph Howse
author image
Joseph Howse

Joseph Howse lives in a Canadian fishing village, where he chats with his cats, crafts his books, and nurtures an orchard of hardy fruit trees. He is President of Nummist Media Corporation, which exists to support his books and to provide mentoring and consulting services, with a specialty in computer vision. On average, in 2015-2022, Joseph has written 1.4 new books or new editions per year for Packt. He also writes fiction, including an upcoming novel about the lives of a group of young people in the last days of the Soviet Union.
Read more about Joseph Howse

Right arrow

Understanding transformations


After we detect two faces and before we blend them, we will try to align the faces based on the eye and nose coordinates. This alignment step is a geometric transformation, which remaps points (or pixels) from one space to another. For example, the following geometric operations are special cases of a transformation:

  • Translation: This moves the points laterally. It repositions them around a new center.

  • Rotation: This spins the points around a center.

  • Scale: This moves the points farther from or nearer to a center.

Mathematically, a transformation is a matrix and a point (or pixel position) is a vector. We can multiply them together to apply the transformation to the point. The output of the multiplication is a new point.

Conversely, given three pairs of points—in our case, the pairs of left eye centers, right eye centers, and nose tips—we can solve for the transformation matrix that maps one set of points onto the other. This is a problem of linear algebra. After...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
iOS Application Development with OpenCV 3
Published in: Jun 2016Publisher: PacktISBN-13: 9781785289491

Author (1)

author image
Joseph Howse

Joseph Howse lives in a Canadian fishing village, where he chats with his cats, crafts his books, and nurtures an orchard of hardy fruit trees. He is President of Nummist Media Corporation, which exists to support his books and to provide mentoring and consulting services, with a specialty in computer vision. On average, in 2015-2022, Joseph has written 1.4 new books or new editions per year for Packt. He also writes fiction, including an upcoming novel about the lives of a group of young people in the last days of the Soviet Union.
Read more about Joseph Howse