Get (x,y) of point after rotation in image (python,openCV) -


i want find coordination of point after rotating rotation matrix in opencv? there anyway find multiply point in rotating matrix? (the point confusing in opencv rotation matrix 2*3 not 2*2 i'm little confused that)

thanks in advance

let me see if have got question right. have point (x,y) subjected rotation. want find new (x,y).

to , can use perspective transform available in opencv. cv2.perspectivetransform() function accepts numpy array original points , numpy array transformation matrix , return numpy array transformed points.

check link details regarding function .perspective transform.

your transformation matrix should 3x3 matrix in case.

a1 a2 a3
a4 a5 a6 > take transformation matrix
a7 a8 a9

a1,a2,a4,a5 rotation matrix in case.
set a3,a6,a7,a8 0
set a9 1

this should it.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -