video-input-psnr-ssim.cpp
of the
tutorial
does not work.
It fails with Could not open reference video/Megamind.avi
but does not say why.
(Buried deep in the CMake output files there is an error complaining
about ffmpeg
but the cause OpenCV's problems could be something else...)
Others have reported this too.
ffmpeg -i AC_Left.avi -f image2 AC_Left_%03d.ppm
Decompress with
bunzip2 OpenCV-2.4.3.tar.bz2
Unpack with
tar xvf OpenCV-2.4.3.tar cd OpenCV-2.4.3
CMake Error: Error in cmake code at /cs/research/crest/projects1/ucacbbl/OpenCV-2.4.3/CMakeLists.txt:113: Parse error. Function missing ending ")". Instead found left paren with text "(".OpenCV-2.4.3 refuses to work with our default cmake (cmake version 2.4-patch 6).
WARNING: This project requires version 2.8.8 of CMake. You are running version 2.4.6.
cmake
with
/usr/opt/cmake/2.8.3/cmake
apps/haartraining/CMakeLists.txt
apps/traincascade/CMakeLists.txt
These errors should be corrected before CMake is run. Alternatively (and more realistically):
OpenCV-2.4.3/...
tree,
tar xvf OpenCV-2.4.3.tar
)
apps/haartraining/CMakeLists.txt
and
apps/traincascade/CMakeLists.txt
CMake Error at apps/haartraining/CMakeLists.txt:39 (set_target_properties): set_target_properties called with incorrect number of arguments. CMake Error at apps/traincascade/CMakeLists.txt:29 (set_target_properties): set_target_properties called with incorrect number of arguments.can be fixed in both files by enclosing
${EXECUTABLE_OUTPUT_PATH}
with a pair of double quotes
("
).
CMake fails to deterimine the bitness of target platform.
.
A solution is to extract a clean copy from
OpenCV-2.4.3.tar
and reapply your patches
before running CMake.
/usr/opt/cmake/2.8.3/bin/cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/cs/research/crest/projects1/ucacbbl/OpenCV-2.4.3/install/ /cs/research/crest/projects1/ucacbbl/OpenCV-2.4.3/
make
/cs/research/crest/projects1/ucacbbl/OpenCV-2.4.3/modules/features2d/src/freak.cpp:437: error: unable to find a register to spill in class GENERAL_REGS /cs/research/crest/projects1/ucacbbl/OpenCV-2.4.3/modules/features2d/src/freak.cpp:437: error: this is the insn: (insn:HI 1685 1684 1686 131 (parallel [ (set (subreg:DI (reg:V16QI 21 xmm0 [848]) 0) (ior:DI (reg:DI 1 dx [832]) (reg:DI 4 si [839]))) (clobber (reg:CC 17 flags)) ]) 315 {*iordi_1_rex64} (insn_list:REG_DEP_TRUE 1660 (insn_list:REG_DEP_TRUE 1659 (nil))) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_DEAD (reg:DI 4 si [839]) (expr_list:REG_DEAD (reg:DI 1 dx [832]) (nil))))))This bug has been reported in stackoverflow.com.
freak.cpp
without optimisation.
I.e. remove -O3
from the command line used by make
to try and compile freak.cpp
and run it by hand.
(NB. running it from the correct directory.)
Once freak.cpp
has been compiled,
make
will detect this and not try to compile it again.
(Remember to restore the correct working directory before invoking
make
a second time)