An example using pyrDown and pyrUp functions
const char* window_name = "Pyramids Demo";
int main( void )
{
printf( "\n Zoom In-Out demo \n " );
printf( "------------------ \n" );
printf( " * [u] -> Zoom in \n" );
printf( " * [d] -> Zoom out \n" );
printf( " * [ESC] -> Close program \n \n" );
src =
imread(
"../data/chicky_512.png" );
{ printf(" No data! -- Exiting the program \n");
return -1; }
tmp = src;
dst = tmp;
for(;;)
{
if( c == 27 )
{ break; }
if( c == 'u' )
printf( "** Zoom In: Image x 2 \n" );
}
else if( c == 'd' )
printf( "** Zoom Out: Image / 2 \n" );
}
tmp = dst;
}
return 0;
}