New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert mat model to opencv storage xml/yaml model #14
Comments
@vrabaud I just noticed the conversion is in ModelTransfer.cpp but I can't compile it without MatlabIO. I probably will try to do the conversion using matio. Is it possible for someone to send me a model in both formats so I can check my result is correct? |
Not sure we have models around with both format. Why not use the cvmatio by @hbristow ? |
cvmatio depends on MatlabIO.hpp (which I don't currently have). I assumed this was included in Matlab but I could be wrong... Can someone generate a model in mat format and convert it, if they have compiled ModelTransfer.cpp with MatlabIO enabled? |
I just realized that MatlabIO is provided by cvmatio. Ooops! cvmatio probably should be a submodule of this project or perhaps just use matio because it supports a wider range of matlab formats such as hdf. |
Glad you found it :) H On 03/04/2013, at 8:40 AM, Tim Sheerman-Chase notifications@github.com wrote:
|
@hbristow I have trained a model based on the buffy stickmen data using octave and I have saved it in matlab v7 format. I am using cvmatio to open the file but it doesn't deserialise correctly. It appears that the call to name_ = cvmatio.findstd::string(variables, "name"); in MatlabIO.cpp line 84 throws an exception. Any ideas on what to check? Does cvmatio support octave exported matlab v7 files? Model: http://www.sheerman-chase.org.uk/temp/buffy_model_v7.mat Tim |
I found I made a mistake in converting the file in octave to v7. Problem solved! Model is convertible. |
@hbristow i am converting .mat file into opencv style using opencv 3.0 and i am getting this |
I have compiled PartsBasedDetector without MatlabIO. This can only read models with xml or yaml format. The model training_demo.m code (which I run in octave) saves the model as mat format.
model = trainmodel(name,pos,neg,K,pa,sbin);
save('Demo_model.mat', 'model', 'pa', 'sbin', 'name');
There does not seem to be a clear way to covert from .mat to .xml, or am I missing something?
Has matio been considered to read models in C++? http://sourceforge.net/projects/matio/
Regards,
Tim
The text was updated successfully, but these errors were encountered: