Coder Social home page Coder Social logo

hbristow / cvmatio Goto Github PK

View Code? Open in Web Editor NEW
67.0 67.0 35.0 6.46 MB

Matlab Mat file read and write C++ class with OpenCV bindings. Matlab is used a lot in computer vision, and people often share Matlab code or data in Mat-file storage. This small project gives OpenCV users the ability to read and write Mat files natively in C++

License: BSD 3-Clause "New" or "Revised" License

C++ 95.31% CMake 4.69%

cvmatio's People

Contributors

hbristow avatar vrabaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cvmatio's Issues

BSD license request

There is no explicit license for this project. Can you create a BSD license?

Write Matlab files

Hi,
I gave a look to the code and it seems that there is not a method to write the .mat file. Am I wrong?

Thanks,
Cheers,
iacopo

Error when build to link np_opencv_converter.so

[ 60%] Linking CXX executable test_cvmatio                                   
/usr/bin/ld: cannot find -lopencv_dep_cudart                                 
collect2: error: ld returned 1 exit status                                   
CMakeFiles/test_cvmatio.dir/build.make:146: recipe for target 'test_cvmatio' 
failed                                                                       
make[2]: *** [test_cvmatio] Error 1                                          
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/test_cvmatio.dir/all' 
failed                                                                       
make[1]: *** [CMakeFiles/test_cvmatio.dir/all] Error 2                       
Makefile:127: recipe for target 'all' failed                                 
make: *** [all] Error 2 

It seems that the reason is -lopencv_dep_cudart, so how can I remove this compile option? Or is there any method that I could seccussfully build this project?
Thank you very much!

Integrating with OSS-Fuzz

Greetings cvmatio developers and contributors,

We’re reaching out because your project is an important part of the open source ecosystem, and we’d like to invite you to integrate with our fuzzing service, OSS-Fuzz. OSS-Fuzz is a free fuzzing infrastructure you can use to identify security vulnerabilities and stability bugs in your project. OSS-Fuzz will:

  • Continuously run at scale all the fuzzers you write.
  • Alert you when it finds issues.
  • Automatically close issues after they’ve been fixed by a commit.

Many widely used open source projects like OpenSSL, FFmpeg, LibreOffice, and ImageMagick are fuzzing via OSS-Fuzz, which helps them find and remediate critical issues.

Even though typical integrations can be done in < 100 LoC, we have a reward program in place which aims to recognize folks who are not just contributing to open source, but are also working hard to make it more secure.

We want to stress that anyone who meets the eligibility criteria and integrates a project with OSS-Fuzz is eligible for a reward.

If you're not interested in integrating with OSS-Fuzz, it would be helpful for us to understand why—lack of interest, lack of time, or something else—so we can better support projects like yours in the future.

If we’ve missed your question in our FAQ, feel free to reply or reach out to us at [email protected].

Thanks!

Zhicheng and Tommy
OSS-Fuzz Team

'std::exception*'

When I run this code the next error comes out:

include <stdlib.h>

include <stdio.h>

include "matio.h"

include "opencv2/core/core.hpp"

include "opencv2/features2d/features2d.hpp"

include "opencv2/highgui/highgui.hpp"

include "opencv2/nonfree/features2d.hpp"

include "opencv2/nonfree/nonfree.hpp"

include <opencv2/ml/ml.hpp>

include

include "/home/rahim/Desktop/cvmatio-master/include/MatlabIO.hpp"

include "/home/rahim/Desktop/cvmatio-master/include/MatlabIOContainer.hpp"

using namespace std;

char * filename = new char[100];
using namespace cv;
using namespace std;

int
main(int argc,char **argv)
{
// load the MATLAB MAT file
MatlabIO matio;
//bool ok = matio.open("/home/rahim/workspace/svm/bin_train_y.mat", "r");
bool ok = matio.open("/home/rahim/Desktop/cvmatio-master/test.mat", "r");
if (!ok) return -1;

// read all of the variables in the file
std::vector<MatlabIOContainer> variables;
variables = matio.read();
matio.close();

// load the matrix by name in OpenCV style
cv::Mat basis = matio.find<cv::Mat>(variables, "B");
//cout << basis;

}

include <stdlib.h>

include <stdio.h>

include "matio.h"

include "opencv2/core/core.hpp"

include "opencv2/features2d/features2d.hpp"

include "opencv2/highgui/highgui.hpp"

include "opencv2/nonfree/features2d.hpp"

include "opencv2/nonfree/nonfree.hpp"

include <opencv2/ml/ml.hpp>

include

include "/home/rahim/Desktop/cvmatio-master/include/MatlabIO.hpp"

include "/home/rahim/Desktop/cvmatio-master/include/MatlabIOContainer.hpp"

using namespace std;

char * filename = new char[100];
using namespace cv;
using namespace std;

int
main(int argc,char **argv)
{
// load the MATLAB MAT file
MatlabIO matio;
//bool ok = matio.open("/home/rahim/workspace/svm/bin_train_y.mat", "r");
bool ok = matio.open("/home/rahim/Desktop/cvmatio-master/test.mat", "r");
if (!ok) return -1;

// read all of the variables in the file
std::vector<MatlabIOContainer> variables;
variables = matio.read();
matio.close();

// load the matrix by name in OpenCV style
cv::Mat basis = matio.find<cv::Mat>(variables, "B");
//cout << basis;

}

include <stdlib.h>

include <stdio.h>

include "matio.h"

include "opencv2/core/core.hpp"

include "opencv2/features2d/features2d.hpp"

include "opencv2/highgui/highgui.hpp"

include "opencv2/nonfree/features2d.hpp"

include "opencv2/nonfree/nonfree.hpp"

include <opencv2/ml/ml.hpp>

include

include "/home/rahim/Desktop/cvmatio-master/include/MatlabIO.hpp"

include "/home/rahim/Desktop/cvmatio-master/include/MatlabIOContainer.hpp"

using namespace std;

char * filename = new char[100];
using namespace cv;
using namespace std;

int
main(int argc,char **argv)
{
// load the MATLAB MAT file
MatlabIO matio;
//bool ok = matio.open("/home/rahim/workspace/svm/bin_train_y.mat", "r");
bool ok = matio.open("/home/rahim/Desktop/cvmatio-master/test.mat", "r");
if (!ok) return -1;

// read all of the variables in the file
std::vector<MatlabIOContainer> variables;
variables = matio.read();
matio.close();

// load the matrix by name in OpenCV style
cv::Mat basis = matio.find<cv::Mat>(variables, "B");
//cout << basis;

}

error: terminate called after throwing an instance of 'std::exception*'

Any possibility of Mat-file 7.3 support?

Is there any desire to support Mat-file version 7.3 (w/ hdf5)? If so, I would be interested.

It seems like a great solution for storing large amounts of data for OpenCV, since FileStorage does not support binary storage, and Mat-files < 7.3 are capped at 2 GB I believe.

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.