opencv - processing with different image resolutions

Hi,

I’m currently masking a live video feed into a video player object (both video images are the same resolution), but now need to make video player much larger than the video input that gets masked in. I was thinking of creating two video player instances, one at the large size and another that is smaller and overlaid on top of the larger, which just displays the are of interest that I’d like to mask over. However, this doesn’t feel like it’s a good approach to the problem and feels a bit hackish :frowning: so I was wondering if there is another way to handle image transformations that are of two different resolutions. Does anyone know of another method for doing this?

Thanks

Seems like an FBO would be the fastest:

  
  
ofVideoPlayer videoPlayer;  
ofImage videoImage;  
ofFbo fbo;  
//--------------------------------------------------------------  
void testApp::setup(){  
	videoPlayer.loadMovie("/Volumes/VIDEO/WYG_EDIT.mov");  
	videoPlayer.play();  
	fbo.allocate(videoPlayer.getWidth(), videoPlayer.getHeight());  
	fbo.begin();  
	ofClear(0, 0, 0, 1);  
	fbo.end();  
  
	  
}  
  
//--------------------------------------------------------------  
void testApp::update(){  
	videoImage  = videoPlayer.getPixelsRef();  
	fbo.begin();  
		videoImage.draw(0,0, videoPlayer.getWidth(), videoPlayer.getHeight());  
	fbo.end();  
	ofSetWindowTitle(ofToString(ofGetFrameRate()));  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){  
  
	fbo.draw(0, 0, videoPlayer.getWidth()*2, videoPlayer.getHeight()*2);  
	  
}