1 | initial version |
Algebraically, both will give the same results when the matrix is singular (or not). (2) is actually a stronger and probably better measure of quality, though you'd have to verify that the largest eigen-value isn't too small too.
OpenCV supports SVD.