如何编译原哈斯克尔绑定的OpenCV又名GitHub的成员arjuncomar的OpenCV的原辅回购 [英] How to compile the Raw Haskell bindings to OpenCV aka GitHub member arjuncomar's OpenCV-Raw repo

查看:109
本文介绍了如何编译原哈斯克尔绑定的OpenCV又名GitHub的成员arjuncomar的OpenCV的原辅回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OpenCV的原辅Arjuncomar状态readme.md在这个链接 HTTPS ://github.com/arjuncomar/opencv-raw/blob/master/README.md

Arjuncomar states in the OpenCV-Raw readme.md at this link https://github.com/arjuncomar/opencv-raw/blob/master/README.md

编译这个包可能是此刻有点棘手,因为我只需要测试它在我的机器上迄今为止的机会。首先,你需要生成的OpenCV的计算机上的型式C包装 - 这个拥有回购仅针对OpenCV的3.0(HEAD)的包装。您可以通过生成这些包装(以及相应的哈斯克尔绑定):

Compiling this package might be a little tricky at the moment since I've only had the chance to test it on my machine so far. First, you need to generate C wrappers for the version of OpenCV on your machine -- this repo holds the wrappers for OpenCV 3.0 (HEAD) only. You can generate these wrappers (and the corresponding Haskell bindings) via:

./setup.sh <path to opencv headers>

例如

./setup.sh /usr/local/include"

我跑'./setup.sh在/ usr /本地/包括',在OpenCV中,原始的根目录下,顺便说一句我安装在Ubuntu莽撞的64位OpenCV的2.4.7,我得到这个错误。

I ran './setup.sh /usr/local/include', in the root directory of Opencv-Raw, btw I have OpenCV 2.4.7 installed on Ubuntu Saucy 64-bit and I get this error

 Traceback (most recent call last):
 File "cbits/genhsc.py", line 161, in <module>
 cgen.gen(header_dir, headers, dstdir)
 File "/home/w/Documents/opencv-raw-master/cbits/genc.py", line 367, in gen
 self.readHeaders(header_dir, srcfiles)
 File "/home/w/Documents/opencv-raw-master/cbits/genc.py", line 350, in readHeaders
 decls = parser.parse(header_dir + hdr)
 File "/home/w/Documents/opencv-raw-master/cbits/hdr_parser.py", line 732, in parse
 f = open(hname, "rt")
 IOError: [Errno 2] No such file or directory: '/usr/local/include/opencv2/core.hpp'

Arjuncomar指出:这个回购协议适用于只OpenCV的3.0(HEAD)的包装。所以我试图找到一个OpenCV的3.0下载,但没有运气,我从来没有见过一个core.hpp文件在/ usr /本地/包括所以并不真正理解错误。我想incoroporate为OpenCV的的C ++接口arjuncomar写在他的哈斯克尔绑定到我自己的OpenCV的包装不同语言的自动生成Ç包装(减去当然Haskell的一部分),我觉得这可能是一个良好的开端,但如果我可以只是做一个make文件为这个codeI / E

Arjuncomar states "this repo holds the wrappers for OpenCV 3.0 (HEAD) only." so I tried to find an OpenCV 3.0 download but no luck and I've never seen a core.hpp file in /usr/local/include so don't really understand error. I'm trying to incoroporate the autogenerated C wrappers for OpenCV's C++ interface arjuncomar wrote in his haskell bindings into my own OpenCV wrapper for a different language (minus the haskell part of course) and I felt this might be a good first step but if I can just make a make file for this code i/e

cpp文件

void cv_imshow(String* winname, Mat* mat) {
    cv::imshow(*winname, *mat);
}

的HPP文件

void cv_imshow(String* winname, Mat* mat);

和期望它成为C ++ OpenCV的code完美的C包装请让我知道......如果更多钞票就如何使这里发布这样一个make文件将大大有助于....我一个链接米,用来在C,但新的C ++ / C ++ makefile和宁愿做这个完美的我第一次尝试这样我就可以输出音量更快速,无需担心犯错误...

and expect it to be a perfect C wrapper for C++ OpenCV code pls let me know...and if posible a link regarding how to make such a make file posted here would aid greatly....I'm used to C but new to C++/ C++ MakeFiles and would rather do this perfect on my first try so I can output volume more quickly without worrying about making an error...

....任何帮助AP preciated ...美好的一天=)给你所有...

....Any help is appreciated...A good day=) to you All...

推荐答案

我发现只是球泡这里阿琼Comars叉 HTTPS ://github.com/arjuncomar/opencv 和绑定将在opencv_generated CPP和HPP文件中自动生成

I found out just buld Arjun Comars fork here https://github.com/arjuncomar/opencv and the bindings will be autogenerated in the opencv_generated cpp and hpp files

这篇关于如何编译原哈斯克尔绑定的OpenCV又名GitHub的成员arjuncomar的OpenCV的原辅回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆