00001 /* Copyright (c) 2001 S.E. Grigorescu */ 00002 00003 #include "Upsampling.h" 00004 00005 template void Upsample< int >(Image< int >&, Image< int >&); 00006 template void Upsample< byte >(Image< byte >&, Image< byte >&); 00007 template void Upsample< float >(Image< float >&, Image< float >&); 00008 template void Upsample< int >(Image< int >&); 00009 template void Upsample< byte >(Image< byte >&); 00010 template void Upsample< float >(Image< float >&); 00011 00012 template< class T > void Upsample(Image< T >& input, Image< T >& output) 00013 { 00014 Image< T > res(2*input.getWidth(), 2*input.getHeight(), output.getName()); 00015 res = 0; 00016 00017 for (int i = 0; i < input.getHeight(); i++) 00018 for (int j = 0; j < input.getWidth(); j++) 00019 res[2*i][2*j] = input[i][j]; 00020 output = res; 00021 } 00022 00023 template< class T > void Upsample(Image< T >& input) 00024 { 00025 Upsample(input, input); 00026 }