views:

2982

answers:

3

Hi, I am not a Unix guy, so I have been trying to install openCV 2.0 for days with out success. I just downloaded the opencv library form sourceforge from this page: http://sourceforge.net/projects/opencvlibrary/ Does any one know the exact unix terminal commands for installing it?

please don't say "go to google", I already did. I found this: http://opencv.willowgarage.com/wiki/InstallGuide and this http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port but the explanations are not very good for unix beginners.

installations always fails in the end.

It would be great if I can make a framework. for example OpenCV.framework from the current source, So I can use it with Xcode, and Cocoa easier.

thanks

I did:

downloaded it. extracted it.

cd Downloads/OpenCV-2.0.0
./make_frameworks.sh

and got this when linking all the .o files.

mv -f .deps/saving.Tpo .deps/saving.Plo
mv -f .deps/logger.Tpo .deps/logger.Plo
mv -f .deps/index_testing.Tpo .deps/index_testing.Plo
libtool: link: (cd .libs/lib_clapack.lax/lib_clapack_floatstore.a && ar x "/Users/nacho4d/Downloads/OpenCV-2.0.0 3/build_i386/3rdparty/./.libs/lib_clapack_floatstore.a")
../libtool: line 961: cd: .libs/lib_clapack.lax/lib_clapack_floatstore.a: No such file or directory
make[2]: *** [lib_clapack.la] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/flann.Tpo .deps/flann.Plo
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Creating universal Framework
=============================================
cp: build_ppc/OpenCV.framework: No such file or directory
lipo: can't open input file: build_ppc/OpenCV.framework/OpenCV (No such file or directory)
Done

!

Do I need to do something before running the shell script?

EDIT: For the interested, I wrote a post on how to install and use OpenCV 2.1.1 on Macs here: http://nacho4d-nacho4d.blogspot.com/2010/07/blog-post.html

A: 

Ok, I just solved it. In fact there is a bug somewhere, because if your path contains a space shell scripts will fail.

for example.

$pwd
/Users/nacho4d/Downloads/OpenCV-2.0.0 3
$./make_frameworks.sh

this will fail because current folder "OpenCV-2.0.0 3" has a space.

It took me many hours to realize this. ;(

Regards

nacho4d
For the interested: I have a small post how to install OpenCV 2.1.1 in Macs. http://nacho4d-nacho4d.blogspot.com/2010/07/blog-post.html 2.1 uses Cocoa. Hence works better on macs.
nacho4d
A: 

hello... you helped me alot with answering yourself. Im new at Unix too and can you please tell me what have you done afterwards? Did install came out okey?

Miha
It is okey now, just run the script as I wrote and you should have a folder called OpenCV.framework (I don't remember the exact place but is inside OpenCV-2.0.0 folder, searching it with spotlight is a good idea)I know that is a litlle buggy but I works fine and has new functions. cheers
nacho4d
Once you have the framework you just import it to your Xcode projects like the sample project in OpenCV-2.0.0/samples/MacOSX
nacho4d
+1  A: 

I had a problem compiling on Snow Leopard too, but was able to get it to work by following the instructions at: http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port

The only modification I had to make was also to disable ffmpeg inside of ccmake

The GNU autotools methods (make && make install) are being outdated. Volunteers to edit this section?

mkdir opencv/build cd opencv/build cmake .. ccmake .

If you are on Snow Leopard, hit 't' to toggle advanced mode. Set CMAKE_CXX_COMPILER="/usr/bin/g++-4.0" and CMAKE_C_COMPILER="/usr/bin/gcc-4.0" and then continue with the following steps.

Hit 'c' to configure. Hit 'g' to generate the config file and exit ccmake.

make -j8 sudo make install

If you hit the following build error:

/Users/awagner/Developer/opencv2/src/highgui/grfmt_tiff.cpp:292: error: ‘fmtSignTiffII’ was not declared in this scope make[2]: * [src/highgui/CMakeFiles/highgui.dir/grfmt_tiff.o] Error 1 make1: * [src/highgui/CMakeFiles/highgui.dir/all] Error 2

you can get the build to complete by commenting out line 292 of src/highgui/grfmt_tiff.cpp and running make again. (This probably breaks something in TIFF export, but the build at least completes)

Hortitude