私はウェブカメラを使用し、openCV を使用して各フレームを取得し、オブジェクトの位置を追跡します。
つまり、基本的に、各フレームで 1 つのポイントを取得しています。しかし、リアルタイムで動きのある絵を描くにはどうすればよいでしょうか?
特定の時間内に複数のポイントを記録して線を引くにはタイマーが必要ですか?
while ループの場合と同様に、フレームを 1 つ取得するだけです。この現在のフレームに線を描画しても、次のフレームで線を保持することはできないと思います。では、どのように動きを表示すればよいでしょうか。
while( true )
{
//Read the video stream
capture = cvCaptureFromCAM(1);
frame = cvQueryFrame( capture );
//Apply the classifier to the frame
detectAndDisplay(frame); // I got a point from this function
// waitkey enter
int c = waitKey(10);
if( (char)c == 27 ) { exit(0); }
}