void ocvWarpApp::setup() { mInputImage = ci::Surface8u( loadImage( loadAsset( "aus.jpg" ) ) ); mRotationCenter = vec2( mInputImage.getSize() ) * 0.5f; mRotationAngle = 31.2f; mScale = 0.77f; mParams = params::InterfaceGl( "Parameters", ivec2( 200, 400 ) ); mParams.addParam( "Rotation Center X", &mRotationCenter.x ); mParams.addParam( "Rotation Center Y", &mRotationCenter.y ); mParams.addParam( "Rotation Angle", &mRotationAngle ); mParams.addParam( "Scale", &mScale, "step=0.01" ); updateImage(); }
void ocvWarpApp::setup() { mInputImage = ci::Surface8u( loadImage( loadResource( RES_IMAGE ) ) ); mRotationCenter = mInputImage.getSize() * 0.5f; mRotationAngle = 31.2f; mScale = 0.77f; mParams = params::InterfaceGl( "Parameters", Vec2i( 200, 400 ) ); mParams.addParam( "Rotation Center X", &mRotationCenter.x ); mParams.addParam( "Rotation Center Y", &mRotationCenter.y ); mParams.addParam( "Rotation Angle", &mRotationAngle ); mParams.addParam( "Scale", &mScale, "step=0.1" ); updateImage(); }