26 #include <Base/Image/ImageIO.hh>
27 #include <Base/Image/ImageConvert.hh>
29 #include <Base/Debug/Error.hh>
30 #include <Base/Debug/DebugSimple.hh>
46 void usage(
int ,
char** )
48 cout<<
"usage: readRAW <img.raw> <out.jpg> <jpgQuality>"<<endl
49 <<
"author: Jan Woetzel"<<endl;
53 int main(
int argc,
char** argv){
54 if (argc==1) usage(argc, argv);
57 if (argc>0) cout<<argv[0];
63 string out(
"img_out.jpg");
64 unsigned int quality=100;
66 if (argc>1) in =argv[1];
67 if (argc>2) out=argv[2];
68 if (argc>3) quality=atoi(argv[3]);
74 cout<<
"could not load image "<<in<<endl;
85 cout<<
"could not write image."<<endl;
87 #ifdef BIAS_HAVE_OPENCV
88 imgRGB.
Display(
"imgRGB",
true,
false,
true, 6000);
89 #endif // BIAS_HAVE_OPENCV
int Display(const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec=DEFAULT_Display_delay, const float &scale=DEFAULT_32to8_scale, const bool &allowAlphaWindow=false) const
OpenCV onscreen popup display, very useful for fast debugging. (JW)
static int ImportRAWwithHeader(const std::string &filename, BIAS::ImageBase &img)
Reads a proprietary .RAW format from disk A typical file consists of these blocks: ...
static int ToRGB(const Image< StorageType > &source, Image< StorageType > &dest)
Create a RGB converted copy of source image in this.