Image processing-about pixel coordinate matrix transformation (translation, rotation, scaling, miscutting), image processing Matrix
The coordinate transformation matrix is a 3*3 matrix used to perform coordinate changes on the image and transfer the original coordinate point to the new coordinate point, because an image is composed of a dot matrix and color information at each point, the conversion of the sitting mark is to move each point to form a new image. Specifically, this matrix can be used to zoom in, zoom out, move, rotate, pivot, and twist an image.
The x '= xcos θ −ysin θ and y are used to rotate the θ degrees counterclockwise around the origin. '= Xsin θ + ycos θ
See Code: http://download.csdn.net/detail/jarlen/8564513
- Implementation in Android
The Matrix class can be found. In fact, the matrix class itself provides many similar methods. We only need to call them.
SetScale (float sx, float sy, float px, float py) amplification
SetSkew (float kx, float ky, float px, float py) skew
SetTranslate (float dx, float dy) Translation
SetRotate (float degrees, float px, float py) Rotation