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
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();
	}
}