Coder Social home page Coder Social logo

Comments (7)

jklontz avatar jklontz commented on July 19, 2024 1

Sounds good. I think the approach should be to extend $br -convert to allow conversion to/from the other supported matrix formats (.mtx, .csv). Sounds like Matlab also uses the .mtx extension for a binary matrix? Is there another extension we could use to distinguish between the current .mtx format and the matlab format? Like .mat?

from openbr.

jklontz avatar jklontz commented on July 19, 2024

Actually, step 0 should be to add it to plugins/format.cpp. See csvFormat for an example.

from openbr.

bklare-zz avatar bklare-zz commented on July 19, 2024

I think the approach should be to extend $br -convert to allow conversion to/from the other supported matrix formats (.mtx, .csv).

Agreed.

Sounds like Matlab also uses the .mtx extension for a binary matrix? Is there another extension we could use to distinguish between the current .mtx format and the matlab format? Like .mat?

Matlab files to store binaries of objects (e.g., a matrix) have a default extension of .mat (so, good guess). The file structure is at the link below. I am not sure if there already exists a Qt-based implementation of this this format. If not, we should definitely code it into a -convert command.

In the meantime we can use the matlab functions loadMat() and saveMat() for a weaker amount of matlab support.

http://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf

from openbr.

jklontz avatar jklontz commented on July 19, 2024

Matlab matrices are now first class citizens in OpenBR. The newly added formats are .mat (as described in matfile_format.pdf) and .bin (simple binary format).

You can use br -convert input_file output_file to convert to/from matricies with any of the following formats:

  • .bin
  • .csv
  • .mat
  • .mask
  • .mtx
  • .jpg/.png/...

This should obviate the need for loadMat() and saveMat().

Relevant code is in sdk/plugins/format.cpp

from openbr.

bklare-zz avatar bklare-zz commented on July 19, 2024

Bravo sir! Looks very elegant too!

from openbr.

bklare-zz avatar bklare-zz commented on July 19, 2024

An update on how to use this command: br -convert Format input_file output_file

from openbr.

jklontz avatar jklontz commented on July 19, 2024

for example:
br -convert Format myScores.mtx myScores.mat
or
br -convert Gallery myTemplates.gal myTemplateMetadata.csv

from openbr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.