CvMlData Class Missing

asked 2014-08-29 08:23:32 -0500

updated 2014-08-29 08:29:42 -0500

I recently installed OpenCV for use with Java on my Mac. I need to import a csv file to a matrix. However, I can't seem to find the CvMlData class where it contains the method read_csv. I have also installed OpenCV for Android and even there, CvMlData seems to be missing. Does anybody know where it can be found?

edit retag flag offensive close merge delete



Update: There is no wrapper for this class in Java.

joshua_jorel_lee gravatar imagejoshua_jorel_lee ( 2014-08-29 08:30:34 -0500 )edit

oh, sorry, i should have been more explicit before, even looked it up - see, it's lacking CV_EXPORTS_W, so it won't be exposed to scripting. (this is probably due to the old c-style datatypes it is using, so probably noone will fix it)

again, apologies for sending you onto the wrong path ;(

berak gravatar imageberak ( 2014-08-29 08:39:39 -0500 )edit

basically since in 3.0 the old ML is dropped altogether, there will indeed be no wrapper provided in older versions...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-29 08:53:56 -0500 )edit

berak - no worries. So there's really no way to import a csv file into a matrix? I'm not really good with C++, so I'm not quite sure what to make of the documentation. It's actually my first time using it.

StevenPuttemans - I'm using the old 2.4.9 API. I'm not really sure how it's used though.

joshua_jorel_lee gravatar imagejoshua_jorel_lee ( 2014-08-29 11:46:10 -0500 )edit

clarify, if you really want to do that in c++.

if you can read the csv in java into an array, you can do new Mat(h,w,type); and the put() the array.

berak gravatar imageberak ( 2014-08-29 11:51:44 -0500 )edit

Oh I see. So what you're suggesting is to just read the csv file from Java then transfer it to a matrix? Well, that would simplify things a lot. I'm not sure why I didn't think of that. Thanks! :D

joshua_jorel_lee gravatar imagejoshua_jorel_lee ( 2014-08-29 11:55:21 -0500 )edit

just bookmark the docs ;)

berak gravatar imageberak ( 2014-08-29 12:02:43 -0500 )edit