35 #include <Base/Image/Image.hh>
36 #include <Base/Image/ImageIO.hh>
37 #include <Base/Image/ImageConvert.hh>
39 #ifdef BIAS_HAVE_OPENCV
46 int main(
int argc,
char *argv[])
48 #ifdef BIAS_HAVE_OPENCV
53 BIASERR(argv[0]<<
" <image-file>");
58 BIASERR(
"error loading "<<argv[1]<<
" (Load)");
63 BIASERR(
"error converting bias -> ipl");
67 cvNamedWindow(
"window", 1 );
68 cvShowImage(
"window", dst );
71 std::cout<<
"will close gui window after "<<delay<<
" msecs."<<endl;
73 std::cout<<
"closed window."<<endl;
76 BIASERR(
"error converting ipl -> bias");
82 BIASERR(
"error writing bias-ipl-bias.mip");
86 std::cout<<
"you compiled without OpenCV."<<endl;
static int Ipl2BIAS(IplImage *source, Image< StorageType > &dest)
Takes the image information and data of an existing IplImage and builds a Image.
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.
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...
static int BIAS2ipl(const Image< StorageType > &source, IplImage *&dest)
Returns a new, separate IplImage for use with OpenCV created rom the source BIAS Image.