简体   繁体   English

加载 numpy .npy 文件 Opencv C++

[英]Load numpy .npy files Opencv C++

I am trying to load data saved from python as .npy files in Opencv C++.我正在尝试加载从 python 保存的数据作为 Opencv C++ 中的 .npy 文件。 I found about Filestorage XML/YML in Opencv, but is there a direct way to do that ?我在 Opencv 中找到了 Filestorage XML/YML,但有直接的方法吗?

Regards SMW问候 SMW

There is a C++ .npy reader at https://github.com/rogersce/cnpy https://github.com/rogersce/cnpy上有一个C ++ .npy阅读器

.npy is documented at https://github.com/numpy/numpy/blob/master/doc/neps/npy-format.txt should you want to know how write your own (doesn't look like a big job). 如果您想知道如何编写自己的.npy文件, 访问https://github.com/numpy/numpy/blob/master/doc/neps/npy-format.txt (看起来并不大)。

I know i am late but you can use xtensor to load and save npy files我知道我迟到了,但您可以使用 xtensor 加载和保存 npy 文件

docs 文档

github github

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM