Пример #1
0
void Fuji::Update()
{
	MFDebug_Message("Fuji::Update()");

	// Schedule another update
	UpdateScheduler(kUpdateInterval, this);

	MFSystem_RunFrame();
}
//--------------------------------------------------------------
void testApp::setup(){
   
    // loading all the Paris data
    // To create the input video block
    for (int k = 1; k<= Nlast; k++){
    
        ofImage auxImage;
        auxImage.loadImage("ParisFrames/paris"+ofToString(k)+".jpg");
        BlockDims.x = auxImage.width;
        BlockDims.y = auxImage.height;
        BlockDims.z = Nlast;
       
        
        
        ofxCvColorImage AuxCVImage;
        AuxCVImage.allocate(auxImage.width,auxImage.height);
        AuxCVImage.setFromPixels(auxImage.getPixels(),auxImage.width,auxImage.height);
        cv::Mat AuxMat(AuxCVImage.getCvImage());
        
        TheFramesInput.push_back(AuxMat.clone());
    
    }
    


     
     //initial value
    OutFramesN = BlockDims.z;
    
 //   vidGrabber.setVerbose(true);
 //   vidGrabber.initGrabber(Nx,Ny);
    
    ofSetFrameRate(15);
    inOp =50;
  // the input grain list 
    UpdateScheduler();
    //UpdateSchedulerUpDown(TheUf,1);
//    GrainCamera =  RotateAux(ofVec3f(0.0,0.0,-1.1* sqrt(BlockDims.x*BlockDims.x+BlockDims.y*BlockDims.y+
//                                                        BlockDims.z*BlockDims.z)/2.0), 85.0, 0.0,
//                             ofVec3f(BlockDims.x/2.0,BlockDims.y/2.0,BlockDims.z/2.0));
  
 //   GrainUpVector = ofVec3f(0.0,-1.0,0.0);
    //side
  //  GrainCamera = ofVec3f(1.2*BlockDims.x,BlockDims.y/2.0,BlockDims.z/2.0);
    //vertex
   // GrainCamera = ofVec3f(BlockDims.x,0.0,0.0);
// corner
 //    GrainCamera = ofVec3f(BlockDims.x,BlockDims.y/2.0,0.0);
  // corner side
   //  GrainCamera = ofVec3f(BlockDims.x,0.0,BlockDims.z/2);
    // up
   // GrainCamera = ofVec3f(BlockDims.x/2.0,0.0,BlockDims.z/2);
    //GrainUpVector = ofVec3f(-1.0,0.0,0.0);
     ScaleCorrectFactor =CalculateScalecorrect();
    UpdateBool = true;
}
Пример #3
0
bool Fuji::Init(uint32_t argc, const char* argn[], const char* argv[])
{
	MFDebug_Message("Fuji::Init()");

	// Register the engine modules..
	MFModule_RegisterModules();

	// queue up the next update
	UpdateScheduler(kUpdateInterval, this);

	// Run one frame to kick off the init
	MFSystem_RunFrame();

	return true;
}