3

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

Aaron
  • 31
  • 1
  • 2

1 Answers1

3

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): OpenCV 2.1: Runtime error

Community
  • 1
  • 1
karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • Not anymore: $ lipo -info /Library/Frameworks/CUDA.framework/Versions/A/CUDA Architectures in the fat file: /Library/Frameworks/CUDA.framework/Versions/A/CUDA are: i386 x86_64 $ /usr/local/cuda/bin/nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2010 NVIDIA Corporation Built on Thu_Sep__9_16:01:02_PDT_2010 Cuda compilation tools, release 3.2, V0.2.1221 – Mirek Rusin Oct 11 '10 at 18:31
  • @Mirek Great news! What I stated above is valid for CUDA 3.1 – karlphillip Oct 11 '10 at 19:24
  • 1
    same problem here, but solved by your solution @karlphilip ... thanks man – Michel Gokan Khan Sep 08 '11 at 09:09