当前位置: 首页>>代码示例>>C++>>正文


C++ ofVideoPlayer::isFrameNew方法代码示例

本文整理汇总了C++中ofVideoPlayer::isFrameNew方法的典型用法代码示例。如果您正苦于以下问题:C++ ofVideoPlayer::isFrameNew方法的具体用法?C++ ofVideoPlayer::isFrameNew怎么用?C++ ofVideoPlayer::isFrameNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ofVideoPlayer的用法示例。


在下文中一共展示了ofVideoPlayer::isFrameNew方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: update

 void update() {
     video.update();
     if(video.isFrameNew()) {
         copyGray(video, gray);
         resize(video, graySmall, rescale, rescale);
         threshold(gray, thresholded, thresholdValue);
         dilate(thresholded, dilated, dilationAmount);
         updateMotion();
         updateContours();
     }
 }
开发者ID:GlocalSound,项目名称:Transcranial,代码行数:11,代码来源:main.cpp

示例2: draw

//--------------------------------------------------------------
void testApp::draw(){
	ofBackgroundGradient(ofColor(0,0,0), ofColor(50, 50, 50), OF_GRADIENT_CIRCULAR);

	ofSetColor(255);
	if( mode == "edit" || mode == "move" ){
		if( mode == "move" ){
			ofSetColor(20, 90, 30);
			ofRect(0,0,3000,3000);
			ofSetColor(255);
		}
		
		for(int i = 0; i < thumbs.size(); i++){
			thumbs[i].draw();
		}
		
		if( mode == "move" && bDown ){
			ofSetColor(255, 190, 50);
			ofRect(thumbs[placedIndex].r.x - 5, thumbs[placedIndex].r.y, 4, 80);
		}
		
		ofSetColor(255);
		
	}else if( mode == "full" ){
		fullVid.draw(0,0);
		ofRect(thumbs[selected].pos * ofGetWidth(), ofGetHeight()-10, 4, 10);
	}else{
		
		vid.setAnchorPercent(0.5, 0.5);
		vid.draw(ofGetWidth()/2, ofGetHeight()/2, ofGetWidth(), ofGetWidth() * ( vid.getHeight() / vid.getWidth() ));
		
		if( vid.isFrameNew() ){
		
			if( mode == "play" ){
				img.grabScreen(0,0,ofGetWidth(),ofGetHeight());
				img.saveImage("frames/" + ofToString(totalFrames) + ".jpg");
			}
			totalFrames++;
			
			framecounter++;
			if( framecounter > NUM_FRAMES ){
				nextVideo();
			}		

		}
	}
}
开发者ID:Giladx,项目名称:autoMovie,代码行数:47,代码来源:testApp.cpp


注:本文中的ofVideoPlayer::isFrameNew方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。