I’m trying to make a capture from a file in OpenCV, but I keep getting NULL pointers. My guess is that opencv is not configured to use ffmpeg, when installed through Yast, but I don’t know how to check this.
(I have tried building ffmpeg and opencv myself, that was a 2 day traumatic experience, to say the least)
OpenCV is available via the build service but of course without ffmpeg support. You have to install ffmpeg (e.g. via packman) and compile openCV yourself if you want to have ffmpeg support.
Yes, that’s what I’ve been afraid of. I’ve been trying to build openCV with ffmpeg support for 3 days now.
First I have to hack the configure.in script to let it detect the ffmpeg libs, together with the appropriate include flags.
Then I have to hack the Makefile.am to change install-hook into install-exec-hook.
The libtool they generate complains about:
I’ve looked into libtool and there are some hardcode config options, but I have no idea what to do with them.
Building the latest TESTED svn snapshot, with CMake, yields compilation errors. These are not overcome by adding ‘#define __STDC_CONSTANT_MACROS’ as mentioned elsewhere.
So I’ve also tried to post the above to the openCV mailinglist, but the owner has to approve and I don’t know if he still has to look at my message (sent it yesterday afternoon), or that he rejected it…
I tried to compile version 1.0. The autotools errors were easily fixable, but then I found that it uses “img_convert()”… a function available only in versions of ffmpeg previous to 2008.
Since I’m not motivated to patch it I will wait for 1.1 final.
Well, I changed my mind. OpenCV 1.0 is available for openSUSE 11.1 at home:RedDwarf:multimedia with this configuration:
General configuration ================================================
Compiler: g++
CXXFLAGS: -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fno-strict-aliasing
Install path: /usr
HighGUI configuration ================================================
Windowing system --------------
Use Carbon / Mac OS X: no
Use gtk+ 2.x: yes
Use gthread: yes
Image I/O ---------------------
Use libjpeg: yes
Use zlib: yes
Use libpng: yes
Use libtiff: yes
Use libjasper: yes
Use libIlmImf: yes
Video I/O ---------------------
Use QuickTime / Mac OS X: no
Use xine: yes
Use ffmpeg: yes
Use dc1394 & raw1394: yes
Use v4l: yes
Use v4l2: yes
Wrappers for other languages =========================================
SWIG
Python yes
Additional build settings ============================================
Build demo apps yes
Isn’t the best package that could be, and don’t expect me to mantain it, but it should work.
I am having similar problem compiling opencv on x86-64. It uses by default its own libtool, with which I had no luck at all. So I resorted to using libtool from /isr/bin.
Now I am getting the:
libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.
I don’t really know how to resolve this one. You said you resolved it, how did you do it?