AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() Now to the eigenvalue accuracy, you refer to. You can find a header-only implementation in one of my GitHub repositories: I have used a solver for the general eigenvalue problem for my Fisherfaces implementation in OpenCV, but it isn't exposed to the OpenCV API. So the given matrix has to be symmetric, else you aren't doing an eigenvalue decomposition and the (same goes for a Singular Value Decomposition). The solvers implemented in OpenCV solve the eigenvalue problem for symmetric matrices. The following doesn't apply to your situation, as your matrix is symmetric, I just write it for reference. So v is an eigenvector and cv is an eigenvector as well. Now let us multiply a constant c and we end up having: A(cv) = c(Av) = c(Bv) = B(cv) ![]() Let's recall the eigenvalue problem as: Av = Bv I could throw the math at you, but probably this picture already helps you understanding it (as found on the Wikipedia page on Eigenvalues and Eigenvectors): Multiplying an eigenvector with -1 yields a totally valid eigenvector again. If you don't provide any sample data, it is hard to say what's going on.įirst of all an eigenvector has nothing like a "sign", see that's the whole point of eigenvectors. I thought I turn this into an answer instead of using comments, as I want to avoid confusion for people coming here from Google. If you refere to the MatLab result, the double result are almost same till the 27th and for the float till 14th.Īnd those Image, you have Eigen Vector in order : MatLab, OpenCV Double and OpenCV Float.Īs you can see double matching until 35th and float until 15th.Īnd the sign of the result are differente from Matlab, Double and Float ![]() Here you can see the image of the eigen value. I have already tried the SelfAdjointSolver from the library Eigen.Īnyone have an idea ? Or suggest me something ? Right now I'm using cv:eigen function like this :Ĭv::eigen(oResultMax,oMatValue,oMatVector) I'm totally matching with matlab but randomly have positive or negative value. The result is same as eigen value, lose precision but the problem is with the sign. My eigen value seems good but the vector loses some accuracy for each value ( Ex : value 1 to 25 exactly match with matlab but further you get to 100, more I am losing precision, but I can work with that.)īut the problem is more with the eigen vector. I work with double matrix (CV_64F) to have the best precision as possible (Already tried Float and it fail more). I have a matrix symmetric 100x100 and trying to obtain eigen value and eigen vector from it. The problem is I don't match the result same as my matlab code. ![]() I need to retrieve the eigen vector from a matrix. ![]()
0 Comments
Read More
Leave a Reply. |