0

Is there a simple way to convert Octave matrices to/from OpenCV matrices?

There are several relatively complicated answers related to converting matlab matrices to openCV matrices, (including yamlmatlab project that unfortunately requires matlab, and therefore is irrelevant for my purpose)

Nir
  • 1,618
  • 16
  • 24
  • 1
    [Yes, there is](https://www.gnu.org/software/octave/doc/v4.0.3/External-Code-Interface.html). Specifically, you should look into `.oct` files (analogous to MATLAB's MEX). You can also try [this](https://github.com/kyamagu/mexopencv/wiki/Installation-(Windows,-Octave,-OpenCV-3)). – Dev-iL Sep 28 '17 at 08:41
  • @Dev-iL That is exactly what I was looking for, if you put it as an answer I will mark it as solved. – Nir Sep 28 '17 at 08:52
  • A link is not a good answer, just like a question asking us to recommend or find such a link (to a tool, software library, tutorial or other off-site resource) isn't good for SO. Feel free to write a community-wiki self-answer with the information that helped you. In the future please follow [ask] to avoid negative votes and closure. – Dev-iL Sep 28 '17 at 09:05
  • There's a library purporting to provide [OpenCV bindings for octave](http://octave-swig.sourceforge.net/octave-opencv.html), have you come across this? Also, if you're willing to use a middleman, python supports both cv and mat files, so you could easily do your transformation in from cv to .mat in python (via an octave system call if necessary, or even octave's builtin `python` command). – Tasos Papastylianou Sep 28 '17 at 12:37
  • 1
    @Dev-iL in general I would agree with the "no recommendations" comment, but in this case OP wasn't specifically asking for one. It just happens that your answer is of the recommendation kind. It would be a shame to "rhoomba" this question for that reason alone, I think it's a useful / interesting question. – Tasos Papastylianou Sep 28 '17 at 12:43

0 Answers0