From: Naoto Mizuno Date: Thu, 22 Mar 2018 07:40:06 +0000 (+0900) Subject: Fix center of rotation X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1^2~719^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1b66ffd0168ea6f8b3c4465e5927e343a444ea1;p=platform%2Fupstream%2Fopencv.git Fix center of rotation --- diff --git a/doc/py_tutorials/py_imgproc/py_geometric_transformations/py_geometric_transformations.markdown b/doc/py_tutorials/py_imgproc/py_geometric_transformations/py_geometric_transformations.markdown index ea45180..2af8080 100644 --- a/doc/py_tutorials/py_imgproc/py_geometric_transformations/py_geometric_transformations.markdown +++ b/doc/py_tutorials/py_imgproc/py_geometric_transformations/py_geometric_transformations.markdown @@ -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: