32 #include <Filter/DeInterlace.hh>
33 #include <Base/Image/ImageIO.hh>
34 #include <Base/Image/ImageConvert.hh>
35 #include <Base/Debug/TimeMeasure.hh>
42 #define StorageType unsigned char
43 #define OutputImageType unsigned char
45 #define StorageType float
46 #define OutputImageType float
51 int main(
int argc,
char *argv[])
65 cerr << argv[0] <<
" src dst useEvenLines(bool) dodownsamplingbytwo(bool)\n";
74 BIASERR(
"error loading image "<<argv[1]);
77 cerr <<
"read "<<argv[1]<<endl;
82 BIASERR(
"error converting image "<<argv[1]);
89 deinterlace.
Filter(im, dst);
void Print(std::ostream &os=std::cout) const
static int ImportImage(const std::string &filename, ImageBase &result)
Try to load/import an image from a file using external libs.
virtual int Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
averages over a region with constant weights
Deinterlacer filter for images.
static int ConvertST(const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST)
Function to convert the storage type of images e.g.
void SetUseEvenLines(bool bEvenLines=true)
Set if the even or odd lines in the images should be used.
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
void SetDownSamplingByTwo(bool bDoDownSamplingByTwo=true)
Set the downsampling factor while filter.
void SetDeInterlaceType(BIAS_DEINTERLACE_TYPE type)
Set the Type of deinterlacing e.g.
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
class TimeMeasure contains functions for timing real time and cpu time.