オプティカルフローのサンプルコードをちょっといじって、カメラからの入力を表示してみた。 ブロックマッチングによるオプティカルフローを使った。 できたソースコード、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