Square matrices have eigenvectors and eigenvalues. Interpreting an image as a matrix usually does not have much sense. What are you trying to accomplish?
The error is saying that the image you are passing should have equal sizes along X and Y dimensions (technically, i and j indexing axes).