yaml python 3.0
I have to read a YAML file in python using opencv 3.0 . I have found this solution in one of the previous questions but it is not applicable for version 3.0:
yaml_data = numpy.asarray(cv2.cv.Load("my_file.yaml"))
It seems that cv2.cv
has been removed, can anyone tell me where is it now?
cv2.cv
is gone entirely.what are you trying to load ?
Indeed. A colleague of mine has produced some YML using opencv, I have to read them.
any chance, you can remove the yaml headers, and read it in as csv or such ?
sad as it is, you need some gross hack here...
I was hoping not to read this answer... :(
Apparently there is this function:
However it is not clear how to use it: the code I have found here: https://github.com/opencv/opencv/pull/6482 does not work on my system, it keep saying FileStorage has no attribute 'getNode'
indeed then, if you want to use cv2.FileStorage properly, you'd need a version later than the merge date(31 May)
Allright, I am using the release 3.1... Will try with beeding edge version. Thanks