35 #include "Filter/Convolution.hh"
36 #include <Base/Common/BIASpragma.hh>
41 int main(
int argc,
char *argv[])
53 for(
int x=0;x<100;x++)
90 cout <<
"dst matrix:\n";
94 cout <<(
int)dstdata[y*10+x]<<
" ";
98 fm.
Init(khor,kver,1,0);
102 for(
int y=0;y<10;y++)
104 for(
int x=0;x<10;x++)
105 cout <<(
int)dstdata[y*10+x]<<
" ";
111 cout <<
"dst matrix float:\n";
112 for(
int y=0;y<10;y++)
114 for(
int x=0;x<10;x++)
115 cout <<(
int)dstdata[y*10+x]<<
" ";
121 cout <<
"dst sep float:\n";
122 for(
int y=0;y<10;y++)
124 for(
int x=0;x<10;x++)
125 cout <<(
int)dstdata[y*10+x]<<
" ";
class for column vectors with arbitrary size
virtual int FilterFloat(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
do the convolution using floating point calculations
Matrix< T > & newsize(Subscript M, Subscript N)
void CreateFloatFilter()
create the float filter from the int filter
Vector< T > & newsize(Subscript N)
void SetKernel(FilterMask &fm)
set a new filter mask
void Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
const StorageType * GetImageData() const
overloaded GetImageData() from ImageBase
matrix class with arbitrary size, indexing is row major.
void Init(const Matrix< FM_INT > &kernel, int rs, bool ResetOtherType=FM_RESET_OTHER)
sets _sKernel and also _fKernel.
A filter mask (or a kernel) used for convolution.
virtual int FilterInt(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
do the convolution using integer arithmetics and shifts