nakkaya / vision

OpenCV wrapper for Clojure
http://nakkaya.com/vision.html
132 stars 17 forks source link

OpenCV 2.4.5 #8

Open hellonico opened 11 years ago

hellonico commented 11 years ago

Trying to run the samples running OSX Mountain Lion and installed opencv through homebrew. I can get the library to compile no problem:

[niko@Modrzyks-MacBook-Pro-2][13:18][~/projects/vision/resources/lib/] % make            
[ 50%] Built target calibrate_cam
[100%] Built target vision

But none of the example is working. I got them running last year's summer, that seems ages ago :)

Anyway, any idea where to start looking ? Writing a short article right now, and one part was to introduce briefly vision.

nakkaya commented 11 years ago

Does it crash? Does it print any sort of info as to what went wrong?

hellonico commented 11 years ago

Sorry, I thought I did send the stack trace but I did not. Here it comes: Yes it crashes the REPL :|

user=> (load-file "resources/examples/segmentation.clj") OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize, file /tmp/opencv-HweD/opencv-2.4.5/modules/core/src/array.cpp, line 1238 libc++abi.dylib: terminate called throwing an exception Exception in thread "Thread-2" java.net.SocketException: The transport's socket appears to have lost its connection to the nREPL server transport.clj:95 clojure.tools.nrepl.transport/bencode[fn] transport.clj:95 clojure.tools.nrepl.transport/bencode[fn] transport.clj:42 clojure.tools.nrepl.transport/fn-transport[fn] core.clj:1836 clojure.core/binding-conveyor-fn[fn] AFn.java:18 clojure.lang.AFn.call FutureTask.java:303 java.util.concurrent.FutureTask$Sync.innerRun FutureTask.java:138 java.util.concurrent.FutureTask.run ThreadPoolExecutor.java:895 java.util.concurrent.ThreadPoolExecutor$Worker.runTask ThreadPoolExecutor.java:918 java.util.concurrent.ThreadPoolExecutor$Worker.run Thread.java:680 java.lang.Thread.run Bye for now!clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 134} at clojure.core$ex_info.invoke(core.clj:4327) at leiningen.core.eval$fn__1963.invoke(eval.clj:213) at clojure.lang.MultiFn.invoke(MultiFn.java:231) at leiningen.core.eval$eval_in_project.invoke(eval.clj:283) at leiningen.repl$start_server.invoke(repl.clj:117) at leiningen.repl$server$fn4421.invoke(repl.clj:173) at clojure.lang.AFn.applyToHelper(AFn.java:159) at clojure.lang.AFn.applyTo(AFn.java:151) at clojure.core$apply.invoke(core.clj:617) at clojure.core$with_bindingsSTAR.doInvoke(core.clj:1788) at clojure.lang.RestFn.invoke(RestFn.java:425) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.core$apply.invoke(core.clj:621) at clojure.core$bound_fnSTAR$fn4102.doInvoke(core.clj:1810) at clojure.lang.RestFn.invoke(RestFn.java:397) at clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Thread.java:680)

hellonico commented 11 years ago

display webcam spit out:

OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /tmp/opencv-HweD/opencv-2.4.5/modules/highgui/src/grfmt_base.cpp, line 131 libc++abi.dylib: terminate called throwing an exception

hellonico commented 11 years ago

Got another one, but similar exception, when loading "window_listener.clj"

OpenCV Error: Bad argument (Unknown array type) in cvarrToMat, file /tmp/opencv-HweD/opencv-2.4.5/modules/core/src/matrix.cpp, line 698

nakkaya commented 11 years ago

Is it possible for you to test it with 2.3?

hellonico commented 11 years ago

I just tried with 2.3.1 to no avail:

user=> (load-file "src/segmentation.clj") OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize, file /tmp/homebrew-opencv-2.3.1a-3fAT/OpenCV-2.3.1/modules/core/src/array.cpp, line 1238 libc++abi.dylib: terminate called throwing an exception

hellonico commented 11 years ago

Ha .. finally managed to get the C part of the stack trace:

Thread 22 Crashed:: Java: nREPL-worker-1 0 libsystem_kernel.dylib 0x00007fff8bd5c212 pthread_kill + 10 1 libsystem_c.dylib 0x00007fff96dd0af4 pthread_kill + 90 2 libsystem_c.dylib 0x00007fff96e14dce abort + 143 3 libc++abi.dylib 0x00007fff8bd27a17 abort_message + 257 4 libc++abi.dylib 0x00007fff8bd253c6 default_terminate() + 28 5 libobjc.A.dylib 0x00007fff926af887 _objc_terminate() + 111 6 libc++abi.dylib 0x00007fff8bd253f5 safe_handler_caller(void (*)()) + 8 7 libc++abi.dylib 0x00007fff8bd25450 std::terminate() + 16 8 libc++abi.dylib 0x00007fff8bd265b7 cxa_throw + 111 9 libopencv_core.2.3.1.dylib 0x00000001104e58b4 cv::error(cv::Exception const&) + 319 10 libopencv_core.2.3.1.dylib 0x00000001103cbf24 cvGetSize + 221 11 libvision.dylib 0x000000010b350dff convert_color + 143 12 jna634321767846743456.tmp 0x000000010b21113c ffi_call_unix64 + 76 13 jna634321767846743456.tmp 0x000000010b210c8c ffi_call + 492 14 jna634321767846743456.tmp 0x000000010b2076b0 dispatch + 528 15 jna634321767846743456.tmp 0x000000010b207ffc Java_com_sun_jna_Function_invokePointer + 28

nakkaya commented 11 years ago

Sorry for the late reply, I was out of town for a while. I no longer have access to a OS X box. I just compiled vision on two Linux boxes (Both ubuntu one with 2.3 one with 2.4). I can load the examples just fine.

razum2um commented 9 years ago

@hellonico any progress you forget to mention? I'm currently have the same error on macos 10.9, opencv 2.4.9

m9dfukc commented 9 years ago

Hey, also interested in the current progress as im suffering the same issues.

t3chnoboy commented 9 years ago

I have the same issue. OS X 10.10, OpenCV 2.4.10.1

pjreddie commented 8 years ago

Also have this issue, OS X 10.10.3, OpenCV 2.4.11