オプティカルフローのサンプルコードをちょっといじって、カメラからの入力を表示してみた。 ブロックマッチングによるオプティカルフローを使った。 できたソースコード、Makefile image.cpp #include <cv.h> #include <highgui.h> #include <cxcore.h> #include <ctype.h> #include <stdio.h> #include <iostream> #include <boost/format.hpp> using namespace std; using namespace boost; void detect_flow(IplImage *img, IplImage *img_p, IplImage *dst); int main(int argc, char* argv[]) { IplImage *img
![橋本商会 » cvCalcOpticalFlowBM](https://cdn-ak-scissors.b.st-hatena.com/image/square/d8cd8a796d689fa9c201b5b6e82f84ada2762674/height=288;version=1;width=512/http%3A%2F%2Ffarm3.static.flickr.com%2F2432%2F3984154476_5652d6bfde.jpg)