Mex file building with Octave (issue with wrappers)

白昼怎懂夜的黑 提交于 2019-12-02 07:57:18

Here are the steps I used to solve the issue of creating the mex files from the Piotr's Computer Vision Matlab Toolbox for Octave (concerns the cpp files of the folder channels only).

The original mex files that come with the toolbox are built for Matlab and do not work with Octave. While building them from Octave a call is made to the file wrappers.hpp. This file has to be modified by adding these two lines at the beginning of the file: #include <stdlib.h> and #include "mex.h".

For building the mex file, in the Octave prompt type (while being in the directory of the cpp file):

mkoctfile --mex -DMATLAB_MEX_FILE the_file.cpp

This way the Octave compatible mex file is created.

Edit 23/05/2017 - After receiving more questions from people having trouble generating these files I released the generated files on Github: https://github.com/Eskapp/Piotr_vision_extrafiles_Octave. Feel free to use them. You'll need to add them manually to the Computer Vision toolbox.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!