Showing posts with label OpenCV. Show all posts
Showing posts with label OpenCV. Show all posts

Friday, May 20, 2011

If your Cmake cannot find FFMpeg for OpenCV 2.1, try to do the following!

Modify your ".bash_profile" like the following:
First you need to make sure the FFMpeg libraries you installed can be found by your Cmake;
Then, make sure your "pkgconfig" can be found!
It works for me!

PATH=$PATH:$HOME/bin
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PATH
export LD_LIBRARY_PATH

Sunday, May 8, 2011

OpenCV 2.1 with FFmpeg


In the past few dayes, I tried to install OpenCV, with FFmpeg enabled. During the process, I faced few problems. Fortunately, those errors seem solved. The first problem is an error seems like this:
"cvcap_ffmpeg.cpp:250: error: integer constant is too large for 'long' type"
You need to add two lines as follow in the beginning of ".../highgui/cvcap_ffmpeg.cpp".
#define INT64_C
#define __STDC_CONSTANT_MACROS

Then, run make again. This error will be caused if your FFmpeg is properly installed. My first few attempts of installations seem lucky but the reality is that FFmpeg is not enabled.

The next error would looks like this:
/usr/include/libavutil/common.h: In function ‘int32_t av_clipl_int32(int64_t)’:
/usr/include/libavutil/common.h:154:47: error: ‘UINT64_C’ was not declared in
this scope
This problem is triggered by some incompatibilities of C code and C++ code. You could solve this by simply adding "-D__STDC_CONSTANT_MACROS" in "Extra_C_Flags", like what I did in the following image.

Saturday, May 7, 2011

OpenCV 2.1 installation on Fedora 14


Every thing should work well except a bug... You may need to add one line in specified file as follow: