トップページ -> 実践知識 -> OpenCV の使用法 -> OpenCV のサンプルプログラム(ビデオ関係)
[サイトマップへ]  

OpenCV のサンプルプログラム(ビデオ関係)

サイト構成 連絡先,業績など 実践知識 データの扱い コンピュータ 教材 サポートページ

cvCreateGaussianBGModel を用いた前景と背景の分離 (書きかけ) ※ビデオカメラにも使えそうです

cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/bgfg_segm.cpp .
g++ -o a.out bgfg_segm.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out /usr/local/share/opencv/samples/c/tree.avi 
calcOpticalFlowFarneback を用いたオプティカルフロー(書きかけ) ビデオキャプチャしながらオプティカルフローを表示
cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/fback.cpp .
g++ -o a.out fback.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out 
fback_c.c echo ビデオデバイスを指定
cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/fback_c.c .
g++ -o a.out fback_c.c -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out 
laplace.c echo ビデオデバイスを指定
cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/laplace.c .
g++ -o a.out laplace.c -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out /usr/local/share/opencv/samples/c/fruits.jpg 
polar_transforms.c echo ビデオデバイスを指定
cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/polar_transforms.c .
g++ -o a.out polar_transforms.c -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out /usr/local/share/opencv/samples/c/fruits.jpg 
motempl.c echo ビデオデバイスを指定
cd /tmp
cp /usr/local/share/opencv/samples/c/motempl.c .
g++ -o a.out motempl.c -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out
adaptiveskindetector.cpp echo ビデオデバイスを指定
cd /tmp
cp /usr/local/share/opencv/samples/c/adaptiveskindetector.cpp .
g++ -o a.out adaptiveskindetector.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_contrib -lopencv_core
./a.out

その他 convert_cascade.c echo convert_cascade
cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/convert_cascade.c .
g++ -o a.out convert_cascade.c -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_objdetect -lopencv_core
./a.out 640 480 hoge.png  
pyramid_segmentation.c echo 書きかけ
cd /tmp
cp /usr/share/doc/opencv-doc/examples/c/pyramid_segmentation.c .
g++ -o a.out pyramid_segmentation.c -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out /usr/local/share/opencv/samples/c/fruits.jpg 
bgfg_codebook.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/bgfg_codebook.cpp .
g++ -o a.out bgfg_codebook.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out 
bgfg_segm.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/bgfg_segm.cpp .
g++ -o a.out bgfg_segm.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_core
./a.out /usr/local/share/opencv/samples/c/fruits.jpg 
find_obj_calonder.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/find_obj_calonder.cpp .
g++ -o a.out find_obj_calonder.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_features2d -lopencv_flann -lopencv_calib3d -lopencv_core
./a.out
find_obj_ferns.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/find_obj_ferns.cpp .
cp /usr/local/share/opencv/samples/c/box* .
g++ -o a.out find_obj_ferns.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_features2d -lopencv_flann -lopencv_calib3d -lopencv_objdetect -lopencv_core
./a.out
latentsvmdetect.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/latentsvmdetect.cpp .
cp /usr/local/share/opencv/samples/c/cat* .
g++ -o a.out latentsvmdetect.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_objdetect -lopencv_core
./a.out 
mushroom.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/mushroom.cpp .
g++ -o a.out mushroom.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_ml -lopencv_core
./a.out
one_way_sample.cpp 書きかけ
cd /tmp
cp /usr/local/share/opencv/samples/c/one_way_sample.cpp .
cp /tmp/scene* /tmp 
g++ -o a.out one_way_sample.cpp -I/usr/local/include/opencv -L/usr/local/lib -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_features2d -lopencv_core
 ./a.out . scene_l.bmp scene_r.bmp