コード例 #1
0
void ocvOpticalFlowApp::update()
{ 
    if( !mMovie ) return; 
    if (!mMovie.getSurface() ) return; 

	Surface surface = mMovie.getSurface();
    cv::Mat currentFrame( toOcv( Channel( surface ) ) );
    mTexture = gl::Texture( surface );
//    if( mPrevFrame.data ) 
//    {
//			if( mFeatures.empty() || getElapsedFrames() % 30 == 0 ) // pick new features once every 30 frames, or the first frame
//				chooseFeatures( mPrevFrame );
//			trackFeatures( currentFrame );
//    }
//    mPrevFrame = currentFrame;
    
    findPeople(currentFrame);
    
//	if( mCapture.checkNewFrame() ) {
//		Surface surface( mCapture.getSurface() );
//		mTexture = gl::Texture( surface );
//		cv::Mat currentFrame( toOcv( Channel( surface ) ) );
//		if( mPrevFrame.data ) {
//			if( mFeatures.empty() || getElapsedFrames() % 30 == 0 ) // pick new features once every 30 frames, or the first frame
//				chooseFeatures( mPrevFrame );
//			trackFeatures( currentFrame );
//		}
//		mPrevFrame = currentFrame;
//	}
    
}
コード例 #2
0
ファイル: EnhanceApp.cpp プロジェクト: mdunkley/Enhance
void EnhanceApp::update()
{
	if( mMovie ){
        mSurface = mMovie.getSurface();
        //cv::Mat input( toOcv( mSurface ) );

    }

}
コード例 #3
0
void PostProcessingApp::update()
{
	// update movie texture if necessary
	if(mMovie) { 
		// get movie surface
		Surface surf = mMovie.getSurface();

		// copy surface into texture
		if(surf)
			mImage = gl::Texture( surf );

		// play next movie in directory when done
		if( mMovie.isDone() ) 
			playNext();
	}
}