Old: Ver.1 - 3: OpenCV sample programs

Japanese, Casper Cartridges, kameda-lab.org 2010/11/23d, (2012/10/10)

Latest Version

New Casper Cartridge (newer than Ver.3) is ready now.
Access the page from this link.
[Casper Cartridge Top]


Ver.1-3 overview cartridge list why casper? internal set-up OpenCV samples ARToolKit PTAM OpenCV/svn

Abstract

On our Ubuntu10.04 LTS, a single OpenCV program file could be compiled by:
C $ gcc -o kmd_sample0 kmd_sample0.c `pkg-config --cflags opencv` `pkg-config --libs opencv`
C $ gcc -o kmd_sample0 kmd_sample0.c -I/usr/local/include/opencv -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore
C++$ g++ -o kmd_sample1 kmd_sample1.cpp `pkg-config --cflags opencv` `pkg-config --libs opencv`
C++$ g++ -o kmd_sample1 kmd_sample1.cpp -I/usr/local/include/opencv -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore

Or you can use my makefileMakefile_c_and_cpp in a way that
C $ make kmd_sample0 -f Makefile-c_and_cpp
C++$ make kmd_sample1 -f Makefile-c_and_cpp

I have copied some sample programs for convenience.
You can find that /home/ubuntu/www-mirror/OpenCV-samples/ in our Ubuntu 10.04 LTS.
You are asked to follow their license agreement upon use.

Below are just memo, so do not believe them so much.


OpenCV attached samples

Included in the distribution of OpenCV-2.1.0 (OpenCV-2.1.0/samples/c).

[Taken from]
OpenCV-2.1.0.tar.bz2 (2010/05/01)

[Procedure]
[00] $ cd 
[01] $ cd www-mirror/OpenCV-samples/OpenCV-2.1.0-samples/c
[02] $ bash build_all.sh
(Failed on compiling one_way_sample.cpp)

For example, you can enjoy lkdemo with a USB camera. Do not forget to press "r".


OpenCV.jp

[Taken from]
http://opencv.jp/sample_code (2010/09/20)

[Procedure]
[00] (I won't tell how I downloaded the files)
[01] $ cd ~/www-mirror/OpenCV-samples/opencv.jp/
[02] $ ./kmd_compile_ver1.bash
       (Failed on compiling contour_processing-source3.cpp[not open to public by now], estimators-source1.cpp, and others-source1.cpp)
[03] $ ./kmd_compile_ver2.bash
       (Failed on compiling usage_of_sparsemat_2_superresolution-1.cpp)

OpenCV Programming Book 1st Ed.

[Taken from]
cv_prog.zip (2008/05/01)

[Procedure]
[00] $ cd
[01] $ cd www-mirror/OpenCV-samples/OpenCV-ProgrammingBook1stEd/
[02] $ ./OCVPB1_build_all_by_kameda.bash
(Failed on compiling keisan.cpp, histogram.cpp, and rockpaperscissors.cpp)

OpenCV Programming Book 2nd Ed.

[Taken from]
cv11_prog.zip + tutorial_01.cpp (2010/09/11)

[Procedure]
[00] $ cd
[01] $ cd www-mirror/OpenCV-samples/OpenCV-ProgrammingBook2ndEd/
[02] $ ./OCVPB2_build_all_by_kameda.bash
(Failed on compiling histogram.cpp and rockpaperscissors.cpp)

Learning OpenCV

[Taken from]
LearningOpenCV_Code.zip (2010/09/13)

[Procedure]
[00] $ cd
[01] $ cd www-mirror/OpenCV-samples/LearningOpenCV/LearningOpenCV_Code
[02] $ make -f Makefile.txt
(Of course it fails on installing binaries to /root/bin, but you can get all the binaries in the working directory.)

Misc

Please tell me if you know good sites.
Or do it yourself!


KAMEDA, Yoshinari; kameda[at]iit.tsukuba.ac.jp, kameda[at]ieee.org