画像処理におけるマルチスレッドの利活用(OpenCV編)ではWindows向けマルチスレッドプログラミングの紹介をしましたが,Linuxでも使えるよう,pthreadを用いたプログラムも紹介しておきます. ここでは,HANDLEの代わりにpthread_t,CreateThread関数の代わりにpthread_create,WaitForSingleObjec関数の代わりにpthread_joinを使います. #include <sys/types.h> #include <pthread.h> #include <cv.h> #include <highgui.h> #include <windows.h> #include <cv.h> #include <highgui.h> // スレッドに渡すデータをまとめた構造体 struct captureparam{ CvCapture *