The following Matlab code converts a Matrix into it a diagonal and off-diagonal component and performs up to 100 iterations of the Jacobi method or until 蔚step < 1e-5
the source code is writed by the authot, the susan algorithm to detecte the corner linear and many other features. you can use it in your workspace in windows or linux.