tags:

views:

398

answers:

1

I have installed opencv 2.1 on my mac mini using macports (automatic) 64 bit compile. the sample programs work EXCEPT for the camera based ones. i have a logitech c200 webcam.

However, when i compile opencv with -arch i386 and -m32 everything works fine including connecting to the camera. i have read this is because quicktime is 32 bit. i have also read however that qtkit is supposed to work on snow leopard and that it has more support for gui and cameras.

why can I not get video to work in 64 bit builds and how can i remedy the situation?

Thanks

Aaron

A: 

Good question! I have applications written with OpenCV 2.1 that will work on Windows/Linux/Mac OS X (SL) when compiled for 32bits.

The 64bit version is not recommended and I'll tell you one of the reasons why. OpenCV has algorithms also mapped to use CUDA technology if its available on your computer. I installed CUDA 3.1 on my Macbook Pro recently and the default compilation for Mac OS X is 32bits. Yes, really.

CUDA supports 64bits only on Linux and Windows for now.

That said, for the time being, if you plan to use both on Mac, you'll have to compile everything you need, including 3rd party libraries you might use, for 32bits architecture.

CUDA is being developed by NVIDIA and even with all the $$$ resources they have their code still does not support 64bits for Mac.

Why should OpenCV (which makes no money and the guys work for free) support it, right? We should be patient.

If you really really need your application to be 64bit, I suggest you move your development to Linux or Windows.

If I may point out some source code for displaying video from the webcam (including command line instructions to compile the source): http://stackoverflow.com/questions/3438500/opencv-2-1-runtime-error/3444370#3444370

karlphillip
Not anymore:$ lipo -info /Library/Frameworks/CUDA.framework/Versions/A/CUDAArchitectures in the fat file: /Library/Frameworks/CUDA.framework/Versions/A/CUDA are: i386 x86_64$ /usr/local/cuda/bin/nvcc --versionnvcc: NVIDIA (R) Cuda compiler driverCopyright (c) 2005-2010 NVIDIA CorporationBuilt on Thu_Sep__9_16:01:02_PDT_2010Cuda compilation tools, release 3.2, V0.2.1221
Mirek Rusin
@Mirek Great news! What I stated above is valid for CUDA 3.1
karlphillip