CvMlData Class Missing

asked Aug 29 '14

updated Aug 29 '14

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?

Preview: (hide)

Comments

1

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

joshua_jorel_lee gravatar imagejoshua_jorel_lee (Aug 29 '14)edit
1

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 (Aug 29 '14)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 (Aug 29 '14)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 (Aug 29 '14)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 (Aug 29 '14)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 (Aug 29 '14)edit

just bookmark the docs ;)

berak gravatar imageberak (Aug 29 '14)edit