How to determine if an affine transformation would cause reflection?

550 Views Asked by At

I have a list of affine transformation matrices and I want to write a code to delete the transformation matrices that applying them on an image would cause reflection. after seeing this image in Wikipedia I get the intuition that if

mat[1][1]*mat[2][2] < 0

then the matrix should be deleted. but in some cases this test fails: link to image

so what is the correct way to do this test?

1

There are 1 best solutions below

0
On BEST ANSWER

Calculate the determinant and if it's negative, then there's a reflection. The determinant for a 2x2 matrix $$\left(\begin{array}{ccc}a & b \\ c & d \end{array}\right)$$ is $ad-bc$.