tags:

views:

396

answers:

5

When I'm trying to compile OpenCV on Mac OS X Snow Leopard I recieve an error

highgui/cvcap_qt.cpp:76: error: ‘Movie’ does not name a type

There is a structure

/// Movie state structure for QuickTime movies                                                                  
typedef struct CvCapture_QT_Movie                                                                               
{                                                                                                               
      Movie      myMovie;   // movie handle                                                          
    GWorldPtr  myGWorld;           // we render into an offscreen GWorld       

But I don't know this type is described. I think in Quicktime but Quicktime is included

// Mac OS includes                                                                                              
#include <Carbon/Carbon.h>                                                                                      
#include <CoreFoundation/CoreFoundation.h>                                                                      
#include <QuickTime/QuickTime.h>

So I cannot build it.

A: 

As a quick workaround, you could grab a pre-built Universal Framework from version 1.2 here: http://www.ient.rwth-aachen.de/cms/software/opencv/

jkooker
Yeah, thanks a lot for that! But I have all the precompiled frameworks versions, but actually I need binaries from the bin catalo, smth. like a cascadetraining program etc.:) They are not included in Framework
moldov
A: 

Hi! How are you compiling OpenCV? Are you using ccmake to generate Xcode files and then build it into Xcode ?

Daniel Koch
Hello, I have used cmake and simple make the same result:(
moldov
A: 

The legacy QuickTime framework did not make the transition to 64-bit, so you'll need to make sure you're compiling as 32-bit.

Chuck
A: 

Hi I had the same problem exactly on snow leopard 10.6.2. So I built the library without enabling quicktime. There must be a work around to whatever you are doing without enabling quicktime right?

To build the library without using quicktime, follow section 2 (Building from source using the new CMake build system) exactly without enabling extra options in

http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port

Hope this helps.

TREERAT
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