How to compile the Raw Haskell bindings to OpenCV aka GitHub member arjuncomar's OpenCV-Raw repo [closed]

asked 2013-11-14 18:03:58 -0600

joeish80829 gravatar image

updated 2013-11-14 18:06:19 -0600

Arjuncomar states in the OpenCV-Raw at this link "Compilation / Installation

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:

./ <path to opencv headers>


./ /usr/local/include"

I ran './ /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/", line 161, in <module>
   cgen.gen(header_dir, headers, dstdir)
   File "/home/w/Documents/opencv-raw-master/cbits/", line 367, in gen
   self.readHeaders(header_dir, srcfiles)
   File "/home/w/Documents/opencv-raw-master/cbits/", line 350, in readHeaders
   decls = parser.parse(header_dir + hdr)
   File "/home/w/Documents/opencv-raw-master/cbits/",
   line 732, in      parse f = open(hname, "rt")
   IOError: [Errno 2] No such file or directory: '/usr/local/include/opencv2/core.hpp'

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 dont really understand error. Im trying to incoroporate the code arjuncomar wrote in his haskell bindings into my own OpenCV wrapper and I felt this might be a good first step but if I can just make a make file for this code i/e

the cpp file

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

the hpp file

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

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....Im 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...

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-13 04:18:46.347248