views:

496

answers:

4

Hi,

I've tried to user HandVU with OpenCV but when I tried to run "hvOpenCV config/default.conductor" I get a "Segmentation fault". Anybody know this problem?

macbook:handvu-beta3 User$ hvOpenCV config/default.conductor 
will load conductor from file:
config/default.conductor
Segmentation fault

I installed OpenCV through http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port on Mac OS X 10.6.3, and HandVU through http://www.movesinstitute.org/~kolsch/HandVu/doc/InstallationLinux.html#source

I think it's a problem with opencv, because if I'm trying to run the peopledetect example, I get a segmentation fault too.

macbook:c User$ ./peopledetect pic1.png
Segmentation fault

And if I try to run the facedetect sample I get an error too:

macbook:c User$ ./facedetect --cascade="../../haarcascades/haarcascade_frontalface_alt.xml" 
Xlib:  extension "RANDR" missing on display "/tmp/launch-WUMho1/org.x:0".

Hope someone can help!

thx, tux

A: 

I am also having this problem! Hope someone can help.

Jeff Crouse
A: 

Hi All ,

got the same issue and i am just compiling an opencv program, so it seems to come form opencv :) (...if it was needed to be confirmed...) Still cant get any idea on what is wrong but have found the following interresting infos :

http://old.nabble.com/Xlib:--extension-%22RANDR%22-missing-on-display-%22-tmp-launch-zP0Uvj-:0%22.-td23585151.html

hope somebody can found out the issue.

Thx

rara
A: 

I finally got to compiling OpenCV on MacOSX 10.6, and this may solve the issue...

First, from http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port , compile in i386 mode by issueing

svn co https://code.ros.org/svn/opencv/trunk/opencv
cd opencv # the directory containing INSTALL, CMakeLists.txt etc.
mkdir build
cd build
cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C/CXX_FLAGS=-m32 -D WITH_FFMPEG=OFF -D BUILD_EXAMPLES=ON -D BUILD_LATEX_DOCS=ON ..
make -j2
sudo make install

Eventually, I had to rebuild some ports:

sudo port install ilmbase +universal
port provides /opt/local/lib/libIlmImf.dylib
sudo port install openexr +universal

and recompile openCV

Then I could run python examples

cd ../samples/python/
python camera.py

and facedetect with no error (and webcam working).

meduz
A: 

Hi everyone,

Compile OpenCV with QTKit and Cocoa and then use it with HandVu. If you using Mac OSX 10.6.4 and above then please follow the steps below. (I assume you got PKG_CONFIG_PATH already setup)

  1. Compile OpenCV with QTKit and Cocoa ( dont select WITH_QUICKTIME and WITH_CARBON options in cmake configurations ). Additionally use TBB if you have it but its optional.

  2. get HandVu sources and then change the following files:

    • handvu/HandVu.h ( replace #include "cv.h" with #include "opencv2/opencv.hpp" and remove "highgui.h" )
    • handvu/OpticalFlow.h ( replace #include "cv.h" with #include "opencv2/opencv.hpp" and remove "highgui.h" )
    • handvu/GestureServer.cpp ( on line 255, replace MSG_NOSIGNAL with SO_NOSIGPIPE )
    • hv_OpenCV/hv_OpenCV.cpp ( replace #include "cv.h" with #include "opencv2/opencv.hpp" and remove "highgui.h" and replace the code on line 185 with the following code

int success = cvNamedWindow( "HandVu", CV_WINDOW_AUTOSIZE ); // if (success==0) { // printf("can't open window - did you compile OpenCV with highgui support?"); // return -1; // }

* Enjoy, you will have everything working on your Mac.

Good Luck, Zafar

xafarr