Use Filestorage in Python

I exported some matrices and double arrays in C++ using cv::Filestorage. I can load the matrices just fine, but nowhere can I find any documentation about cv2.Filestorage. I have no idea how to read the arrays. I have tried reading them elementwise with

for i in range(node.size()):

but FileNode has no attribute float(). I can’t find any way to get the number out of the filenode. node.type() does return FLOAT, so it is read correctly I assume.


object_methods = [method_name for method_name in dir(node) if callable(getattr(node, method_name))]

I managed to find out that the correct method is real(). I really would wish that this was documented anywhere

it is