read matlab .mat file in opencv
How I can read a matlab .mat file in opencv? I was searching around but I couldn't find something clear. I found a post here plus I know that there is the matlab module here but I couldn't find an example. Does anyone know how to do it.
There is also this post in SO which uses a library from the same person appearing in the first link above and it is quite clear how to use it. However, I would like to know if there is already something embedded in the Opencv library.
Thanks.
may be you can find some answer here
Thanks @LBerger I think I found a solution by using an external library or Matlab's libraries (working on this now). However, I would like to know if it is possible to load a .mat file using only Opencv and if that requires Opencv to be compiled with matlab enabled or without.
Sorry my link doesn't help. Just to say I use to work with scilab and sometime I call scilab form my C++ program and that's another way to access scilab memory without using intermediate file. In matlab you can do something similar in matlab
@LBerger finally I could not manage to make it work even with an external lib, therefore I just transformed the
.mat
file to.csv
and did my job. Using Matlab function has the drawback that you need Matlab installed, and that is not always the case for everyone. Anyways, if anyone knows something that we do not I think it would be helpful to add a solution here for the future.Have you try this module used in scilab?
yes I was playing with this library, because
cvmatio
from the link above seems to be outdated. However, the result matrix was totally something else from what I was expecting no matter what I was trying. Therefore, I gave up since I was also quite time pressed.Hi all, Does anyone have idea about read the .mat file in opencv?