Merge pull request #11134 from not522:fix-rotation-center

pull/11305/head
Alexander Alekhin 7 years ago
commit d9f720a679
  1. BIN
      doc/py_tutorials/py_imgproc/py_geometric_transformations/images/rotation.jpg
  2. 3
      doc/py_tutorials/py_imgproc/py_geometric_transformations/py_geometric_transformations.markdown

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 24 KiB

@ -90,7 +90,8 @@ below example which rotates the image by 90 degree with respect to center withou
img = cv.imread('messi5.jpg',0)
rows,cols = img.shape
M = cv.getRotationMatrix2D((cols/2,rows/2),90,1)
# cols-1 and rows-1 are the coordinate limits.
M = cv.getRotationMatrix2D(((cols-1)/2.0,(rows-1)/2.0),90,1)
dst = cv.warpAffine(img,M,(cols,rows))
@endcode
See the result:

Loading…
Cancel
Save