How a dictionary is loaded in C++ OpenCV Program?
Suppose, I have a dictionary which is in dot mat file format. This can be loaded in a MATLAB program as show below.
% load dictionary load('Dictionary/D_1024_0.15_5.mat');
Now, I would want to use the same dictionary in C++ based OpenCV program. What will be the equivalent instruction to perform the task?
Thanks in advance.
Helal, TU
you can't read matlab .mat files from opencv. chances will get better, if you're able to save this in some kind of text based format.
Thank you Sir Berak.
However this .mat file is possible to load in python. Is there any useful guide available for converting the .mat file into .txt file & how it is loaded in C++ opencv program?
Mat file is just a binary file. If you know its structure, it's no magic.
What is the C++ instruction for loading the converted .txt file in an OpenCV program ?
Kindly provide a proper C++ instruction for it.
show what you did, and the result, ofc.
You have to adjust the code to suit your needs, there is no generic code. Google opening Matlab files and binary files in C++ - there's a plenty of material in the web. And it doesn't have much to do with openCV by the way, so it's the wrong place to ask these questions.
@KjMag - i whish i could honestly say: "I never had that problem" ;(
Which problem? :D
getting some matlab generated data ito opencv.