Saving trained model using surface_matching algorithm

asked 2018-09-30 14:04:24 -0600

moncio gravatar image

Hi to all the community.

I'm beginner in this fantastic world about OpenCV. I'm making a simple app to estimate the pose of object 3D inside a scene. Reading all the extra modules, I realized "surface matching" module just make this function. Reviewing the code, i have the next doubt: I'm realizing when I'm running th this sample script: (, the model is trained but none "file" (as XML, DAT or anyway extension) is saved for next poses detection of the model inside the scene. Threre several properties and mats which is saved inside a object called "detection" apart of the of hash_table and I'm not able to save whole mandatory information in any kind of file in disk. Every execution, I need to train the model to obtain the result, so my question is simple. Is there any option to serialize the trained model on disk to use it then for poses detection?

I'm using latest version of OpenCV -> 3.4.3 compiled against VS2017 using Windows 10

Thanks in advance.

edit retag flag offensive close merge delete


i'm afraid, you're a bit on your own here. whild pose3d has some serialization builtin, you'll have to write your own for anything else you need to save / load.

berak gravatar imageberak ( 2018-10-01 02:54:11 -0600 )edit

I'm trying some serialization functions included in this, to serialize hash table in a format file but this methods don`t working to me when I deserialize (Memory issues).

moncio gravatar imagemoncio ( 2018-10-01 07:14:40 -0600 )edit

ah right. didn't even see it.

the whole thing also has a couple of issues

berak gravatar imageberak ( 2018-10-01 07:20:24 -0600 )edit