2

I ran this openCV command to get a perspective transformation matrix:
projective_matrix = cv2.getPerspectiveTransform(src_points, dst_points)
The output (projective_matrix):

[[  0.35330902  -0.20574606 222.        ]
[  0.           0.12791606   0.        ]
[  0.          -0.00036575   1.        ]]

I'm trying to perform this transformation on a web-page in css without success, I tried using these two css properties:

  1. transform: matrix(a, b, c, d, tx, ty) but maybe by the documintation it doesn't have projective vectors (it treats it as 0)
  2. transform: matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4) I'm not able to get the variables right.
user2401856
  • 468
  • 4
  • 8
  • 22
  • Have you tried with all `4` and `d` indices equal to zero? – BehRouz Aug 30 '22 at 23:49
  • did you mean to set a4, b4, c4, d1, d2, d3, d4 equal 0? like this? `transform: matrix3d(0.35330902, 0, 0, 0, -0.20574606, 0.12791606, -0.00036575, 0, 222, 0, 1, 0, 0, 0, 0, 0)` that didn't work (i can't even see the webpage, also after replacing transY which is 222 to 0) – user2401856 Aug 31 '22 at 00:12

0 Answers0